A Python user management REST API built following Clean Architecture principles. The project adheres to best practices such as TDD, SOLID, and Dependency Injection, ensuring maintainability, scalability, and a clean, modular design.
Clone this repository
git clone https://github.com/Alberto-Frigatto/clean-architecture-user-system.git
Go to repository where you've cloned it
cd path/to/repository/clean-architecture-user-system
Provide a SECRET_KEY
environment var and then, using docker-compose, run the app
export SECRET_KEY=your_key
docker compose up --build
It'll create two containers: frigatto_app
for the REST API and frigatto_mongodb
for the database.
After that, the api will be visible at http://localhost:8000
and the OpenAPI docs at http://localhost:8000/docs
.
Use docker-compose to run the app
docker compose -f compose.tests.yml up --build
It'll create two containers: frigatto_app_test
for the REST API and frigatto_mongodb_test
for the database.
After that, the unit tests will be executed, and if all they pass, the api will be visible at http://localhost:8001
and the OpenAPI docs at http://localhost:8001/docs
.
⚠️ The data won't be persisted in test mode. They're deleted on each start in test mode.
MIT - Alberto Frigatto, 2024