From 0801a69cc0b238847c895aed8a9faee2d2f39bb6 Mon Sep 17 00:00:00 2001 From: Malcolm Roberts Date: Fri, 2 Oct 2026 14:46:16 -0500 Subject: [PATCH] chore: add mise tasks to run the app locally mise run dev installs deps, starts Postgres, then runs Flask and Vite together. --- mise.toml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/mise.toml b/mise.toml index 9ddd6fa..a228238 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,33 @@ [tools] python = "3.14" node = "24" + +[tasks.setup] +description = "Create the venv and install backend and frontend dependencies" +# ponytail: reinstalls on every run (fast when up to date); add sources/outputs if it ever gets slow +run = [ + "python -m venv .venv", + ".venv/bin/pip install -q --disable-pip-version-check -r backend/requirements.txt", + "npm install --no-fund --no-audit", +] + +[tasks.db] +description = "Start local Postgres and wait until it accepts connections" +run = [ + "docker compose up -d db", + "until docker compose exec -T db pg_isready -q -U postgres; do sleep 1; done", +] + +[tasks."dev:api"] +description = "Flask API on :5000" +depends = ["setup", "db"] +run = ".venv/bin/python backend/app.py" + +[tasks."dev:web"] +description = "Vite UI; /api is proxied to Flask" +depends = ["setup"] +run = "npm run dev" + +[tasks.dev] +description = "Start the app for local testing (API + UI)" +depends = ["dev:api", "dev:web"]