Small Flask demo that hosts multiple "prototypes" (mini apps). Each prototype lives under prototypes/<kebab-name>/ and its templates are namespaced under templates/<kebab-name>/. The main app.py file discovers and registers blueprints for each prototype automatically.
- Install
just
# macOS
brew install just
# Linux
# Install from https://github.com/casey/just/releases
# Add completion for your shell. E.g. for bash:
source <(just --completions bash)-
Create a virtual environment and install dependencies
just devenv- Activate the virtual environment
source .venv/bin/activate# Run on default port 5000
just run
# To run on a different port, e.g. 5001:
PORT=5001 just runStarts on port 5000 by default. Open http://127.0.0.1:5000 to see the prototype list. Individual prototypes are available at /<kebab-name>/.
This app exposes a shared static folder and a small API that all prototypes can use:
- Shared static files are served from
/static/. Place assets in the/static/folder in the repo root. Prototypes can reference them directly, for example:/static/shared.css. This is automatically done by Flask. - A simple API is available under
/api. A health endpoint is at/api/pingwhich returns JSON{ "ok": true, "source": "shared-api" }.
Use the provided VSCode launch configuration Debug webapp to run and debug the app.
Use the provided scaffold script to create a new prototype and its namespaced template:
Interactive
just createNon-interactive
./scripts/scaffold_prototype.py --name "Hello World" --description "Short description"The scaffold creates:
prototypes/<kebab-name>/info.json— metadata (display name, description)prototypes/<kebab-name>/routes.py— blueprint that renders"<kebab-name>/index.html"templates/<kebab-name>/index.html— placeholder template
# Starts the server (port 5001), runs tests, then stops the server
just test
# To specify a different port for the server
PORT=5002 just testThis automatically starts the Flask server, runs the tests, and stops the server when done.
- Pushes to the
mainbranch trigger a deployment to DigitalOcean App Platform. - The live site is available at https://dolphin-app-z2vdi.ondigitalocean.app/.
- DigitalOcean automatically detects
uv.lockand installs production dependencies only.