Project Name
Short one-line description of what this project does.
Tech Stack
- FastAPI — Python REST API framework
- PostgreSQL — Relational database
- SQLAlchemy — Async database connection layer
- Docker / Docker Compose — Containerized development environment
Project Structure
project/
├──Create.sql — Database schema and seed data
├──docker-compose.yml
├──Dockerfile
├──requirements.txt
├──.env — Local environment variables (not committed)
└──app/
├── main.py — App entry point, router registration
├── config.py — Environment variable configuration
├── database.py — Database connection and session
└── routers/
├── init.py
└── example.py — Route definitions
Getting Started
Prerequisites
- Docker installed
- Docker Compose installed
Setup
Create a .env file, by copying .env-example, in the root directory and adjustign the vaulues as needed:
POSTGRES_USER=exampleUser
POSTGRES_PASSWORD=examplePasswd
POSTGRES_DB=exampleDB
API_PORT=8000
DEBUG=true
Start the stack:
docker compose up --build
The API will be available at http://localhost:8000. Interactive API docs are at http://localhost:8000/docs. Resetting the Database
If you need to reinitialize the database (e.g. after changing Create.sql):
docker compose down
rm -rf ./postgresData
docker compose up --build
⚠️ This will delete all data. Do not run in production.
The database schema is managed via Create.sql — no ORM migrations
The .env file is excluded from version control via .gitignore
Description
Languages
Python
97.4%
Dockerfile
2.6%