No description
  • JavaScript 82.8%
  • HTML 10.1%
  • CSS 7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tim Hayes da36f03c40
All checks were successful
Deploy / deploy (push) Successful in 43s
CI / check (push) Successful in 3s
initial commit
2026-07-31 14:44:25 -04:00
.forgejo/workflows Initial commit 2026-07-31 14:44:12 -04:00
api Initial commit 2026-07-31 14:44:12 -04:00
docs Initial commit 2026-07-31 14:44:12 -04:00
js Initial commit 2026-07-31 14:44:12 -04:00
tests Initial commit 2026-07-31 14:44:12 -04:00
.dockerignore Initial commit 2026-07-31 14:44:12 -04:00
.gitignore Initial commit 2026-07-31 18:18:29 +00:00
AGENTS.md Initial commit 2026-07-31 14:44:12 -04:00
app.js Initial commit 2026-07-31 14:44:12 -04:00
docker-compose.yml Initial commit 2026-07-31 14:44:12 -04:00
Dockerfile Initial commit 2026-07-31 14:44:12 -04:00
eslint.config.js Initial commit 2026-07-31 14:44:12 -04:00
index.html Initial commit 2026-07-31 14:44:12 -04:00
LICENSE Initial commit 2026-07-31 18:18:29 +00:00
nginx.conf Initial commit 2026-07-31 14:44:12 -04:00
package-lock.json Initial commit 2026-07-31 14:44:12 -04:00
package.json Initial commit 2026-07-31 14:44:12 -04:00
README.md Initial commit 2026-07-31 14:44:12 -04:00
ROADMAP.md Initial commit 2026-07-31 14:44:12 -04:00
SESSION_NOTES.md initial commit 2026-07-31 14:44:25 -04:00
styles.css Initial commit 2026-07-31 14:44:12 -04:00

SimpleRetirementPlanner

Static retirement planner (frontend) with a small Express + SQLite API for auth and plan sync.

Stack

  • Frontend — ES modules under the repo root (index.html, app.js, js/, nginx)
  • API — Express + better-sqlite3 + JWT (api/)
  • Deploy — Docker Compose (nginx frontend + API), Forgejo Actions on TrueNAS

Setup (dev)

npm install
npm test
npm run lint

Open index.html via a static server, or run the full stack with Docker (API required for signup/login/sync).

cd api && npm install && npm start   # API on :3000

Docker (local / TrueNAS)

docker compose up -d --build

Open http://localhost:8081. Nginx proxies /api/ to the API container.

Stop:

docker compose down

SQLite lives in the named volume retirement-planner-data and survives redeploys.

Production: set JWT_SECRET when bringing the stack up (do not keep the compose default):

JWT_SECRET='your-long-random-secret' docker compose up -d --build

Forgejo Actions (TrueNAS)

  • CI (.forgejo/workflows/ci.yml) — runs-on: docker (node:lts): npm ci, lint, test.
  • Deploy (.forgejo/workflows/deploy.yml) — runs-on: docker-cli on push to main or manual dispatch: docker compose up on the NAS host Docker engine.

Runner must expose host Docker to job containers (DooD). See docs/truenas-forgejo-runner.yaml (same pattern as HabitTracker; one shared runner is enough).

Setting Value
Label docker-cli:docker://docker:27-cli
Volume /var/run/docker.sock → runner
container.options -v /var/run/docker.sock:/var/run/docker.sock
Variable (optional) HOST_INTERNAL_URL — Forgejo URL reachable from job containers
Secret (recommended) JWT_SECRET — production API signing key

App stack is owned by Actions/compose (name: retirement-planner, host port 8081). Do not also manage the same containers as a separate TrueNAS Custom App.

Scripts

Command Description
npm test Node test suite (engine/tax golden tests + helpers)
npm run lint ESLint on app, js/, API, and tests
docker compose up -d --build Build & run frontend + API

License

See LICENSE.