- Project Overview
- Features
- Architecture
- Technology Stack
- Domain-Driven Design (DDD) Implementation
- Installation and Setup
- API Endpoints
- Usage Example
- Contribution Guidelines
- License
Moun API V2 is a backend service powering a music auction and sales platform. It enables users to bid on and purchase unique music assets. Designed with Domain-Driven Design (DDD), the API ensures a robust, scalable, and maintainable architecture.
- Music Auctions: Create and manage auctions with real-time bidding.
- User Management: Authentication and profile handling.
- Payment Integration: Secure payment processing for purchases.
- Notification System: Alerts for bidding updates and auction results.
- Domain-Driven Design (DDD): Emphasizes modularity and separation of business logic.
- Layered Architecture: Divided into Application, Domain, and Infrastructure layers.
- Microservice Ready: Flexible enough for future modularization.
- Language: Java
- Framework: Spring Boot
- Database: MySQL with an ORM (JPA/Hibernate)
- Authentication: JWT-based security + OAuth2.0
- Deployment: Docker and CI/CD pipelines
- Core Domains:
- Auctions: Bidding, auction creation, and status tracking.
- Members: Registration, authentication, and profiles.
- Songs: Upload, Remove, Get Query songs.
- Aggregates and Entities: Central objects encapsulating logic.
- Repositories: Persistent storage abstractions.
- Clone the repository:
git clone https://github.com/moun-io/moun.api.v2.git cd moun.api.v2
- Configure environment variables in
.env
. - Build and run the application:
./gradlew bootRun
Endpoint | Method | Description |
---|---|---|
/auth/check |
POST | check if the token is valid |
/auth/login |
POST | Authenticate a user (sign in) |
Endpoint | Method | Description |
---|---|---|
/members |
POST | Create a new member + Sign-up |
/members |
GET | Get all members |
/members?position=x |
GET | Get members by position |
/members/{id} |
GET | Get member by ID |
/members/{id} |
PUT | Update artist information |
/members/{id} |
DELETE | Delete artist |
Endpoint | Method | Description |
---|---|---|
/songs/{id} |
GET | Get song by ID |
/songs |
GET | Get songs by date |
/songs?genre=x&title=x&is_desc=false |
GET | Get songs by query (genre, title, desc) |
/songs?sortby=views&limit=4 |
GET | Get top 4 songs by popularity |
/songs?sortby=expired_date&limit=4&isdesc=true |
GET | Get top 4 songs by expired date |
/songs |
POST | Create a new song |
/songs/{id} |
PUT | Update song |
/songs/{id} |
DELETE | Delete a song |
Endpoint | Method | Description |
---|---|---|
/bids |
GET | Get all your bids |
/bids/songs/{songid} |
POST | Create a bid on a song |
/bids/{id} |
DELETE | Delete your bid from a song |
# Example: Create a new auction
curl -X POST -H "Authorization: Bearer <token>" \
-d '{"title":"New Song", "startingPrice":100}' \
http://localhost:8080/auctions
We welcome contributions to improve the platform! Please follow these steps:
- Fork the repository.
- Create a feature branch.
- Submit a pull request with a detailed description.
This project is licensed under the MIT License. See the LICENSE
file for details.
This structure ensures clarity and provides comprehensive documentation for developers. Let me know if you'd like me to flesh out any specific sections!