- JavaScript 82.8%
- HTML 10.1%
- CSS 7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| api | ||
| docs | ||
| js | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| AGENTS.md | ||
| app.js | ||
| docker-compose.yml | ||
| Dockerfile | ||
| eslint.config.js | ||
| index.html | ||
| LICENSE | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| ROADMAP.md | ||
| SESSION_NOTES.md | ||
| styles.css | ||
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-clion push tomainor manual dispatch:docker compose upon 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.