A comprehensive platform for managing student communities, events, and engagement tracking built with Next.js 15, MongoDB, and Firebase.
- Authentication & Registration: Email/password and Google OAuth via Firebase
- Profile Management: Complete profile setup with skills, college, and social links
- Dashboard: Overview of sessions, events, badges, and networking suggestions
- Event Participation: Join workshops, sessions, and meetups
- Badge System: Earn badges for attendance, volunteering, and contributions
- Networking: Connect with other students and build professional relationships
- Points System: Track engagement and climb the leaderboard
- Student Management: Approve/verify students, view/edit profiles
- Event Management: Create and schedule sessions, workshops, and meetups
- Attendance Tracking: QR code and digital check-in systems
- Engagement Analytics: Comprehensive reports and metrics
- Communication Tools: Send announcements via multiple channels
- Performance Monitoring: Track student engagement and identify top performers
- Frontend: Next.js 15 (App Router), TypeScript, Tailwind CSS v4
- Authentication: Firebase Authentication
- Database: Firebase Firestore (NoSQL)
- State Management: React Context API
- UI Components: Lucide React icons, React Hook Form
- Notifications: React Hot Toast
- Styling: Tailwind CSS with custom design system
src/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ users/ # User management
β β βββ events/ # Event management
β β βββ admin/ # Admin-specific endpoints
β βββ dashboard/ # Student dashboard
β βββ admin/ # Admin dashboard
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
βββ components/ # Reusable UI components
βββ contexts/ # React contexts
β βββ AuthContext.tsx # Authentication context
βββ lib/ # Utility libraries
β βββ firebase.ts # Firebase configuration
β βββ firebase-admin.ts # Firebase Admin SDK
β βββ utils.ts # Helper functions
βββ types/ # TypeScript type definitions
βββ index.ts # Main type definitions
- Node.js 18+
- Firebase project
- npm or yarn
-
Clone the repository
git clone <repository-url> cd codesapiens
-
Install dependencies
npm install
-
Set up environment variables
cp env.example .env.local
Fill in your configuration values in
.env.local:- Firebase configuration
- MongoDB connection string
- Other optional services
-
Set up Firebase
- Create a new Firebase project
- Enable Authentication (Email/Password and Google)
- Get your configuration from Project Settings
- Update
.env.localwith your Firebase config
-
Set up Firebase Firestore
- Enable Firestore Database in your Firebase project
- Set up security rules (see
firestore.rules) - Deploy security rules:
firebase deploy --only firestore:rules
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Go to Firebase Console
- Create a new project
- Enable Authentication with Email/Password and Google providers
- Get your project configuration from Project Settings > General
- Update your
.env.localfile
-
Enable Firestore Database
- Go to your Firebase Console
- Navigate to Firestore Database
- Click "Create Database"
- Choose production or test mode
- Select a location for your database
-
Configure Security Rules
- Use the provided
firestore.rulesfile - Deploy rules:
firebase deploy --only firestore:rules
- Use the provided
-
Set up Firebase Admin SDK
- Go to Project Settings > Service Accounts
- Generate new private key
- Download the JSON file
- Update your
.env.localwith the credentials
The platform uses the following Firestore collections:
- users: Student and admin user profiles
- events: Workshops, sessions, and meetups
- attendance: Event attendance records
- badges: Achievement badges and requirements
- user_badges: User badge assignments
- messages: Internal messaging system
- announcements: Platform announcements
- Registration: Users sign up with email/password or Google OAuth
- Verification: Email verification via Firebase
- Approval: Students require admin approval (admins are auto-approved)
- Login: Authenticated users access their respective dashboards
POST /api/auth/login- User loginPOST /api/auth/signup- User registrationPOST /api/auth/google- Google OAuth
GET /api/users- List users with filtersPOST /api/users- Create userGET /api/users/[uid]- Get specific userPATCH /api/users/[uid]- Update userDELETE /api/users/[uid]- Delete user
GET /api/events- List events with filtersPOST /api/events- Create event
GET /api/admin/analytics- Platform analyticsPATCH /api/admin/users/[uid]/approve- Approve/reject users
The platform uses a modern, responsive design with:
- Gradient backgrounds and card-based layouts
- Responsive grid systems for all screen sizes
- Interactive elements with hover states and transitions
- Consistent color scheme (blue, purple, green, orange)
- Professional typography using Geist fonts
- Push your code to GitHub
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push
- Netlify: Similar to Vercel
- Railway: Good for full-stack apps
- DigitalOcean: For custom server setup
- Firebase Authentication with secure token management
- Firestore Security Rules with database-level access control
- Role-based access control (Student vs Admin)
- Input validation and sanitization
- Secure API endpoints with proper error handling
- Built-in security with Google's enterprise-grade infrastructure
The platform is fully responsive and works on:
- Desktop computers
- Tablets
- Mobile phones
- All modern browsers
# Run linting
npm run lint
# Build for production
npm run build
# Start production server
npm start- 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
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues:
- Check the Issues page
- Create a new issue with detailed description
- Include your environment details and error logs
- Next.js team for the amazing framework
- Firebase for authentication services
- MongoDB for the database
- Tailwind CSS for the styling system
- All contributors and community members
Built with β€οΈ for the student community