An open API service indexing awesome lists of open source software.

https://github.com/lacegiovanni17/music-booking-api

The Music Booking API 🎡 is a powerful backend service that connects artists 🎀, event organizers 🎟️, and music lovers 🎢 seamlessly. Whether you're an artist 🎸 looking for gigs or an organizer 🎭 seeking top talent, this API bridges the gap effortlessly! Built with Node.js 🟒, Express πŸš€, TypeScript πŸ“œ, and MongoDB πŸƒ, it offers scalability ⚑ a
https://github.com/lacegiovanni17/music-booking-api

api booking-system database expressjs jwt mongodb mongoose music nodejs restapi-backend typescript

Last synced: 20 days ago
JSON representation

The Music Booking API 🎡 is a powerful backend service that connects artists 🎀, event organizers 🎟️, and music lovers 🎢 seamlessly. Whether you're an artist 🎸 looking for gigs or an organizer 🎭 seeking top talent, this API bridges the gap effortlessly! Built with Node.js 🟒, Express πŸš€, TypeScript πŸ“œ, and MongoDB πŸƒ, it offers scalability ⚑ a

Awesome Lists containing this project

README

        

# MUSIC_BOOKING APP
# music_booking_api
🎡 The Music Booking API is a powerful backend service that connects artists 🎀, event organizers 🎟️, and music lovers 🎢 seamlessly.
Organizers can create and manage event listings πŸ“…, while artists can showcase their profiles πŸ–ΌοΈ and apply for gigs.
The API ensures secure booking transactions πŸ’³ and role-based access πŸ”’ for different users.
Built with Node.js 🟒, Express πŸš€, TypeScript πŸ“œ, and MongoDB πŸƒ, it offers scalability ⚑ and high performance.
Artists can be easily discovered πŸ”, and event organizers can streamline their bookings βœ… with ease.
Prioritizing security πŸ”, efficiency, and user-friendly interactions, this API enhances the live music 🎼 experience.
Whether you're an artist 🎸 looking for gigs or an organizer 🎭 seeking top talent, this API bridges the gap effortlessly!

### Postman Pic https://documenter.getpostman.com/view/25014777/2sB2cSgiao
![music_postman_testing](https://github.com/user-attachments/assets/44ac1f5e-8ea7-4f65-93b9-7b0ac4ae9423)

## About
* πŸ‘‹ Hi, I’m Chidike Henry
* 😎 I’m a fullstack developer
* πŸ’» This is Music booking API, which I built that connects artists 🎀, event organizers 🎟️, and music lovers 🎢 seamlessly.
* πŸ’žοΈ I’m looking to collaborate on JS projects
* πŸ“« How to reach me [email protected]

## Introduction
The Music Booking API project is designed to assess my ability to build a scalable, efficient, and secure backend system for managing artists, events, and bookings.
It evaluates my expertise in API design, database optimization, and asynchronous processing to handle complex user interactions.
The project also tests my ability to implement role-based access control, ensuring secure and seamless interactions between artists and event organizers.
Additionally, it examines my approach to data validation, error handling, and enforcing business rules to maintain system integrity.
My skills in real-time data updates, pagination, and query optimization are also being assessed.
The API's architecture must support high traffic loads, ensuring fast response times and smooth user experiences.
Furthermore, my ability to write comprehensive documentation and collaborate effectively to deliver a production-ready system is a key aspect of the evaluation.

## The Task
So, you are to create a service for the Music Booking App that does this:
* Develop an API that manages artist profiles, event listings, and booking transactions 🎀🎟️.
* Implement role-based access control (RBAC) to differentiate between artists, event organizers, and admin users πŸ”‘.
* Design and optimize a scalable database schema using MongoDB (Mongoose) to efficiently store user and booking data πŸ—„οΈ.
* Ensure secure authentication and authorization using JWT and password hashing for user protection πŸ”’.
* Build API endpoints that allow users to:
(a) Create and manage artist profiles 🎭.
(b) List and book events πŸ“….
(c) View and update booking statuses βœ….
* Implement pagination and filtering for efficient data retrieval and better performance πŸ“Š.
* Enforce rate limiting and input validation to prevent abuse and ensure data integrity 🚧.
* Deploy the API with comprehensive documentation and provide a Postman collection for testing πŸ“œ.
* Achieve a benchmark score of 90/100 by following best practices in API design, security, and scalability πŸ†.

## Technologies Used
* NodeJS
* ExpressJS
* MongoDB
* mongoose
* Express Rate Limit
* Cors
* Bcrypt
* JWT
* Nodemon
* Postman

## Project Description: β€œMusic Booking API”
The Music Booking App API follows a modular monolith architecture, chosen for its clean separation of concernsβ€”each module (auth, users, artists, events, bookings) operates independently while remaining part of a unified codebase. This approach simplifies development, testing, and maintainability without the complexity of microservices.

MongoDB was selected for its flexible schema, enabling dynamic event and artist data structures while indexing and embedded documents optimize read-heavy booking queries. The API is designed with scalability and performance in mind, ensuring efficient data retrieval for high-traffic operations.

Key Features & Enhancements:
βœ” Security & Access Control: JWT authentication, role-based access control (RBAC), and rate limiting to mitigate abuse.
βœ” Error Handling & Consistency: Standardized error responses using custom exceptions (404 Not Found, 400 Bad Request) and a centralized error middleware.
βœ” API Design & Validation: A RESTful architecture with resource-based URLs, HTTP methods, and payload validation using Joi to prevent malformed requests.
βœ” Performance & Rate Limiting: Implemented express-rate-limit to control API request flow, applying stricter limits on authentication and booking transactions to enhance security and prevent spamming.
βœ” Testing & Documentation: Delivered a Postman collection for testing endpoints and a well-structured GitHub repository, ensuring clarity and ease of collaboration.

By focusing on maintainability, performance, and security, this API is built to handle high-volume booking transactions efficiently, making it a reliable solution for music event management. πŸš€

![music_mongoDB](https://github.com/user-attachments/assets/1056b244-63b6-4ff3-b90e-a1c994aa053a)

## Getting Started
## Mini-project music_booking_api

## Prerequisites
1. Ensure you have Node.js installed on your machine. You can download it from nodejs.org.

## Installation
1. Clone the repository: `git clone `
2. Navigate to the project directory: `cd `
3. Install dependencies: `npm install`

## Running the App from your terminal
1. From the parent directory change to the backend folder of the project by running the following command `cd backend`
2. run `npm install` to install all packages in package.json file
3. From the root folder run the following command to start the backend server: `npm run start`
4. The backend server will be running at http://localhost:5000.
5. Ask for MongoDB env to connect to Database.

## Endpoints
router.use("/auth", authRoutes); // Authentication (Login, Register)
router.use("/users", userRoutes); // User management (Artists, Organizers)
router.use("/artists", artistRouter); // Artist-specific routes
router.use("/events", eventRouter); // Event creation & management
router.use("/bookings", bookingRouter);// Booking transactions

## Usage
To retrieve all users, make a GET request to http://localhost:5000/api/v1/users/all-users

Please use Postman to test endpoints here http://localhost:5000/`${path}`

## Documentation
Access documentation here - https://documenter.getpostman.com/view/25014777/2sB2cSgiao

## Error Handling
The application provides appropriate error handling for invalid inputs and unexpected scenarios.
* 400 Bad Request - Invalid request data/validation errors
* 401 Unauthorized - Missing or invalid authentication
* 403 Forbidden - Authenticated but insufficient permissions
* 404 Not Found - Resource doesn't exist
* 409 Conflict - Resource conflict (e.g., duplicate booking)
* 422 Unprocessable Entity - Semantic errors in request
* 500 Internal Server Error - Unexpected server errors

## Testing
![music_booking_api](https://github.com/user-attachments/assets/f6beb8d6-c2f0-42e2-93af-41e39affdaf5)

With these instructions, developers and users will be able to quickly set up and run the Music_Booking_API Backend App for testing and development purposes.

## Author

#### πŸ‘€ Author1
- GitHub: [@lacegiovanni17]https://github.com/lacegiovanni17
- Twitter: [@ChidikeC] https://twitter.com/ChidikeC
- LinkedIn: [LinkedIn]https://www.linkedin.com/in/chidike-chizoba-25628a40/

## Contributing
Contributions, issues, critics and feature requests are welcome!

## Show your support
Please give a ⭐️ if you like this project!

## Acknowledgments
- Hat tip to fobework
- Inspiration to all devs
- etc