Backend API built with Node.js, Express, and MongoDB.
-
Install dependencies:
npm install
-
Create a
.envfile (already created) with:PORT=5000 MONGO_URI=mongodb://localhost:27017/belnique JWT_SECRET=your_secret_key -
Run the server:
npm run dev
- User: Students, Professors, Collectors, Admins.
- Course: Online courses with modules and lessons.
- Progress: Tracks student progress in courses.
- Event: Workshops, exhibitions, etc.
- Artwork: Gallery items for sale or display.
- Notification: System alerts and messages.
- Order: Purchases (courses, artworks).
- Resource: Library content (ebooks, videos).
- BlogPost: Community articles.
- Connection: Networking/Friendships.
POST /api/users/login- Authenticate userPOST /api/users- Register userGET /api/users/profile- Get current user profilePUT /api/users/profile- Update profile
GET /api/notifications- Get all notificationsPUT /api/notifications/:id/read- Mark specific notification as readPUT /api/notifications/readall- Mark all as read
GET /api/courses- List all coursesGET /api/courses/:id- Get course detailsPOST /api/courses- Create course (Professor/Admin only)
Add Authorization: Bearer <token> header to protected routes.