A production-ready FastAPI REST API with PostgreSQL, Docker, and GitHub Actions. This project includes:
- Task management endpoint CRUD operations
- Analytics summary endpoint
- ETL pipeline endpoints for sample data loading and payload import
- Docker Compose development and PostgreSQL service
- GitHub Actions CI pipeline for tests and Docker build
-
Copy environment example:
cp .env.example .env
-
Start services with Docker Compose:
docker compose up --build
-
Open API docs:
GET /health/GET /tasks/POST /tasks/GET /tasks/{task_id}PATCH /tasks/{task_id}DELETE /tasks/{task_id}GET /analytics/summaryPOST /etl/load-samplePOST /etl/import
Install backend dependencies locally:
python -m pip install -r requirements.txtInstall frontend dependencies:
cd frontend
npm installRun backend locally:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Run frontend locally:
cd frontend
npm run devThe docker-compose.yml service definitions include:
db— PostgreSQL 15web— FastAPI app with integrated frontend UI
Start the app stack with:
docker compose up --buildOpen the application at:
- Full app: http://localhost:8000
- API docs: http://localhost:8000/docs
GitHub Actions are configured in .github/workflows/ci.yml to:
- install dependencies
- spin up PostgreSQL
- run tests
- build the Docker image