Full‑stack E‑Learning Platform (React + Vite frontend, Node.js + Express backend, PostgreSQL)
A Coursera‑inspired project where users can register, log in, browse courses, and access a personalized dashboard with progress tracking.
- Authentication: Register & login with email/password, passwords hashed with
bcrypt, session persisted inlocalStorage. - Course Management: Courses fetched from PostgreSQL; instructor and duration displayed; shown on the Landing Page and Dashboard.
- User Dashboard: Personalized welcome message, in‑progress courses, recommended courses, category cards.
- Responsive Frontend: Built with React + Vite and a modern component structure.
- Backend API: Express REST API, PostgreSQL (
pg), CORS enabled, auth and course routes.
e-learning-platform/
│
├── backend/
│ ├── index.js # API routes + DB connection
│ ├── package.json
│ └── node_modules/
│
├── src/
│ ├── App.jsx
│ ├── main.jsx
│ ├── index.css
│ └── components/
│ ├── landing/
│ ├── login/
│ ├── header/
│ ├── courses/
│ └── common/
│
├── package.json
└── README.md
user_idSERIAL PRIMARY KEYnameVARCHAR(100)emailVARCHAR(100) UNIQUEpasswordTEXTjoin_dateTIMESTAMP
course_idSERIAL PRIMARY KEYtitleVARCHAR(255)descriptionTEXTduration_weeksINTinstructor_idREFERENCESinstructor
instructor_idSERIAL PRIMARY KEYnameVARCHAR(100)bioTEXTorg_idREFERENCESorganization
org_idSERIAL PRIMARY KEYnameVARCHAR(100)locationVARCHAR(255)
module_idSERIAL PRIMARY KEYcourse_idREFERENCEScoursetitleVARCHAR(255)duration_minutesINT
enrollment_idSERIAL PRIMARY KEYuser_idREFERENCESuserscourse_idREFERENCEScourseenrollment_dateTIMESTAMPprogress_percentINT
POST /register— Register new userPOST /login— Login existing user
GET /courses— Fetch all coursesPOST /add-course— Add test course (dev only)
Open a terminal, change into the backend folder, install dependencies and start the server:
cd backend
npm install
node index.jsBy default the backend runs at: http://localhost:5000
From the repository root install dependencies and start the Vite dev server:
npm install
npm run devDefault frontend URL: http://localhost:5173
- User registers → password hashed using
bcrypt. - Login →
bcrypt.compare()validates password. - On success → user object saved to
localStorage. - Dashboard checks
localStoragefor authenticated user; otherwise redirects to login.
- Frontend: React.js, Vite
- Backend: Node.js, Express.js
- Database: PostgreSQL
- Auth: bcrypt
- API: REST
Star the repo and feel free to contribute via issues or pull requests. Add a brief description of changes and include any migration or setup steps in your PR.
Thank you for checking out the project — happy coding!