From 8c062ae46126c7f29089f3789c02439ab2ea8b88 Mon Sep 17 00:00:00 2001 From: Ali Zarinkolah Date: Sat, 15 Aug 2026 11:26:15 +0330 Subject: [PATCH] chore: add application package scaffold and tooling ignores Add the initial src/ package (empty FastAPI entrypoint, Settings stub), an .env.example placeholder, and expand .gitignore for test/coverage artifacts, environment files, and local Claude Code overrides. Also documents the Alembic async bootstrap command in ADR-0009. Co-Authored-By: Claude Sonnet 5 --- .env.example | 0 .gitignore | 13 ++++++++++++- docs/adr/0009-postgres-sqlalchemy-alembic-schema.md | 6 +++++- src/config.py | 5 +++++ src/main.py | 0 5 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .env.example create mode 100644 src/config.py create mode 100644 src/main.py diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..e69de29 diff --git a/.gitignore b/.gitignore index a506ee8..fe70770 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,16 @@ wheels/ # Virtual environments .venv -# Enviroment variables +# Test and coverage artifacts +.pytest_cache/ +.coverage +coverage.xml +htmlcov/ + +# Environment variables .env +.env.langfuse +infra/langfuse/.env + +# Claude Code local overrides +.claude/settings.local.json diff --git a/docs/adr/0009-postgres-sqlalchemy-alembic-schema.md b/docs/adr/0009-postgres-sqlalchemy-alembic-schema.md index 4df0295..ac1a954 100644 --- a/docs/adr/0009-postgres-sqlalchemy-alembic-schema.md +++ b/docs/adr/0009-postgres-sqlalchemy-alembic-schema.md @@ -58,7 +58,11 @@ Conventions: - Use SQLAlchemy async sessions in FastAPI (`AsyncSession`) and one session per request/job unit of work. -- Use Alembic for all DDL. FastAPI startup opens connections and checks +- Use Alembic for all DDL. Bootstrap the migration environment once with + `uv run alembic init -t async alembic`, then commit the generated + `alembic.ini`, `alembic/env.py`, and `alembic/versions/` directory. Retain the + async Alembic template and configure it to load the application's database URL + and SQLAlchemy model metadata. FastAPI startup opens connections and checks readiness; it does not create or alter tables. - Prefer UUID primary keys generated by the application. Avoid integer IDs that leak tenant size and make distributed workers harder to compose. diff --git a/src/config.py b/src/config.py new file mode 100644 index 0000000..8c0b4b2 --- /dev/null +++ b/src/config.py @@ -0,0 +1,5 @@ +from pydantic_settings import BaseSettings + + +class Settings(BaseSettings): + pass diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000..e69de29