A complete web platform for coaching institute management built with React and Node.js. This application handles everything from student enrollment to video lectures, quizzes, and contests.
┌───────────────────────────────────────────────────────────────────┐
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ │ │ │ │ │ │
│ │ Front-end │ │ Back-end │ │ Database │ │
│ │ │ │ │ │ │ │
│ │ ReactJS │◄────►│ NodeJS │◄────►│ MongoDB │ │
│ │ │ │ │ │ │ │
│ │UI Components│ │ ExpressJS │ │ Collections │ │
│ │ │ │ │ │ │ │
│ │ API calls │ │API endpoints│ │ Documents │ │
│ │ │ │ │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────┘
erDiagram
Users ||--o{ QuizResults : takes
Users ||--o{ ContestResults : participates
Users ||--o{ Enrollments : submits
Users ||--o{ DemoBookings : books
Users ||--o{ Videos : uploads
Courses ||--o{ Videos : contains
Courses ||--o{ Enrollments : enrolls_in
Contests ||--o{ ContestResults : has
Users {
ObjectId _id PK
String name
String email UK
String password
String role
String phone
String address
Number xp
DateTime createdAt
DateTime updatedAt
}
Courses {
ObjectId _id PK
String title UK
String description
String category
Number price
String duration
String level
Boolean isActive
DateTime createdAt
DateTime updatedAt
}
Videos {
ObjectId _id PK
String title
String description
String cloudinaryId
String videoUrl
String hlsUrl
String thumbnail
Number duration
ObjectId courseId FK
String class
String chapter
ObjectId uploadedBy FK
Number views
String status
DateTime createdAt
DateTime updatedAt
}
Questions {
ObjectId _id PK
String question
Array options
String correctAnswer
String class
String chapter
Boolean isActive
DateTime createdAt
DateTime updatedAt
}
QuizResults {
ObjectId _id PK
ObjectId userId FK
String class
String chapter
Number score
Number totalQuestions
Number xpEarned
Array answers
DateTime createdAt
DateTime updatedAt
}
Contests {
ObjectId _id PK
String title UK
String description
Array questions
DateTime startTime
Number duration
DateTime endTime
String status
DateTime createdAt
DateTime updatedAt
}
ContestResults {
ObjectId _id PK
ObjectId userId FK
ObjectId contestId FK
Number score
Number totalQuestions
Number timeTaken
Array answers
Number rank
DateTime submittedAt
DateTime createdAt
DateTime updatedAt
}
Enrollments {
ObjectId _id PK
String studentName
String fatherName
String motherName
Date dateOfBirth
String gender
String aadharNumber UK
String mobileNumber
String address
String class
String board
String competitiveCourse
String status
String adminRemarks
ObjectId userId FK
DateTime createdAt
DateTime updatedAt
}
DemoBookings {
ObjectId _id PK
String studentName
String parentName
String mobileNumber
String email
String class
String subject
Date preferredDate
String preferredTime
String status
String adminRemarks
ObjectId userId FK
DateTime createdAt
DateTime updatedAt
}
This is a full-featured coaching institute website where students can enroll in courses, watch video lectures, take quizzes, and participate in contests. Admins can manage everything through a dedicated dashboard.
- Create account with email or Google
- Browse available courses
- Watch video lectures (stored on Cloudinary)
- Take chapter-wise quizzes and earn XP
- Participate in timed contests
- View leaderboards and rankings
- Track progress and quiz history
- Book free demo classes
- Submit enrollment forms
- Ask Math doubts anytime using the built-in AI Math tutor (available 24/7)
- Manage student enrollments
- Upload and organize video lectures
- Create quizzes with bulk upload (Excel/CSV)
- Schedule and manage contests
- Review demo booking requests
- Update enrollment status with remarks
- View statistics and analytics
- Automatic data backup to Google Sheets
- React 18 with Vite
- React Router for navigation
- Axios for API calls
- Context API for state management
- CSS3 for styling
- Node.js with Express
- MongoDB for database
- JWT for authentication
- Cloudinary for video storage
- Nodemailer for emails
- Google Sheets API for data backup
- Multer for file uploads
- Groq API for AI Math tutor
- Node.js (version 16 or higher)
- MongoDB (running locally or cloud)
- Cloudinary account (for videos)
- Gmail account (for sending emails)
- Google Cloud account (optional, for Sheets integration)
- Clone this repository
git clone https://github.com/Mishra-coder/Coaching_Website.git
cd Coaching_Website- Install backend dependencies
cd backend
npm install- Install frontend dependencies
cd frontend
npm install- Setup backend environment variables
Create backend/.env file:
PORT=5001
MONGODB_URI=mongodb://localhost:27017/success-mantra
JWT_SECRET=your-secret-key-here
JWT_EXPIRE=7d
FRONTEND_URL=http://localhost:3000
EMAIL_USER=your-gmail@gmail.com
EMAIL_PASSWORD=your-gmail-app-password
ADMIN_EMAIL=admin-email@gmail.com
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_CALLBACK_URL=http://localhost:5001/api/auth/google/callback
GROQ_API_KEY=your-groq-api-keyGet a free Groq API key at console.groq.com
- Setup frontend environment variables
Create frontend/.env.local file:
VITE_API_URL=http://localhost:5001/api
VITE_GOOGLE_CLIENT_ID=your-google-client-id- Start the backend server
cd backend
npm run dev- Start the frontend (in a new terminal)
cd frontend
npm run devThe app will open at http://localhost:3000
Coaching_Website/
├── frontend/
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Admin/ # Admin dashboard components
│ │ │ ├── About.jsx
│ │ │ ├── AdmissionForm.jsx
│ │ │ ├── Contests.jsx
│ │ │ ├── DemoBooking.jsx
│ │ │ ├── Home.jsx
│ │ │ ├── Login.jsx
│ │ │ ├── Navbar.jsx
│ │ │ ├── Profile.jsx
│ │ │ ├── Quiz.jsx
│ │ │ ├── SignUp.jsx
│ │ │ └── Videos.jsx
│ │ ├── context/ # React Context
│ │ ├── services/ # API service layer
│ │ ├── assets/ # Images and icons
│ │ ├── App.jsx # Main app component
│ │ └── index.css # Global styles
│ ├── index.html
│ ├── package.json
│ └── vite.config.js
│
├── backend/
│ ├── config/ # Configuration files
│ │ ├── cloudinary.js # Cloudinary setup
│ │ ├── db.js # MongoDB connection
│ │ └── googleAuth.js # Google OAuth setup
│ ├── middleware/ # Express middleware
│ │ └── auth.js # JWT authentication
│ ├── models/ # MongoDB schemas
│ │ ├── Contest.js
│ │ ├── ContestResult.js
│ │ ├── Course.js
│ │ ├── DemoBooking.js
│ │ ├── Enrollment.js
│ │ ├── Question.js
│ │ ├── QuizResult.js
│ │ ├── User.js
│ │ └── Video.js
│ ├── routes/ # API routes
│ │ ├── aiRoutes.js # AI Math tutor
│ │ ├── authRoutes.js
│ │ ├── contestRoutes.js
│ │ ├── courseRoutes.js
│ │ ├── demoBookingRoutes.js
│ │ ├── enrollmentRoutes.js
│ │ ├── questionRoutes.js
│ │ ├── quizRoutes.js
│ │ └── videoRoutes.js
│ ├── utils/ # Utility functions
│ │ ├── email.js # Email notifications
│ │ ├── emailResubmit.js # Resubmission emails
│ │ └── googleSheets.js # Google Sheets integration
│ ├── uploads/ # Temporary file storage
│ ├── server.js # Express server
│ └── package.json
│
├── .gitignore
└── README.md
Admin access is protected. Contact the repository owner to get admin credentials.
- Login as admin
- Go to Admin Dashboard → Video Manager
- Click "Upload Video"
- Select video file, add title and description
- Video will be uploaded to Cloudinary automatically
- Go to Admin Dashboard → Question Manager
- Either add questions manually or bulk upload via Excel/CSV
- Questions will be available for students immediately
- Go to Admin Dashboard → Contest Manager
- Create contest with title, duration, and start time
- Add questions manually or bulk upload
- Students can participate during the contest window
A built-in Math doubt-solving chatbot for students, powered by Groq (free tier) using the llama-3.3-70b-versatile model.
- Floating chat button on every page — login required to use
- Answers Class 10 and Class 12 Math questions with step-by-step solutions
- Replies in the same language the student uses (Hindi, English, or Hinglish)
- Remembers the full conversation so follow-up questions work correctly
- Chat history saved in browser (localStorage) — students can revisit old chats
- Hidden during quizzes and contests to avoid distractions
POST /api/auth/register- Create new accountPOST /api/auth/login- LoginPOST /api/auth/admin-register- Admin signupGET /api/auth/me- Get current userPUT /api/auth/profile- Update profile
GET /api/videos- Get all videosGET /api/videos/:id- Get single videoPOST /api/videos/upload- Upload video (admin)DELETE /api/videos/:id- Delete video (admin)
GET /api/questions- Get questions by class/chapterPOST /api/quiz/submit- Submit quiz answersGET /api/quiz/history- Get user quiz history
GET /api/contests- Get all contestsGET /api/contests/active- Get active contestsPOST /api/contests/:id/submit- Submit contestGET /api/contests/:id/leaderboard- Get rankings
POST /api/enrollments- Submit enrollment formGET /api/enrollments- Get all enrollments (admin)PUT /api/enrollments/:id/status- Update status (admin)
POST /api/ai/doubt- Send a Math doubt and get a step-by-step AI response (requires login)
cd backend
npm run devServer runs on http://localhost:5001
cd frontend
npm run devApp runs on http://localhost:3000
Frontend:
cd frontend
npm run buildDevendra Mishra
GitHub: @Mishra-coder
Built with ❤️ for Success Mantra Institute