Skip to content

darixsamani/fastapi-postgres

Repository files navigation

🚀 FastAPI Async Template with PostgreSQL

FastAPI PostgreSQL Docker License Status

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


✨ Features

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


🧭 Quick Start Guide

Follow these simple steps to get your app running in no time ⏱️

🐳 1. Start with Docker Compose

docker compose up -d --build

🔄 2. Run the First Migration

Initialize 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

🌐 3. Access the API Docs

Open the FastAPI interactive docs at: 👉 http://0.0.0.0:8001/docs

🗂️ 4. PGAdmin4 Access

Manage your PostgreSQL database visually via PGAdmin4 🎛️

Access URL: http://localhost:5050

Server Name: db

Port: 5434

Username: admin@gmail.com

Password: admin

🧩 5. Example Preview

IMAGE

Releases

No releases published

Packages

No packages published