A comprehensive full-stack platform for mentorship, task management, and collaborative learning. Built with modern web technologies, Hustle Haveli connects mentors and students through task assignments, peer reviews, and contribution tracking.
- Tirth Patel - 20244125
- Anushka Gupta - 20244032
- Shreya Saxena - 20244153
- Aditya Kanodia - 20244012
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Configuration
- Running the Application
- API Documentation
- Project Modules
- Key Features by Role
- Contributing
- License
- User Authentication: Secure Email/Password authentication with OTP verification
- Role-Based Access Control: Student, Mentor, and Admin roles with specific permissions
- Task Management: Create, assign, and track tasks with difficulty levels and deadlines
- Contribution System: Earn points and track activity across tasks, reviews, and comments
- Submission & Review System: Submit solutions and receive feedback from mentors
- Referral System: Earn rewards through student referrals with admin approval
- Mentor Profiles: Detailed mentor profiles with expertise areas and student count
- Task Comments: Nested comments on tasks for discussions and feedback
- PDF Generation: Generate task submissions and reports as PDFs
- File Upload: Secure file uploads via Cloudinary integration
- Analytics Dashboard: Track progress and performance metrics
- Admin Dashboard: Manage users, tasks, and referrals
- Critical Issue Tracking: Flag and resolve task-related issues
- Next.js: React framework with App Router
- React 19: UI library
- TypeScript: Type-safe code
- Tailwind CSS 4: Utility-first CSS framework
- Axios: HTTP client for API calls
- Lucide React: Icon library
- ESLint: Code quality and linting
- Node.js + Express.js: Web server framework
- TypeScript: Type-safe backend code
- MongoDB + Mongoose: NoSQL database and ODM
- JWT: Token-based authentication
- Bcrypt: Password hashing
- Cloudinary: Cloud storage for file uploads
- PDFKit: PDF generation
- Nodemailer / Brevo: Email sending
- Multer: File upload middleware
- Morgan: HTTP request logging
- Helmet: HTTP security headers
- Compression: Response compression
- Cookie Parser: Cookie handling
- Nodemon: Auto-restart on file changes
- ts-node-dev: TypeScript development server
- ESLint: Code linting
- TypeScript Compiler: Type checking
hustle-haveli/
βββ client/ # Next.js frontend application
β βββ src/
β β βββ app/ # App Router pages and layouts
β β β βββ admin/ # Admin dashboard pages
β β β βββ auth/ # Authentication pages
β β β βββ dashboard/ # Dashboard pages
β β β βββ mentor/ # Mentor-specific pages
β β β βββ student/ # Student-specific pages
β β βββ components/ # Reusable React components
β β βββ context/ # React context (Auth, etc.)
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility functions (API clients)
β β βββ api/ # API call functions
β β βββ types/ # TypeScript type definitions
β βββ public/ # Static assets
β βββ package.json
β
βββ server/ # Express.js backend application
β βββ src/
β β βββ app.ts # Express app setup
β β βββ server.ts # Server entry point
β β βββ config.ts # Main configuration
β β βββ config/ # Configuration files
β β β βββ db.ts # MongoDB connection
β β β βββ cloudinary.ts # Cloudinary config
β β βββ controllers/ # Request handlers
β β βββ models/ # MongoDB Mongoose models
β β β βββ Contribution.ts
β β β βββ MentorProfile.ts
β β β βββ MentorSystem.ts
β β β βββ Notification.ts
β β β βββ Referral.ts
β β β βββ StudentProfile.ts
β β β βββ Task.ts
β β β βββ TaskComment.ts
β β β βββ User.ts
β β βββ routes/ # API route definitions
β β βββ middleware/ # Express middleware
β β βββ lib/ # Utility functions
β β βββ types/ # TypeScript types
β β βββ utils/ # Helper utilities
β β βββ createJwt.ts
β β βββ generatePdf.ts
β βββ package.json
β
βββ package.json # Root package.json
- Stores user account information
- Roles: STUDENT, MENTOR, ADMIN
- Supports email authentication with OTP-based verification
- Created by mentors for students to complete
- Statuses: PENDING, ACTIVE, APPROVED, REJECTED, REMOVED
- Includes difficulty levels, tech stack, and deadlines
- Extended student information
- Tracks completed tasks and referral status
- Mentor expertise and bio
- Tracks mentored students and system status
- Student task submissions with solutions
- Supports multiple submission attempts
- Tracks approval status and feedback
- Nested comments on tasks
- Discussion and feedback tracking
- Tracks user contributions and activity points
- Types: TASK, REVIEW, COMMENT, MESSAGE
- Student referral tracking for rewards
- Admin approval workflow
- User notifications and alerts
- Event-driven notifications
- Node.js: v20.0 or higher recommended
- npm: v9.0 or higher
- MongoDB: v6.0 or higher (local or cloud)
- Git: For cloning the repository
- Cloudinary: For file uploads (https://cloudinary.com)
- Email Service: For sending notifications (Brevo/SendGrid/Gmail)
git clone https://github.com/anushkagupta-06/hustle-haveli.git
cd hustle-haveliInstall server dependencies:
cd server
npm install
cd ..Install client dependencies:
cd client
npm install
cd ..Create a .env file in the server directory:
# Database
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/hustle-haveli
DB_NAME=hustle-haveli
# Authentication
JWT_SECRET=your_jwt_secret_key_here_minimum_32_characters
JWT_EXPIRY=7d
# Cloudinary (for file uploads)
CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Email Service
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
SENDER_EMAIL=noreply@hustlehaveli.com
# Server
PORT=3001
NODE_ENV=development
FRONTEND_URL=http://localhost:3000Create a .env file in the client directory:
NEXT_PUBLIC_API_URL=http://localhost:3001Terminal 1 - Start the Backend Server
cd server
npm run devThe server will start on http://localhost:3001
Terminal 2 - Start the Frontend Application
cd client
npm run devThe frontend will start on http://localhost:3000
After both services are running, verify the setup:
curl http://localhost:3001/api/health
# Expected response: {"status":"ok"}Backend:
cd server
npm run build
npm startFrontend:
cd client
npm run build
npm start- Development:
http://localhost:3001/api - Production:
https://your-domain.com/api
/api/auth- Authentication & Registration/api/mentors- Mentor Management/api/students- Student Profiles/api/tasks- Task Management/api/submissions- Task Submissions/api/referrals- Referral Program/api/comments- Task Comments/api/contributions- User Contributions & Points/api/admin/tasks- Admin Task Approvals/api/admin/referrals- Admin Referral Approvals
- Multi-factor authentication support
- JWT-based session management
- Email verification with OTP
- Password hashing with bcrypt
- Hierarchical task creation and management
- Task status workflow
- Difficulty-based filtering (EASY, MEDIUM, HARD)
- Deadline tracking
- Critical issue resolution
- Multi-submission support
- PDF export of submissions
- Mentor feedback system
- Approval workflow
- Comment system for feedback
- Student referral tracking
- Admin approval system
- Reward calculation
- Referral history and statistics
- User management
- Task approval workflow
- Referral approval
- Analytics and reporting
- Point-based contribution tracking
- Recognizing valuable actions (Tasks, Reviews, Comments)
- Browse available tasks
- Create project submissions
- Receive feedback from mentors
- Track progress and achievements
- Earn rewards through referrals
- Track contributions and points
- Create and manage tasks
- Assign tasks to students
- Review submissions and provide feedback
- Manage mentee profiles
- Track mentoring statistics
- Manage users and roles
- Approve/reject tasks
- Manage referral program
- View platform analytics
- Moderate content
- Password Hashing: Bcrypt with salt rounds
- JWT Authentication: Secure token-based auth with expiry
- CORS Protection: Configured allowed origins
- Helmet.js: HTTP header security
- Input Validation: Server-side validation
- Rate Limiting: Prevents abuse
- Role-Based Authorization: Middleware-based access control
- Secure Cookies: HttpOnly and SameSite flags
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a 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 ISC License - see the LICENSE file for details.