From d60ad42f0c4a8957b5a6e8962d544b4e1b38e1ef Mon Sep 17 00:00:00 2001 From: Ian Roddis <31021769+iroddis@users.noreply.github.com> Date: Mon, 22 Jun 2026 21:22:12 -0300 Subject: [PATCH] Adding specializing instructions --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/README.md b/README.md index 052988c..c2b9f85 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,76 @@ scripts/seed.py bootstrap permissions, roles, first superuser tests/ pytest (auth + RBAC) ``` +## Starting a new project + +Fork or copy this repo, then update these six things before writing any code: + +### 1. Project package name — `pyproject.toml` + +```toml +[project] +name = "my-app" # used by uv/pip +description = "What your app does." +``` + +### 2. Application display name — `.env` / environment + +The name shown in the browser title bar, nav bar, and `/docs` page title is +driven by `APP_NAME` in your `.env` (or any environment variable override): + +```bash +APP_NAME="My App" +``` + +This is the only runtime change needed — templates read `{{ app_name }}` +from `settings.app_name`, which is sourced from this variable. No template +edits required. + +### 3. Superuser credentials — `.env` + +```bash +FIRST_SUPERUSER_EMAIL=admin@yourapp.com +FIRST_SUPERUSER_PASSWORD= +``` + +### 4. Secret key — `.env` + +```bash +SECRET_KEY="$(python -c 'import secrets; print(secrets.token_urlsafe(48))')" +``` + +Never commit a real secret key. The placeholder in `.env.example` is intentionally weak. + +### 5. Docker / Postgres identifiers — `docker-compose.yml` + +The compose file uses `app` as the Postgres username, password, and database +name. Rename them consistently: + +```yaml +# db service +POSTGRES_USER: myapp +POSTGRES_PASSWORD: +POSTGRES_DB: myapp + +# app service +DATABASE_URL: postgresql+asyncpg://myapp:@db:5432/myapp +``` + +### 6. This README + +Replace the title and description with your project's own. + +--- + +After these changes, run the normal setup: + +```bash +uv sync --extra dev +cp .env.example .env # edit the values above +uv run python -m scripts.seed +uv run uvicorn app.main:app --reload +``` + ## Quick start (local, SQLite) ```bash