The FOUNDATION skill is a production-ready web application pattern designed for solo developers building MVPs. It prioritizes simplicity, security, and performance using a robust, non-negotiable tech stack.
- Security by default: Built-in CSRF protection, rate limiting, bcrypt hashing, and parameterized SQL.
- Solo developer optimized: Minimizes complexity by avoiding ORMs, build tools, and heavy JS frameworks.
- Production-ready: Includes configurations for containers, volumes, reverse proxies, and logging from the start.
- Clear upgrade path: Designed to easily transition from SQLite to libSQL or Turso.
- Backend: FastAPI + Uvicorn (Python 3.11+)
- Database: SQLite (WAL mode) or libSQL
- Frontend: Jinja2 Templates + HTMX + Vanilla CSS + Minimal Vanilla JS
- Deployment: Podman/Docker (Multi-stage builds) + Caddy/Nginx
Applications built with this skill follow a strict layout:
app/: Application source code (routes, templates, static files).volumes/: Persistent data (config, database, logs).deployment/: Container and proxy configurations.
- Mandatory parameterized SQL to prevent injection.
- Bcrypt for secure password hashing.
- Integrated CSRF and rate limiting.
- SQLite with Write-Ahead Logging (WAL) and Synchronous=NORMAL for high performance.
- Manual schema migrations for full control.
- Database adapter pattern for easy provider switching.
- HTMX for dynamic, SPA-like interactivity without JavaScript complexity.
- Jinja2 Partials for efficient partial page updates.
- Premium, responsive designs using Vanilla CSS.
- Initialization: The skill uses a
scripts/setup.pyscript to scaffold the project structure, initialize the SQLite database in WAL mode, and create an initial admin user. - Development: Build routes in
app/routes/, templates inapp/templates/, and use the database adapter inapp/db/. - Deployment: Use the provided
deployment/configurations for a containerized rollout with a reverse proxy.
examples/database_adapter.py: Demonstrates the recommended SQLite connection and query pattern.examples/htmx_partial.py: Shows how to handle HTMX requests for partial page updates in FastAPI.