This is the server-side codebase for Skill Harbor, a full-stack course management platform where users can create, manage, and enroll in professional and skill-development courses.
- π Backend URL: https://skill-harbor-server.vercel.app
- π Frontend URL: https://skill-harbor-a11th.web.app
- π§ͺ Health Check:
GET /βSkill Harbor server is cooking up
Skill Harbor Server provides RESTful API endpoints to handle:
- Secure authentication via Firebase Admin
- Token verification for protected routes
- Course creation, editing, deletion
- Course enrollment with seat management
- Enrolled course tracking
- Filtering features like top enrolled & long duration
- π Secure Firebase Admin Auth with role verification
- π¦ MongoDB Integration for course/enrollment data
- π¨βπ« Instructor Controls β create/update/delete courses
- π¨βπ User Enrollment β enroll/unenroll with seat management
- π Analytics Endpoints β most enrolled, longest duration
- β Input Validation & Error Handling
- π CORS Enabled with production/frontend whitelisting
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Server health check |
| GET | /courses |
Get all courses |
| GET | /latest-course |
Get latest 6 courses |
| GET | /highest-enrolled-courses |
Get top 6 most enrolled courses |
| GET | /long-duration-courses |
Get top 6 longest duration courses |
| GET | /single-course/:id |
Get course by ID |
| GET | /course |
Get courses by instructor email (protected) |
| POST | /courses |
Create new course (protected) |
| PUT | /course/:id |
Update course by ID (protected) |
| DELETE | /single-course/:id |
Delete course by ID (protected) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /course-order/:id |
Enroll or Unenroll user in course (protected) |
| GET | /course-order/:id |
Get enrollment by course ID |
| GET | /my-enrolled-course |
Get all enrolled courses by email (protected) |
| DELETE | /course-order/:id |
Remove enrollment by ID (protected) |
π Protected endpoints require Firebase ID token in
Authorizationheader.
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB (with MongoDB Atlas)
- Auth: Firebase Admin SDK
- Security: Cookie Parser, CORS, Environment Variables
- Deployment: Vercel
git clone https://github.com/mahfuzarrahmanmunna/skill-harbor-server.git
cd skill-harbor-server
npm install
npm run dev
---