_ _ _ _
| | | | | | | |
| | ___ __ _ _ __ _ __ | |_| |_ _| |__
| | / _ \/ _` | '__| '_ \ | _ | | | | '_ \
| |____| __/ (_| | | | | | | | | | | |_| | |_) |
\_____/ \___|\__,_|_| |_| |_| \_| |_/\__,_|_.__/
LearnHub connects students and educators through video courses, enrollment, and progress tracking, built on the MERN stack.
π§ Runs locally for now. Hosting decision is still open, see Deployment.
Features Β· Tech Stack Β· Getting Started Β· Demo Accounts Β· Architecture Β· Deployment Β· Open Source Β· License
LearnHub is a course platform where teachers upload video lectures and students work through them at their own pace. Students enroll, watch content, mark sections complete, and download a PDF certificate once they finish a course. Teachers get their own dashboard to publish courses and check who's enrolled. Admins can view and delete registered users and courses via the React dashboard.
flowchart LR
A[Student] -->|Browse & Enroll| B(Course Catalog)
B --> C{Free or Paid?}
C -->|Free| D[Instant Access]
C -->|Paid| E[Mock Payment Form]
E --> D
D --> F[Video Player]
F --> G[Progress Tracking]
G --> H[Certificate PDF]
I[Teacher] -->|Create & Upload| B
I --> J[Manage Enrollments]
K[Admin] -->|Moderate| B
K --> L[User Management]
| Technology | Purpose | |
|---|---|---|
| React | Component-based UI | |
| Material UI | Tables, dashboard buttons, icons | |
| Bootstrap | Grid layouts, forms, modals |
| Technology | Purpose | |
|---|---|---|
| Vite | Dev server and build tool | |
| Axios | HTTP requests to the backend |
pie showData
title Codebase composition (by concern)
"Frontend (React/MUI/Bootstrap)" : 45
"Backend (Express/Node)" : 30
"Database layer (MongoDB/Mongoose)" : 15
"Tooling & config" : 10
|
|
|
graph TD
subgraph Student
S1[Browse courses]
S2[Mock Enroll & Pay]
S3[Watch & track progress]
S4[Download certificate]
end
subgraph Teacher
T1[Create course]
T2[Upload lectures locally]
T3[Monitor enrollments]
end
subgraph Admin
A1[Manage users]
A2[Manage courses]
end
learnhub/
β
βββ backend/ # Express API and database models
β βββ config/ # DB connection setup
β βββ controllers/ # Controller logic
β βββ middlewares/ # Auth and role verification middlewares
β βββ routers/ # Express routing files
β βββ schemas/ # Mongoose schemas
β βββ seed.js # Standalone seeding script
β βββ .env
β βββ package.json
β
βββ frontend/ # React SPA powered by Vite
βββ src/
β βββ components/ # UI components (Admin/User/Common)
β βββ App.css
β βββ App.jsx
β βββ main.jsx
βββ package.json
There's no live demo yet, so you'll need to run this locally.
git clone https://github.com/udaycodespace/learnhub.git
cd learnhub
cd backend && npm install
cd ../frontend && npm installCopy the example environment file to .env and fill in your own values:
cp backend/.env.example backend/.env# Terminal A β Backend
cd backend
npm start
# β http://localhost:5000# Terminal B β Frontend
cd frontend
npm run dev
# β http://localhost:5173Run the database seed script to populate roles, courses, and default test accounts:
cd backend
node seed.jsAfter running the seed script, you can log in immediately using these credentials:
| Role | Password | |
|---|---|---|
| Admin | learn@learnhub.com |
changethispassword |
| Teacher | teacher@learnhub.com |
teacherpassword |
| Student 1 | student1@learnhub.com |
student1password |
| Student 2 | student2@learnhub.com |
student2password |
The following features are planned for future releases or currently exist as mock/partial integrations:
- Real Payment Gateway Integration: The platform uses a mock card form that immediately enrolls the student without any real charge. Payment records (card details, status) are stored in MongoDB and accessible via a backend API route, but no React admin page reads them. Integration with Stripe or Razorpay is planned.
- Admin Activity Log Viewer: User logins are recorded to MongoDB (
ActivityLogcollection) by the backend on every login, but no React frontend component reads or displays this data. The feature exists at the data layer only. - Cloud Video Hosting (Cloudinary): Video uploads are handled locally via Multer, stored in
./uploads/on the server filesystem. Cloudinary env vars are present but the SDK is not integrated. Cloud hosting is planned.
None yet. If you build one, add it here with a short usage example:
// const { hookExports } = useCustomHook();| Command | Description |
|---|---|
npm start |
Starts the backend with nodemon |
| Command | Description |
|---|---|
npm run dev |
Starts the Vite dev server |
npm run build |
Builds the production bundle |
npm run preview |
Previews the production build locally |
Not deployed yet, and that's on purpose for now. I'd rather see how the project grows and what contributors actually need before locking in a hosting setup.
If you have thoughts on where this should live (Vercel, Render, Railway, self-hosted, or something else), open a discussion or an issue. That'll shape the decision more than me guessing upfront.
Want to help set up CI/CD once a direction is picked? Check CONTRIBUTING.md.
![]() ECSoC 2026 |
Note
β° Deadline: 16/07/2026. If these gaps aren't raised as issues by then, I'll manually go through and file them all myself β after that, you can only claim them via /assign, not report them first.
Here are a few articles that will help you get an idea of how to start contributing to open source projects: You can refer to the following articles on the basics of Git and Github.
- Watch this video to get started, if you have no clue about open source
- Forking a Repo
- Cloning a Repo
- How to create a Pull Request
- Getting started with Git and GitHub
I'm udaycodespace, and I created and maintain LearnHub.
Contributors who submit PRs will be added to the table below.
π» Code Β Β·Β π Bug fix Β Β·Β π§ͺ Tests Β Β·Β π Security Β Β·Β β‘ Performance Β Β·Β π¨ Design Β Β·Β π Docs Β Β·Β π Infrastructure Β Β·Β βΏ Accessibility Β Β·Β π Review
Distributed under the MIT License.
MIT License
Copyright (c) 2026 udaycodespace
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
See LICENSE for the full file.
```
Want me to save this to a file and drop it as an artifact/download too, or is copy-paste good for you?
