This repository contains the backend REST API for the DNB Hub application.
It is built with Node.js, Express and MongoDB, and provides authentication with JWT as well as CRUD endpoints for the main entities.
This project was developed as part of Module 3 to practice full-stack development with the MERN stack.
- User signup and login with JWT authentication
- Token verification middleware
- Protected routes
- Profile update endpoint (username and profile picture)
- CRUD operations for:
- Artists
- Events
- Promoters
- Relationships between models:
- An event belongs to a promoter
- An event can include multiple artists
- Input sanitization to avoid saving empty fields
- Node.js
- Express
- MongoDB
- Mongoose
- JSON Web Tokens (JWT)
- User
- Artist
- Event
- Promoter
- Event → Promoter (one-to-many)
- Event → Artists (many-to-many)
POST /auth/signupPOST /auth/loginGET /auth/verifyPUT /auth/profile
/artists
/events
/promoters
- JWT authentication
- CRUD for main entities
- Relationships between models
- Secure and structured REST API
- Image upload using cloud storage instead of image URLs
- Role-based access control
- Integration with maps to display event locations
Developed by Luís Castro as part of the Module 3 project.