A comprehensive Next.js platform connecting volunteers with NGOs for disaster relief campaigns. Built with modern web technologies to facilitate efficient disaster response and community support.
- User Registration & Authentication - Secure signup with role-based access
- Advanced Campaign Discovery - Filter by location, disaster type, urgency, and skills
- Application System - Easy application process for disaster relief campaigns
- Profile Management - Skills, availability, and impact tracking
- Real-time Chat - Coordinate with NGOs and other volunteers during campaigns
- Certificate Generation - Earn and download certificates for completed campaigns
- Impact Dashboard - Track hours served, campaigns participated, and ratings
- Review System - Rate and review campaigns and NGOs
- Organization Registration - NGO verification and approval system
- Campaign Management - Create, edit, and manage disaster relief campaigns
- Volunteer Coordination - Review applications and manage volunteer assignments
- Real-time Communication - Chat with approved volunteers during campaigns
- Analytics Dashboard - Comprehensive reporting on campaign performance
- Resource Management - Track equipment, supplies, and volunteer hours
- Impact Reporting - Generate reports on disaster relief efforts
- NGO Verification - Approve/reject NGO registrations
- User Management - Oversee platform users and activities
- System Analytics - Platform-wide statistics and insights
- Interactive Maps - Visualize campaign locations with Leaflet
- File Upload System - Profile pictures and campaign images
- Email Notifications - Automated emails for important updates
- Real-time Notifications - In-app notifications with read status
- Mobile Responsive - Optimized for all device sizes
- Multi-role Authentication - Separate dashboards for volunteers, NGOs, and admins
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- State Management: React Hooks
- Forms: React Hook Form + Zod validation
- Real-time: Socket.IO Client
- Runtime: Node.js
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js
- Email: Nodemailer
- File Upload: Multer
- Real-time: Socket.IO Server
- PDF Generation: jsPDF
- Deployment: Vercel/Netlify ready
- Linting: ESLint
- Code Formatting: Prettier
- Testing: Jest (setup ready)
- Database Management: Prisma Studio
- Node.js 18.0 or higher
- PostgreSQL 13.0 or higher
- npm or yarn package manager
- Git for version control
-
Clone the repository
git clone https://github.com/your-username/revive-nextjs.git cd revive-nextjs -
Install dependencies
npm install # or yarn install -
Set up environment variables
Create a
.envfile in the root directory:# Database DATABASE_URL="postgresql://username:password@localhost:5432/revive" # NextAuth.js NEXTAUTH_SECRET="your-super-secret-key-here" NEXTAUTH_URL="http://localhost:3000" # Email Configuration (optional) SMTP_HOST="smtp.gmail.com" SMTP_PORT="587" SMTP_USER="your-email@gmail.com" SMTP_PASSWORD="your-app-password" # Socket.IO (optional) NEXT_PUBLIC_SOCKET_URL="http://localhost:3000"
-
Set up the database
# Generate Prisma client npx prisma generate # Run database migrations npx prisma migrate dev # (Optional) Seed the database npx prisma db seed
-
Create upload directories
mkdir -p public/uploads/profiles mkdir -p public/uploads/campaigns
-
Run the development server
npm run dev # or yarn dev -
Open your browser
Navigate to http://localhost:3000
revive-nextjs/
βββ app/ # Next.js App Router
β βββ admin/ # Admin dashboard pages
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ campaigns/ # Campaign management
β β βββ chat/ # Real-time chat system
β β βββ certificates/ # Certificate generation
β β βββ ...
β βββ campaigns/ # Campaign pages
β βββ explore/ # Campaign discovery
β βββ login/ # Authentication pages
β βββ ngo/ # NGO dashboard
β βββ profile/ # Volunteer profile
βββ components/ # React components
β βββ campaigns/ # Campaign components
β βββ chat/ # Chat system components
β βββ home/ # Homepage components
β βββ navigation/ # Navigation components
β βββ notifications/ # Notification components
β βββ profile/ # Profile components
β βββ ui/ # Reusable UI components
βββ lib/ # Utility functions
β βββ auth.ts # Authentication config
β βββ certificate.ts # Certificate generation
β βββ email.ts # Email utilities
β βββ notifications.ts # Notification system
β βββ prisma.ts # Database client
βββ prisma/ # Database schema & migrations
β βββ schema.prisma # Database schema
β βββ migrations/ # Database migrations
βββ public/ # Static assets
β βββ uploads/ # User uploaded files
βββ types/ # TypeScript type definitions
β βββ next-auth.d.ts # NextAuth type extensions
βββ server.js # Custom server with Socket.IO
βββ tailwind.config.ts # Tailwind CSS configuration
βββ next.config.js # Next.js configuration
βββ package.json # Dependencies & scripts
The application uses Prisma ORM with PostgreSQL. Key models include:
- User - Authentication and role management
- Volunteer - Volunteer profiles and skills
- NGO - Organization profiles and verification
- Campaign - Disaster relief campaigns
- Application - Volunteer applications to campaigns
- Chat - Real-time messaging between users
- CheckIn - Volunteer location check-ins
- VolunteerHours - Time tracking for campaigns
- Task - Campaign task management
- Resource - Equipment and supply tracking
- Review - Campaign and NGO reviews
- Certificate - Achievement certificates
- Badge - Volunteer achievement badges
- Notification - In-app notifications
POST /api/auth/signin- User sign inPOST /api/auth/signup- User registrationPOST /api/auth/signout- User sign out
GET /api/campaigns- List campaigns with filtersPOST /api/campaigns- Create new campaign (NGO only)GET /api/campaigns/[id]- Get campaign detailsPUT /api/campaigns/[id]- Update campaign (NGO only)DELETE /api/campaigns/[id]- Delete campaign (NGO only)
GET /api/applications- Get user's applicationsPOST /api/applications- Apply to campaignPUT /api/applications/[id]/status- Update application status (NGO only)
GET /api/chat?campaignId=X- Get chat messagesPOST /api/chat- Send messagePOST /api/chat/read- Mark messages as read
GET /api/certificates- Get user's certificatesGET /api/certificates/campaigns- Get eligible campaigns for certificatesPOST /api/certificates/generate- Generate certificate
/api/notifications- Notification management/api/upload- File upload handling/api/analytics/*- Analytics and reporting
- Primary: Coral Pink (#E27872) - Warm and approachable
- Secondary: Soft Gold (#F8D57E) - Trust and reliability
- Background: Cream (#FFF7E5) - Calming and professional
- Text: Dark Charcoal (#2F2F2F) - High contrast and readability
- Body: Outfit (sans-serif) - Clean and modern
- Headings: Prata (serif) - Elegant and trustworthy
- Buttons: Consistent styling with hover states
- Forms: Accessible forms with validation
- Cards: Clean layouts with proper spacing
- Navigation: Intuitive navigation patterns
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Set up PostgreSQL database (e.g., Neon, Supabase)
- Deploy automatically on push
-
Build the application:
npm run build
-
Start production server:
npm start
DATABASE_URL="postgresql://user:pass@host:5432/db"
NEXTAUTH_SECRET="your-production-secret"
NEXTAUTH_URL="https://your-domain.com"
SMTP_HOST="smtp.your-provider.com"
SMTP_PORT="587"
SMTP_USER="noreply@your-domain.com"
SMTP_PASSWORD="your-smtp-password"We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure code passes linting