PRD text → working Flask + SQLAlchemy app ZIP. Pure stdlib, zero dependencies, zero LLM calls.
Project description
archiet-microcodegen-flask
PRD text → working Flask + SQLAlchemy app → ZIP, in <1400 LOC, pure stdlib, zero LLM calls. Inspired by Karpathy's micrograd: this file is the complete algorithm.
Built on Archiet — AI-native architecture-to-code platform.
Install
pip install archiet-microcodegen-flask
Use
# Write ZIP to disk
archiet-microcodegen-flask path/to/prd.md --out ./out/
# Pipe ZIP to stdout
archiet-microcodegen-flask path/to/prd.md > app.zip
As a library:
from archiet_microcodegen_flask import microcodegen_flask
prd_text = open("prd.md").read()
zip_bytes = microcodegen_flask(prd_text)
What you get
The generated output is a working Flask + PostgreSQL app:
app/__init__.py Flask app factory — create_app()
app/extensions.py db, jwt, migrate singletons
app/auth/routes.py register / login / logout / me
app/models/user.py User model
app/models/<entity>.py One SQLAlchemy model per entity
app/routes/<entity>.py One Blueprint per entity (full CRUD)
config.py JWT_TOKEN_LOCATION=["cookies"], JWT_COOKIE_HTTPONLY=True
manage.py Flask CLI entrypoint
requirements.txt flask, flask-sqlalchemy, flask-jwt-extended, flask-migrate, psycopg2-binary
docker-compose.yml Postgres 16 with healthcheck-gated startup
Dockerfile python:3.12-slim, port 5000
.env.example DATABASE_URL, JWT_SECRET_KEY, SECRET_KEY
tests/test_app.py pytest smoke tests (register, login, health)
ARCHITECTURE.md ArchiMate 3.2 element map
openapi.yaml OpenAPI 3.1 spec
GENOME.json Intermediate representation (for debugging/regeneration)
README.md Quick-start for the generated app
The four stages
parse_prd(text) → manifest— regex extraction of entities, fields, user stories, integrationsmanifest_to_genome(manifest) → genome— maps to canonical IR with ArchiMate 3.2 element typingrender_genome(genome) → {path: content}—string.Template-based Flask renderingpack(files) → bytes— stdlibzipfile
Auth — httpOnly cookies, non-negotiable
JWT_TOKEN_LOCATION = ["cookies"]JWT_COOKIE_HTTPONLY = TrueJWT_COOKIE_SAMESITE = "Lax"- Register → sets cookie. Login → sets cookie. Logout → clears cookie.
- NEVER localStorage. NEVER Authorization header in response body.
Why this exists
Spec-driven architecture before vibecoding. The genome is an ArchiMate 3.2 intermediate representation — your PRD becomes an architecture document, not just a prompt.
The full Archiet platform adds:
- LLM-powered PRD extraction (chunked, overlap+dedup, handles natural language)
- 12+ stack renderers (FastAPI, Flask, Django, NestJS, Laravel, Go, Java, Rails, .NET, Tauri+Rust, Salesforce, SAP CAP)
- Capability emission, frontend (Next.js / Expo), stub-filling, quality scoring, delivery gates
- Cross-stack parity enforcement and verification
But none of that changes the core algorithm. If a bug doesn't reproduce here, it's in an efficiency layer.
What's NOT included
- No LLM calls (deterministic zone by design)
- No frontend, no mobile, no payment integration, no rate limiting, no audit logging
- No multi-stack output (Flask only; see
archiet-microcodegenfor the FastAPI variant)
License
MIT. See LICENSE.
Links
- Source: github.com/aniekanasuquookono-web/archiet
- FastAPI variant: archiet-microcodegen
- Full platform: archiet.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file archiet_microcodegen_flask-0.1.0.tar.gz.
File metadata
- Download URL: archiet_microcodegen_flask-0.1.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af44bae9cf1f7efa9af6a92efe1caacc96c6d6151152e8f2924aeccfbde6514f
|
|
| MD5 |
ac1c307aa82db6b03eb6a5f4bd5e73c0
|
|
| BLAKE2b-256 |
32cec37dddeddca51f21dc1b4597a0f56baaf036d08e694d74c0da631dec5ac5
|
File details
Details for the file archiet_microcodegen_flask-0.1.0-py3-none-any.whl.
File metadata
- Download URL: archiet_microcodegen_flask-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17c6038171646ab1a23cf8cb9ac3cd0d58aa4e32eb2b7edf27a105c911b865d8
|
|
| MD5 |
290242b4876264b8b92fde004ec7486e
|
|
| BLAKE2b-256 |
6e4c2c1efd13d2db45400a42e8a8486b5a7ecbc86a09ade97ced4e6c3f931e2d
|