Welcome to the FastAPI Async Template — a clean and modern starter for building asynchronous APIs powered by FastAPI ⚡ and PostgreSQL 🐘.
Dive deeper into the full project documentation here:
📚 Deep Documentation
🐳 Docker Hub Images
✅ FastAPI — lightning-fast backend framework
🐘 PostgreSQL — robust and reliable database
📦 Docker Compose — easy setup and environment management
🔐 Authentication — secure user handling
⚙️ Alembic — smooth database migrations
🧠 Async Support — fully asynchronous stack
📊 PGAdmin4 — visual database management
🧱 SQLModel — type-safe ORM integration
Start a local PostgreSQL instance with Docker:
docker run -d \
--name fastapi_postgres \
-e POSTGRES_USER=darix \
-e POSTGRES_PASSWORD=6775212952 \
-e POSTGRES_DB=fastapi_postgres \
-p 5432:5432 \
postgres:latestBefore running the application, make sure that uv (the ultra-fast Python package and environment manager) is installed on your system 🧩
⚙️ Install uv (if not installed yet):
pip install uvOnce installed, you can easily run your FastAPI app with a single command 💨
uv run main.pyOpen the FastAPI interactive docs at: 👉 http://0.0.0.0:8080/docs
Follow these simple steps to get your app running in no time ⏱️
docker compose up -d --buildInitialize and apply your first migration using Alembic 🚀
docker compose exec app uv run alembic revision --autogenerate -m "first migration"
docker compose exec app uv run alembic upgrade head
Open the FastAPI interactive docs at: 👉 http://0.0.0.0:8081/docs
Manage your PostgreSQL database visually via PGAdmin4 🎛️
Access URL: http://localhost:5050
Server Name: db
Port: 5434
Username: admin@gmail.com
Password: admin
