A comprehensive full-stack web application for managing national hackathons with Google OAuth authentication, team management, project submissions, and administrative controls.
- Google OAuth Authentication - Secure login with Google accounts
- Team Creation - Create teams with 2-4 members
- Member Management - Add team member details (name, email, phone)
- Project Submission - Submit project details with themes, ideology, and methodology
- Submission Tracking - Real-time status updates for project submissions
- Google OAuth Login - Must match email added by team leader
- Team Dashboard - Collaborative workspace with team information
- Submission Status - View project submission status and details
- Team Management - View all teams and member details
- Submission Management - Review and update project status (Selected/Rejected/Waiting)
- CSV Export - Download all teams and submissions data
- Bulk Email System - Send emails to selected groups (all teams, selected teams, etc.)
- Statistics Dashboard - Overview of participation and submission metrics
- Frontend: Next.js 14 with App Router, React, TailwindCSS
- Backend: Next.js API Routes
- Database: NeonDB (PostgreSQL) with Prisma ORM
- Authentication: NextAuth.js with Google OAuth
- Email: Nodemailer for bulk email functionality
- Styling: TailwindCSS with custom components
- Icons: Lucide React
- Node.js 18+
- npm or yarn
- NeonDB account
- Google OAuth credentials
- SMTP email service (Gmail recommended)
```bash git clone cd hash 2k25 npm install ```
Create a `.env` file in the root directory:
```env
DATABASE_URL="postgresql://username:[email protected]/neondb?sslmode=require"
NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-nextauth-secret-key-here"
GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret"
SMTP_HOST="smtp.gmail.com" SMTP_PORT=587 SMTP_USER="[email protected]" SMTP_PASS="your-app-password" FROM_EMAIL="hash [email protected]"
ADMIN_EMAILS="[email protected],[email protected]"
APP_NAME="Hash 2K25 Hackathon" APP_URL="http://localhost:3000" ```
- Create a NeonDB account at neon.tech
- Create a new database
- Copy the connection string to `DATABASE_URL`
```bash npx prisma generate npx prisma migrate dev --name init ```
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
- Enable 2-factor authentication on your Gmail account
- Generate an app password
- Use the app password in `SMTP_PASS`
```bash npm run dev ```
Visit `http://localhost:3000\` to see the application.
``` src/ βββ app/ β βββ api/ # API routes β β βββ auth/ # NextAuth.js β β βββ teams/ # Team management β β βββ submissions/ # Project submissions β β βββ admin/ # Admin functions β βββ dashboard/ # Team dashboard β βββ admin/ # Admin panel β βββ globals.css # Global styles βββ components/ β βββ ui/ # Reusable UI components β βββ dashboard/ # Dashboard components β βββ admin/ # Admin components β βββ ... # Landing page components βββ lib/ β βββ auth.ts # NextAuth configuration β βββ db.ts # Database connection β βββ email.ts # Email service β βββ utils.ts # Utility functions βββ types/ β βββ next-auth.d.ts # TypeScript definitions βββ prisma/ βββ schema.prisma # Database schema ```
- β Google OAuth integration with NextAuth.js
- β Role-based access control (Admin, Leader, Member)
- β Protected routes and API endpoints
- β Session management
- β Team creation with validation
- β Member email verification system
- β Team information display
- β Member status tracking
- β Comprehensive submission form
- β 16 different project themes
- β Project type selection (Software/Hardware/Both)
- β Guide information collection
- β Status tracking (Waiting/Selected/Rejected)
- β Statistics dashboard
- β Team and submission management
- β Status update functionality
- β CSV export for teams and submissions
- β Bulk email system with group targeting
- β Automated welcome emails
- β Submission confirmation emails
- β Status update notifications
- β Bulk email with group filtering
- β Email templates
- Responsive Design - Works on all devices
- Modern Interface - Clean, professional design
- Interactive Components - Smooth animations and transitions
- Accessible - WCAG compliant design patterns
- Real-time Updates - Live status updates and notifications
- OAuth Authentication - Secure Google login
- Protected API Routes - Server-side authentication checks
- Role-based Access - Granular permission system
- Input Validation - Client and server-side validation
- SQL Injection Protection - Prisma ORM with parameterized queries
The application uses a comprehensive PostgreSQL schema with:
- Users - Authentication and role management
- Teams - Team information and relationships
- TeamMembers - Member details and contact info
- ProjectSubmissions - Complete project details
- AdminEmails - Admin user management
Update your `.env` file for production:
- Change `NEXTAUTH_URL` to your domain
- Use production database URL
- Update OAuth redirect URIs
- Configure production SMTP settings
```bash npm run build npx vercel --prod ```
- Setup Admin Accounts: Add admin emails to `ADMIN_EMAILS`
- Configure Email Templates: Customize email content in `src/lib/email.ts`
- Set Registration Dates: Update timeline in landing page
- Monitor Submissions: Use admin panel for real-time tracking
- Registration: Sign in with Google account
- Team Creation: Leaders create teams and add members
- Project Submission: Submit detailed project information
- Status Tracking: Monitor submission status in dashboard
- Fork the repository
- Create your feature branch (`git checkout -b feature/AmazingFeature`)
- Commit your changes (`git commit -m 'Add some AmazingFeature'`)
- Push to the branch (`git push origin feature/AmazingFeature`)
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
Built with β€οΈ for Hash 2K25 National Hackathon