A modern crowdfunding platform built with Next.js, Supabase, and TailwindCSS, designed to help Nigerians raise funds for causes that matter.
- 🚀 Campaign creation and management
- 💳 Secure payment processing with Paystack
- 📹 Video uploads with Mux
- 📱 SMS notifications with Twilio
- 🔐 Identity verification with Dojah
- 📊 Real-time analytics and leaderboards
- 🎨 Modern, responsive UI design
- Frontend: Next.js 14, React, TailwindCSS
- Backend: Next.js API Routes
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- File Storage: Supabase Storage
- Payments: Paystack
- Video: Mux
- SMS: Twilio
- Verification: Dojah
- Error Tracking: Sentry
- Deployment: Vercel
- Node.js 18+
- npm or yarn
- Supabase account
- Paystack account
- Mux account
- Twilio account
- Dojah account
- Sentry account (optional)
- Clone the repository:
git clone https://github.com/yourusername/assistng.git
cd assistng- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.local- Configure your environment variables in
.env.local:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Paystack
NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY=your_paystack_public_key
PAYSTACK_SECRET_KEY=your_paystack_secret_key
# Mux
NEXT_PUBLIC_MUX_TOKEN_ID=your_mux_token_id
MUX_TOKEN_SECRET=your_mux_token_secret
# Twilio
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number
# Dojah
DOJAH_API_KEY=your_dojah_api_key
DOJAH_APP_ID=your_dojah_app_id
# Application
NEXT_PUBLIC_APP_URL=https://your-app-domain.com
# Sentry (optional)
NEXT_PUBLIC_SENTRY_DSN=your_sentry_dsn
SENTRY_DSN=your_sentry_dsn- Set up the database:
# Apply migrations to your Supabase project
supabase db push
# Test migrations (staging)
npm run test:migrations
# Test migrations (production)
npm run test:migrations:prod- Run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
assistng/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── campaigns/ # Campaign pages
│ ├── create/ # Campaign creation page
│ ├── explore/ # Campaign listing page
│ ├── globals.css # Global styles
│ └── layout.tsx # Root layout
├── components/ # Reusable components
│ ├── CampaignCard.tsx # Campaign card component
│ ├── DonationBox.tsx # Donation form component
│ ├── Footer.tsx # Footer component
│ └── Header.tsx # Header component
├── contexts/ # React contexts
│ └── AuthContext.tsx # Authentication context
├── lib/ # Utility libraries
│ ├── auth.ts # Authentication utilities
│ ├── sentry.ts # Sentry configuration
│ ├── storage.ts # Storage utilities
│ ├── supabase.ts # Supabase client
│ └── utils.ts # General utilities
├── scripts/ # Build and deployment scripts
│ └── test-migrations.js # Migration testing script
├── supabase/ # Supabase configuration
│ └── migrations/ # Database migrations
├── types/ # TypeScript type definitions
│ └── database.ts # Database types
├── .github/workflows/ # GitHub Actions workflows
│ ├── ci.yml # Continuous integration
│ └── supabase-migrate.yml # Database migration
├── vercel.json # Vercel configuration
└── package.json # Project dependencies
POST /api/auth- General authentication endpointPOST /api/auth/otp/send- Send OTP verification codePOST /api/auth/otp/verify- Verify OTP code
GET /api/campaigns- List campaignsPOST /api/campaigns- Create campaignGET /api/campaigns/[id]- Get campaign detailsPUT /api/campaigns/[id]- Update campaignPOST /api/campaigns/[id]/upload-video- Upload campaign videoGET /api/campaigns/categories- Get campaign categories
POST /api/donations/initiate- Initiate donationPOST /api/donations/webhook/paystack- Paystack webhook handler
POST /api/withdrawals/request- Request withdrawalPOST /api/admin/withdrawals/[id]/approve- Approve withdrawal (admin)
GET /api/fees- Get platform feesGET /api/leaderboards- Get leaderboardsPOST /api/upload/image- Upload image
- Connect your repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on push to main branch
The project is configured with separate environments for staging and production.
Database migrations are automatically applied when pushing to the main or develop branches through GitHub Actions.
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Test database migrations (staging)
npm run test:migrations
# Test database migrations (production)
npm run test:migrations:prod- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email support@assist.ng or create an issue on GitHub.