DEMO: https://eduboard-git-main-badivanas-projects.vercel.app
EduBoard is a modern, production-style e-learning platform built with the MERN stack (MongoDB, Express, React, Node.js). It started life as a static HTML site and has been rebuilt into a full application with authentication, a course catalog, enrollments, reviews, and a student dashboard.
| URL | |
|---|---|
| Web app (Vercel) | https://eduboard-git-main-badivanas-projects.vercel.app |
| API (Render) | https://eduboard-nbb0.onrender.com/api/health |
β³ The API runs on Render's free tier and sleeps after ~15 min idle, so the first request may take ~30s to wake. Subsequent requests are fast.
Try it β log in with a seeded demo account:
| Role | Password | |
|---|---|---|
| Student | student@eduboard.com |
password123 |
| Admin | admin@eduboard.com |
admin123 |
- π¨ Attractive, fully responsive UI with the EduBoard brand
- π Landing page with hero, features, featured courses & CTA
- π Course catalog with search, category filters, sorting & pagination
- π Rich course detail page β curriculum, instructor, reviews, enroll flow
- π Register / login with JWT (httpOnly cookie + bearer token)
- π Student dashboard β enrolled courses, progress tracking, profile editing
- π° Dynamic pricing page & contact form
- π Toast notifications, protected routes, loading states
- π JWT authentication with
student/instructor/adminroles - π§± RESTful API for courses, enrollments, reviews, plans, contact & users
- π‘οΈ Security hardening:
helmet, CORS, rate limiting,express-mongo-sanitize, bcrypt - β
Request validation with
express-validator - ποΈ Mongoose models with relations, virtuals, text search & auto-rating aggregation
β οΈ Centralized error handling & async wrappers- π± Seed script with demo users, courses, reviews & plans
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, React Router, Tailwind CSS, Axios, React Hot Toast |
| Backend | Node.js, Express, Mongoose, JWT, bcryptjs, express-validator |
| Database | MongoDB |
Eduboard/
βββ client/ # React + Vite frontend
β βββ src/
β β βββ api/ # Axios instance
β β βββ components/ # Navbar, Footer, CourseCard, ...
β β βββ context/ # AuthContext
β β βββ pages/ # Home, Courses, CourseDetail, Dashboard, ...
β β βββ App.jsx
β β βββ main.jsx
β βββ tailwind.config.js
β βββ vite.config.js
β
βββ server/ # Express + MongoDB backend
β βββ src/
β β βββ config/ # DB connection
β β βββ controllers/ # Route handlers
β β βββ middleware/ # auth, error, validation
β β βββ models/ # User, Course, Enrollment, Review, Plan, Contact
β β βββ routes/ # API routes
β β βββ utils/ # token, seed
β β βββ app.js
β β βββ server.js
β βββ .env.example
β
βββ package.json # Root scripts to run both apps
- Node.js β₯ 18
- MongoDB running locally (
mongodb://127.0.0.1:27017) or a MongoDB Atlas URI
git clone https://github.com/badivana/Eduboard.git
cd Eduboard
npm run install:all # installs both server and client deps# Backend
cp server/.env.example server/.env
# then edit server/.env β set MONGO_URI and a strong JWT_SECRETThe frontend needs no env in development (Vite proxies /api to the backend).
npm run seedThis creates demo accounts:
| Role | Password | |
|---|---|---|
| Admin | admin@eduboard.com | admin123 |
| Instructor | sarah@eduboard.com | password123 |
| Student | student@eduboard.com | password123 |
npm run dev:server # β http://localhost:5000 (API)
npm run dev:client # β http://localhost:5173 (web app)Open http://localhost:5173.
Base URL: http://localhost:5000/api
| Method | Endpoint | Description | Access |
|---|---|---|---|
| POST | /auth/register |
Create account | Public |
| POST | /auth/login |
Log in | Public |
| GET | /auth/me |
Current user | Auth |
| GET | /courses |
List/search/filter courses | Public |
| GET | /courses/:slug |
Course detail + reviews | Public |
| POST | /courses |
Create course | Instructor |
| POST | /enrollments |
Enroll in a course | Auth |
| GET | /enrollments/me |
My enrollments | Auth |
| PATCH | /enrollments/:id/progress |
Update progress | Auth |
| POST | /reviews |
Add/update a review | Enrolled |
| GET | /plans |
Pricing plans | Public |
| POST | /contact |
Submit contact form | Public |
| Script | Action |
|---|---|
npm run install:all |
Install server + client dependencies |
npm run seed |
Seed MongoDB with demo data |
npm run dev:server |
Start the API in watch mode |
npm run dev:client |
Start the Vite dev server |
npm run build |
Build the frontend for production |
npm start |
Start the production API server |
EduBoard is deployed as three separate services:
Browser ββ> Vercel (React SPA) ββHTTPS /apiββ> Render (Express API) ββ> MongoDB Atlas
| Piece | Host | Notes |
|---|---|---|
| Frontend | Vercel | Root dir client; needs VITE_API_URL = the Render API base URL (no trailing slash, no /api) |
| Backend | Render | Root dir server; needs MONGO_URI, CLIENT_URL, JWT_SECRET, NODE_ENV=production |
| Database | MongoDB Atlas | Network Access must allow 0.0.0.0/0 (Render uses dynamic IPs) |
π Full step-by-step guide: see DEPLOYMENT.md.
- CORS β the API only answers browsers from allowed origins.
app.jsaccepts anything inCLIENT_URL(comma-separated) plus this project's Vercel deployment URLs (*-badivanas-projects.vercel.app), so preview deploys work without reconfiguring. - Local DB β cloud DB β your local MongoDB and Atlas are separate. Production starts empty.
Seed Atlas once by pointing the seed script at it:
cd server # PowerShell: $env:MONGO_URI="<your atlas uri>"; npm run seed; Remove-Item Env:MONGO_URI # bash: MONGO_URI="<your atlas uri>" npm run seed
β οΈ The seed wipes all collections first β only run it on an empty/throwaway database, never after real users sign up.
MIT β feel free to use, modify, and distribute for educational purposes.
Prajwal B T β github.com/badivana