A production-grade Learning Management System built for CS students preparing for placements. Combines video courses, multi-category practice tests, company-wise interview prep, and separate educator/student dashboards β all in one platform.
π Live Demo Β β’Β πΈ Screenshots Β β’Β βοΈ Setup Β β’Β ποΈ Architecture
Add your actual screenshots in a
/screenshotsfolder and update the paths below.
| Home Page | Course Player |
|---|---|
![]() |
![]() |
| Practice Tests | Company Interview Prep |
|---|---|
![]() |
![]() |
| Educator Dashboard | Student Enrollments |
|---|---|
![]() |
![]() |
- Video Courses β Watch YouTube-embedded lectures directly inside the platform (no redirect)
- Chapter-wise Progress β Track completed lectures with a visual progress bar
- Free & Paid Courses β Free courses enroll instantly; paid courses go through Stripe Checkout
- Practice Tests β 4 categories Γ 50 levels Γ 15 questions each
- Company Interview Prep β 70+ companies grouped by sector (MAANG, Fintech, Startups, etc.)
- My Enrollments β All enrolled courses in one place with resume support
- Ratings β Rate courses with a star rating system
- Course Builder β Add courses with chapters, lectures, thumbnails, and pricing
- Student Analytics β See total enrollments, earnings, and student list
- Publish / Unpublish β Control course visibility with a toggle
- Manage Courses β Full CRUD (create, edit, delete) from the admin panel
- Clerk Authentication β Social login, JWT-secured API, auto user creation
- Stripe Payments β Checkout sessions, webhook-verified enrollment
- Cloudinary β Image & thumbnail uploads
- Role-based Access β Student / Educator / Admin roles
- Responsive Design β Works on mobile, tablet, and desktop
csedge/
βββ client/ # React Frontend (Vite)
β βββ src/
β β βββ pages/
β β β βββ student/ # Home, CourseList, CourseDetails, Player, MyEnrollments
β β β βββ educator/ # Dashboard, MyCourses, AddCourse, StudentEnrolled
β β β βββ AptitudeTest.jsx # 50-level aptitude tests
β β β βββ CodingTest.jsx # DSA coding challenges
β β β βββ DevTest.jsx # Full-stack dev questions
β β β βββ CompanyInterview.jsx # Company-wise prep (6 categories, 70+ companies)
β β βββ components/
β β β βββ student/ # Navbar, CourseCard, CoursesSection, Hero, Footer
β β β βββ educator/ # Sidebar, Navbar, Dashboard widgets
β β βββ context/
β β β βββ AppContext.jsx # Global state β courses, user, auth helpers
β β βββ admin/
β β β βββ AdminCourses.jsx # Full CRUD course management panel
β β βββ utils/
β β βββ axios.js # Axios instance with base URL
β
βββ server/ # Node.js + Express Backend
βββ models/
β βββ user.js # User schema (enrolledCourses, role)
β βββ course.js # Course β chapters β lectures (nested)
β βββ Purchase.js # Stripe purchase records
β βββ CourseProgress.js # Per-user lecture completion tracking
β βββ TestAttempt.js # Test session records
β βββ TestProgress.js # Level unlock tracking
β βββ ExternalProblem.js # User-saved problem links
βββ controllers/
β βββ userController.js # Auth, enrollment, progress, ratings
β βββ courseController.js # Course CRUD, publish toggle
β βββ educatorController.js # Educator stats and management
β βββ testController.js # Questions, attempts, scoring
β βββ adminController.js # Admin-level overrides
β βββ webhooks.js # Stripe webhook handler
βββ routes/
β βββ app-user-routes.js
β βββ app-course-routes.js
β βββ app-educator-routes.js
β βββ app-test-routes.js
β βββ app-admin-routes.js
β βββ app-company-articles-routes.js
βββ middleware/
β βββ authMiddleware.js # Clerk requireAuth + role protection
βββ server.js # Express app entry point
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 18 + Vite | UI framework with fast HMR |
| Styling | Tailwind CSS | Utility-first responsive design |
| Routing | React Router v6 | Client-side navigation |
| Auth | Clerk | JWT auth, OAuth, session management |
| State | React Context API | Global course/user state |
| Backend | Node.js + Express | REST API server |
| Database | MongoDB + Mongoose | Document storage for nested data |
| Payments | Stripe | Checkout sessions + webhooks |
| Media | Cloudinary | Thumbnail/image hosting |
| Video | YouTube Embed API | In-platform video playback |
| Icons | Lucide React | Consistent icon library |
| Notifications | React Toastify | User feedback toasts |
| Deployment | Vercel (client) + Railway/Render (server) | Cloud hosting |
{
courseTitle: String,
courseDescription: String, // Rich HTML
courseThumbnail: String, // Cloudinary URL
coursePrice: Number,
discount: Number, // 0β100 percent
isPublished: Boolean,
educator: String, // Clerk userId
enrolledStudents: [String],
courseRatings: [{ userId, rating }],
courseContent: [{ // Chapters
chapterId, chapterTitle, chapterOrder,
chapterContent: [{ // Lectures
lectureId, lectureTitle, lectureUrl, // YouTube embed URL
lectureDuration, isPreviewFree, lectureOrder
}]
}]
}{
_id: String, // Clerk userId
name, email, imageUrl,
enrolledCourses: [ObjectId], // ref: Course
role: String // student | educator | admin
}{
courseId, userId,
amount: Number, // 0 for free courses
status: String, // pending | completed | failed
stripeSessionId: String
}- Node.js 18+
- MongoDB (local or Atlas)
- Clerk account β clerk.com
- Stripe account β stripe.com
- Cloudinary account β cloudinary.com
git clone https://github.com/YOUR_USERNAME/csedge.git
cd csedgecd server
npm installCreate server/.env:
MONGODB_URI=mongodb+srv://your-cluster-url
CLERK_SECRET_KEY=sk_test_xxxxxxxxxxxx
STRIPE_SECRET_KEY=sk_test_xxxxxxxxxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxxxxxxxxx
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
CURRENCY=inr
PORT=5000npm run devcd ../client
npm installCreate client/.env.local:
VITE_CLERK_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxx
VITE_BACKEND_URL=http://localhost:5000npm run devcd server
node scripts/seedCourses.jsThis seeds 4 real YouTube playlist courses:
- β‘ Namaste JavaScript (Akshay Saini)
- βοΈ Chai aur React (Hitesh Choudhary)
- π» DSA with C++ (Apna College)
- π Full Stack Web Dev Bootcamp
# Install Stripe CLI
stripe listen --forward-to localhost:5000/stripe| Method | Endpoint | Description |
|---|---|---|
| GET | /data |
Get current user profile |
| GET | /enrolled-courses |
Get all enrolled courses |
| POST | /purchase |
Create Stripe checkout session |
| POST | /enroll-free |
Directly enroll in a free course |
| POST | /update-course-progress |
Mark lecture as completed |
| POST | /get-course-progress |
Get progress for a course |
| POST | /add-rating |
Rate a course (1β5 stars) |
| GET | /dashboard |
Get test stats and course counts |
| Method | Endpoint | Description |
|---|---|---|
| GET | /all |
Get all published courses |
| GET | /:id |
Get single course with content |
| Method | Endpoint | Description |
|---|---|---|
| GET | /courses |
Get educator's own courses |
| POST | /add-course |
Create new course |
| PUT | /update-course/:id |
Update course details |
| DELETE | /delete-course/:id |
Delete a course |
| GET | /dashboard |
Get earnings and enrollments |
| Method | Endpoint | Description |
|---|---|---|
| GET | /questions |
Get questions by type and level |
| POST | /attempt |
Submit test answers |
| GET | /progress/:type |
Get unlocked levels |
4 Categories Γ 50 Levels Γ 15 Questions = 3,000+ Questions
βββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββ
β Category β Coverage β
βββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ€
β Aptitude β Quant, Verbal, Logical Reasoning β
β DSA & Coding β Arrays β Graphs β DP (50 levels) β
β Full Stack Dev β HTML/CSS/JS/React/Node/MongoDB β
β Company-wise β Google, Amazon, Microsoft, etc. β
βββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββ
Level unlock: Score β₯ 70% to unlock the next level
User visits app
β
βΌ
Clerk handles login (Google / GitHub / Email)
β
βΌ
JWT token stored in browser
β
βΌ
Every API request: Authorization: Bearer <token>
β
βΌ
Server: requireAuth() middleware validates token
β
βΌ
req.auth().userId β fetch/create user in MongoDB
Student clicks "Buy Now"
β
βΌ
POST /api/user/purchase
β
ββ Free course (price = 0)?
β β
β βΌ
β POST /api/user/enroll-free
β β Add to enrolledCourses directly
β β Redirect to Player
β
ββ Paid course?
β
βΌ
Stripe Checkout Session created
β
βΌ
User completes payment on Stripe
β
βΌ
Stripe webhook β /stripe
β
βΌ
Purchase status β "completed"
User.enrolledCourses updated
β
βΌ
Redirect to My Enrollments
Contributions are welcome! Here's how:
# Fork the repo, then:
git checkout -b feature/your-feature-name
git commit -m "feat: add your feature"
git push origin feature/your-feature-name
# Open a Pull RequestPlease follow Conventional Commits for commit messages.
This project is licensed under the MIT License β see the LICENSE file for details.
Satyam Kumar
β Star this repo if you found it helpful! β
Built with β€οΈ for CS students aiming for their dream companies





