Follow these steps to set up the project environment and run the application:
-
Create a Python 3.12.4 Environment
python3 -m venv venv source venv/bin/activate
-
Install Requirements
pip install -r requirements.txt
-
Launch Docker Compose
cd local-env docker-compose up -d cd ..
-
Run Database Migrations
alembic upgrade head
-
Set PYTHONPATH
export PYTHONPATH=$PWD
-
Create Admin User The first admin user is created using a script. This initial admin user can then be used to create other admin users.
python create_admin_user.py
-
Run FastAPI Development Server
uvicorn app.main:app --reload
-
Check Endpoints Open your browser and go to http://127.0.0.1:8000/docs to see all the available endpoints.
-
Authorize on Secured Endpoints To authorize yourself on secured endpoints, press the lock button and enter the username and password generated by the script above. For more details, refer to the FastAPI documentation here.