This is a CMS (Content Management System) API project built with MongoDB and .NET 8 to efficiently and scalably store data. To use the API, it is necessary to register a user in the database for authentication.
The project is organized following best practices in software architecture. It is composed of the following layers:
- Presentation: Responsible for communication interfaces, including controllers and endpoints.
- Application: Contains application logic, such as services that orchestrate communication between presentation and domain layers.
- Domain: Defines entities and business rules.
- Repository: Interfaces between the application and the database, encapsulating CRUD operations.
- Configuration: Centralizes dependency and system configuration.
We chose MongoDB because it is a NoSQL database, providing greater flexibility in data storage, ideal for documents with variable schemas. Additionally, MongoDB is highly scalable and suitable for large volumes of data.
The DocumentDB service on AWS runs MongoDB internally and is fully compatible with it. Choosing MongoDB has a similar justification to using DocumentDB, offering scalability and flexibility with the reliability of AWS.
For authentication, we used JWT (JSON Web Token). A token must be passed with each request to access the endpoints. This ensures secure access and authentication for every API call.
All API documentation is also available through swagger
Before running the project, make sure to install all the necessary packages by running the following commands:
# Install project dependencies
dotnet restore
# Build the project
dotnet build
# Run the project
dotnet run
After running these commands, the API should be up and running, and you can start making requests by passing the JWT token for authentication.