Skip to content

feat: dynamic database credentials + docker-compose generation#13

Merged
dipto0321 merged 15 commits into
mainfrom
feat/dynamic-db-config
Jul 14, 2026
Merged

feat: dynamic database credentials + docker-compose generation#13
dipto0321 merged 15 commits into
mainfrom
feat/dynamic-db-config

Conversation

@dipto0321

Copy link
Copy Markdown
Owner

Summary

  • Dynamic DB credentials: the wizard now asks for database name / user / password (PostgreSQL; db name only for MongoDB), with --db-name / --db-user / --db-password flags for non-interactive use. Defaults: slug / slug / auto-generated secrets.token_urlsafe(16).
  • Real credentials flow into .env; .env.example always gets the change-me-db-password placeholder — the real password never lands in a committed file.
  • New docker-compose.yml per project (postgres:16-alpine and/or mongo:7, ports bound to 127.0.0.1, volumes, healthcheck) wired to the same credentials, so docker compose up -d gives a working database on first run.
  • Version bumped to 0.3.0.

Bug fixes (from the 2026-07-14 end-to-end review)

  1. FastAPI/Flask MongoDB-only projects crashed on import (No module named 'psycopg') — SQL layer now falls back to SQLite.
  2. Django: bare manage.py makemigrations detected nothing (missing migrations/__init__.py packages).
  3. Django: pytest required a running PostgreSQL — new config/settings/test.py uses SQLite.
  4. FastAPI --auth none: alembic revision --autogenerate crashed on a nonexistent auth import.
  5. Fresh projects crashed on first boot with no local Postgres — fixed by the compose file + README quickstart step.
  6. Success panel showed FastAPI instructions (and cp .env.example .env) for every framework — now framework-aware.

Verification

  • 82/82 unit tests pass, ruff clean.
  • E2E matrix: 5 generated projects (fastapi/flask/django × postgres, fastapi × mongo-only, fastapi × no-auth) — all install, their test suites pass without PostgreSQL running, makemigrations creates 0001_initial, alembic autogenerate works, docker compose config validates.
  • Multi-agent review per task plus a final whole-branch review (verdict: ready to merge).

🤖 Generated with Claude Code

dipto0321 and others added 15 commits July 14, 2026 09:16
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mongo-only projects fall back to SQLite for the SQL layer instead of
shipping a postgres URL without the psycopg driver.
Bare 'manage.py makemigrations' previously detected nothing (no
migrations package), and 'pytest' required a running PostgreSQL.
…k test secrets

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cocogitto-bot

cocogitto-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

✔️ ad6143a...f348485 - Conventional commits check succeeded.

@dipto0321 dipto0321 merged commit a85d80b into main Jul 14, 2026
7 checks passed
@dipto0321 dipto0321 deleted the feat/dynamic-db-config branch July 14, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant