This project is a Python FastAPI application implementing a user CRUD system using hexagonal architecture. This was created for my own personal understanding.
user_crud_hex/
├── app/
│ ├── main.py # Entry point of the application
│ ├── models/ # Data models
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ └── repositories/ # Data access layer
├── tests/ # Unit and integration tests
├── venv/ # Virtual environment
├── requirements.txt # Project dependencies
└── README.md # Project documentation
Follow these steps to set up and run the project:
- Python 3.8 or higher
pip(Python package manager)
-
Clone the Repository
git clone <repository-url> cd user_crud_hex
-
Create a Virtual Environment
python -m venv venv
-
Activate the Virtual Environment
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install Dependencies
pip install -r requirements.txt
-
Start the FastAPI Server
uvicorn app.main:app --reload
-
Access the API Documentation
Open your browser and navigate to:- Swagger UI: http://127.0.0.1:8000/docs
- ReDoc: http://127.0.0.1:8000/redoc
This project is licensed under the MIT License. See the LICENSE file for details.