Skip to content

Add animated terminal demo + correct README to match the Flask output#1

Closed
Anioko wants to merge 2 commits into
mainfrom
demo-readme-flask-fix
Closed

Add animated terminal demo + correct README to match the Flask output#1
Anioko wants to merge 2 commits into
mainfrom
demo-readme-flask-fix

Conversation

@Anioko

@Anioko Anioko commented Jun 8, 2026

Copy link
Copy Markdown
Owner

What & why

While adding a terminal demo for the Show HN, I found the README documents a FastAPI app, but microcodegen.py actually generates a Flask app. Every FastAPI-specific claim was inaccurate — and HN's audience will clone, run, and notice immediately.

Verified against the real tool (grep of microcodegen.py: 0 hits for fastapi/uvicorn/pydantic/openapi/ArchiMate; 28× Flask, 30× blueprint). The generated app's own README already correctly says "Flask + Postgres" — only the top-level README was wrong.

Corrected

  • "production FastAPI app" → "production Flask app"
  • uvicorn main:app / alembic upgrade headdocker compose up / curl /api/health (the real flow)
  • Removed claims of app/routers/, app/schemas/ Pydantic v2, main.py, openapi.yaml, ARCHITECTURE.md, ArchiMate typing — none are emitted. Replaced with the real structure: app factory, app/blueprints/*_bp.py, flask-sqlalchemy models, config.py, wsgi.py, db.create_all, demo SPA page, GENOME.json.

Adds

  • demo.svg — animated terminal demo (PRD → running Flask app → register → per-tenant CRUD → auth-refusal), embedded inline at the top of the README so it plays on GitHub without a click-through.
  • demo.cast — the asciinema v2 cast (reproducible; asciinema upload demo.cast for an asciinema.org page).
  • demo.sh — one command that generates, boots, and walks the full auth+CRUD flow.
  • .gitattributes — pins *.sh/*.cast/*.svg to LF so the script's shebang isn't corrupted on checkout.

Dogfood check

Ran ./demo.sh end-to-end from a clean clone: 25 files generated, Flask+Postgres booted in Docker, health 200, register issued a JWT cookie, project created scoped to the user, list returned only that row, and the API refused the no-cookie request. Every line in the demo is real output.

…output

The README documented a FastAPI app (uvicorn, Pydantic, app/routers, alembic,
openapi.yaml, ArchiMate typing), but microcodegen.py actually generates a Flask
app (app factory, blueprints, flask-sqlalchemy, JWT httpOnly cookies, db.create_all,
docker-compose Postgres). Every FastAPI claim was inaccurate. This rewrites the
README so every claim matches what the tool really emits, verified by a real run.

Adds:
- demo.svg  — animated terminal demo (PRD -> running Flask app -> register/CRUD),
              rendered from a real run, embedded inline at the top of the README
- demo.cast — the asciinema v2 cast (reproducible; `asciinema upload demo.cast`)
- demo.sh   — one command that generates, boots, and walks the auth+CRUD flow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 96824fc08e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md
Or just run the whole thing — generate, boot, and walk the auth+CRUD flow:

```bash
./demo.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make demo.sh executable before telling users to run it

The README now advertises ./demo.sh as the one-command reproduction path, but git ls-tree cfc121ac390669395a9cddd62c39be48af6ab6e7 demo.sh shows the script is committed with mode 100644, so a fresh clone will fail with Permission denied when users run this exact command. Either commit the executable bit (100755) or document bash demo.sh instead.

Useful? React with 👍 / 👎.

Comment thread demo.sh
Comment on lines +39 to +41
curl -s -b cookies.txt -X POST http://localhost:5000/api/projects/ \
-H 'Content-Type: application/json' \
-d '{"name":"My first project"}'; echo

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the demo PRD and CRUD endpoint in sync

The script accepts an arbitrary PRD path (./demo.sh path/to/prd.md), but the walkthrough always posts to /api/projects/. For any supplied PRD that does not define a Project entity, microcodegen will not emit project_bp.py, so this step returns 404 and the demo still prints “Done” because these curls do not use -f. Either restrict the script to the bundled task-manager PRD or derive the entity endpoint from the generated app before running the CRUD portion.

Useful? React with 👍 / 👎.

…files, not a skeleton)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Anioko

Anioko commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Closing — superseded. While building this I discovered the canonical product is FastAPI, not Flask: the monorepo scripts/microcodegen.py spec, the current PyPI release (archiet-microcodegen 0.2.x), and the Show HN repo (Anioko/spec-driven-development) are all FastAPI. This repo's bundled microcodegen.py is a stale Flask 0.1.0 snapshot, so this PR (which aligned the README to Flask) corrects in the wrong direction relative to the shipped product.

The real work landed elsewhere:

  • Fixed two launch-blocking bugs in the FastAPI generator (no schema-create on boot → register 500; passlib/bcrypt crash) → built + verified archiet-microcodegen 0.2.2.
  • Animated FastAPI demo + honest install table → PR in Anioko/spec-driven-development (the actual launch repo).

Recommend either syncing this repo's microcodegen.py to the FastAPI source (to match PyPI) or pointing it at the monorepo, rather than maintaining a divergent Flask copy.

@Anioko Anioko closed this Jun 8, 2026
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