Flux is an expert consultation platform that helps students and freelancers get affordable, fast, and personalized advice from industry experts, all through a simple pay-per-minute model.
- Video Conferencing - High-quality video calls powered by Stream.io
- Real-time Chat - WebSocket-based messaging with file sharing
- Mentor Discovery - Advanced search and filtering system
- Payment Integration - Secure wallet system with Razorpay
- Email Notifications - Automated communication system
- OAuth Authentication - Google OAuth 2.0 integration
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose
- Authentication: Passport.js (Google OAuth)
- Payments: Razorpay
- File Storage: Cloudinary
- Real-time: WebSockets (ws)
- Video/Chat: Stream.io SDK
- Email: Nodemailer with Handlebars
- Framework: React.js + Vite
- Styling: Tailwind CSS
- Forms: React Hook Form + Zod
- HTTP Client: Axios
- Routing: React Router DOM
- Node.js 18+
- MongoDB
- npm or yarn
cd backend
npm install
cp .env.example .env
# Configure environment variables in .env
npm run dev
cd frontend
npm install
cp .env.example .env
# Configure environment variables in .env
npm run dev
-
Start the backend server:
cd backend && npm run dev
-
Start the frontend development server:
cd frontend && npm run dev
-
Access the application:
- Frontend:
http://localhost:5173
- Backend API:
http://localhost:3000
- Frontend:
Method | Endpoint | Description |
---|---|---|
GET |
/api/auth/google |
Initiate Google OAuth |
GET |
/api/auth/google/callback |
Handle Google OAuth callback |
GET |
/api/auth/current-user |
Get authenticated user info |
GET |
/api/auth/logout |
Logout user |
Method | Endpoint | Description | Auth |
---|---|---|---|
GET |
/api/user/ |
Get all users | Admin |
PUT |
/api/user/profile |
Update user profile | User |
DELETE |
/api/user/:userId |
Delete user | Admin |
Method | Endpoint | Description | Auth |
---|---|---|---|
GET |
/api/mentor/mentordata |
Get mentors with filters | Public |
GET |
/api/mentor/profile/:mentorId |
Get mentor profile | Public |
POST |
/api/mentor/onboard |
Submit mentor application | User |
GET |
/api/mentor/applications/pending |
Get pending applications | Admin |
PUT |
/api/mentor/application/:mentorId |
Approve/reject mentor | Admin |
PUT |
/api/mentor/profile |
Update mentor profile | Mentor |
GET |
/api/mentor/availability |
Get mentor availability | Mentor |
PUT |
/api/mentor/availability |
Update mentor availability | Mentor |
PUT |
/api/mentor/online-status |
Update online status | Mentor |
area
- Filter by mentoring areamaxRate
- Maximum rate per minuteexperience
- Minimum years of experiencesearch
- Search in name, headline, biopage
- Page number for paginationlimit
- Items per page
Method | Endpoint | Description | Auth |
---|---|---|---|
POST |
/api/session/book |
Book a session with mentor | User |
POST |
/api/session/:sessionId/start |
Start session | Mentor |
POST |
/api/session/:sessionId/end |
End session | User/Mentor |
GET |
/api/session/:sessionId |
Get session details | User/Mentor |
GET |
/api/session/my-sessions |
Get user's sessions | User |
PUT |
/api/session/:sessionId/status |
Update session status | User/Mentor |
POST |
/api/session/:sessionId/feedback |
Add session feedback/rating | Student |
Method | Endpoint | Description | Auth |
---|---|---|---|
GET |
/api/payment/wallet-balance |
Get wallet balance | User |
GET |
/api/payment/transactions |
Get transaction history | User |
POST |
/api/payment/create-order |
Create Razorpay order | User |
POST |
/api/payment/verify |
Verify payment | User |
POST |
/api/payment/deduct |
Deduct from wallet | User |
page
- Page number for paginationlimit
- Items per page
Method | Endpoint | Description | Auth |
---|---|---|---|
GET |
/api/stream/tokens/:sessionId |
Get Stream tokens for session | User/Mentor |
POST |
/api/stream/init/:sessionId |
Initialize session channels | User/Mentor |
POST |
/api/stream/chat/message/:sessionId |
Store chat message | User/Mentor |
Method | Endpoint | Description | Auth |
---|---|---|---|
POST |
/api/upload/:sessionId/upload |
Upload file to session | User/Mentor |
flux/
├── backend/ # Node.js/Express API Server
│ ├── config/ # Configuration files
│ ├── middleware/ # Custom middleware
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── services/ # Business logic services
│ ├── utils/ # Utility functions
│ └── views/ # Email templates
└── frontend/ # React.js Client
├── src/
│ ├── components/ # Reusable components
│ ├── pages/ # Page components
│ ├── hooks/ # Custom hooks
│ ├── store/ # State management
│ └── lib/ # Utilities
└── public/ # Static assets
This project is licensed under the ISC License - see the LICENSE file for details.
Made with ❤️ for the mentorship community