Files
bortstack-forge/templates/flask-react/boilerplate
2026-12-02 15:44:24 +00:00
..
2026-12-02 15:44:24 +00:00
2026-12-02 15:44:24 +00:00
2026-12-02 15:44:24 +00:00

PROJECT_NAME

This independent project was generated from Forge's Flask/React template. Define product requirements and choose a project profile before implementation. No GitHub account, production host, email provider, or Forge runtime is required for local development.

Local development

python3 -m venv api/.venv
api/.venv/bin/python -m pip install -r api/config/requirements-dev.txt
cd api && .venv/bin/flask --app api.py db upgrade && .venv/bin/flask --app api.py run

In another terminal:

cd react && npm ci && npm run dev

Windows PowerShell: create the virtual environment with py -3 -m venv api/.venv, then use api/.venv/Scripts/python.exe and api/.venv/Scripts/flask.exe in place of the Unix paths. Run Node commands from react/ on either platform.

Validation

The generated testing toolkit is available without Forge at runtime:

./scripts/testtask.sh --start       # Compose development services and local account
./scripts/testtask.sh --status
./scripts/testtask.sh --stop        # stops only this worktree's Compose project
./scripts/testrunner.sh --unit
./scripts/testrunner.sh --integration
./scripts/create-chatgpt-snapshot.sh # ZIP of the current checkout after the first commit

Testing helpers are under .bortstack/testing/. The toolkit uses Git worktree metadata. Generate with --git-init or initialise Git locally before using the commands; an initial commit is not required for the current worktree. Explicit branch targets require a local branch ref and an existing checkout.

Configure a private local test account in ~/.config/bortstack/testing.env with BORTSTACK_TEST_EMAIL and BORTSTACK_TEST_PASSWORD, then chmod 600 that file. testtask.sh asks before using it and permits a one-session hidden password override. Non-interactive use requires --use-default-credentials. The generated development hook creates a verified account only in this worktree's Compose development database; an existing account is accepted only when its password matches. Compose uses ports 5001 and 8081 by default; adjust .bortstack/testing.json if they are occupied. Keep the same file's URLs in sync. The toolkit never removes the persistent SQLite volume.

testrunner.sh requires the documented Python virtual environment and react/node_modules; it does not install dependencies. --act is unavailable until a reviewed local-safe GitHub workflow/job is explicitly allowlisted in .bortstack/testing.json. The optional deployment workflow is not allowlisted. See the generated config and Forge's toolkit README for the schema and Windows requirements.

cd api && .venv/bin/pytest
cd react && npm run lint && npm test && npm run build
docker compose --env-file .env.example config --quiet

Playwright browser tests are optional and require npx playwright install chromium followed by npm run test:e2e. Docker is optional for local development. Default Compose uses a persistent SQLite volume; PostgreSQL, MySQL, and MariaDB are opt-in through ops/databases/ overlays. .env.example contains local/example values only; do not use database example passwords in production or commit a populated .env.

Project context

Read AGENTS.md and docs/ before changing this project. The profile is deliberately unset; select business or personal and record owner, brand, contributor, testing, and deployment choices separately. Email delivery is disabled until a sender/provider is configured. See docs/OPTIONAL_SERVICES.md for optional hosting and email foundations.