routineTrackerApp
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v102View latest version
Single-user routine checklist app for after-school tasks, with optional task timers and a parent PIN gate.
main.tsx: HTTP entrypoint (export default app.fetch)backend/index.ts: Hono app + routes + HTML bootstrapbackend/parentAuth.ts: server-side PIN verification + signed parent session cookiefrontend/index.html: app shellfrontend/index.tsx: React UIshared/tasks.ts: routine task listshared/types.ts: shared TypeScript contracts
Protected tasks require an environment variable with a SHA-256 hash of your parent PIN:
- Env key:
ROUTINE_PARENT_PIN_SHA256 - Value format: lowercase 64-char hex SHA-256 digest
Generate a hash locally (macOS/Linux):
printf '1234' | shasum -a 256 | awk '{print $1}'
Set that output as the value for ROUTINE_PARENT_PIN_SHA256 in Val Town.
Optional hardening:
- Set
ROUTINE_PARENT_SESSION_SECRETto a long random string. - If not set, the app falls back to deriving session signing from the PIN hash.
Update routineTasks in shared/tasks.ts.
Example task entries:
{ name: "Do homework", timed: false }
{ name: "Brush teeth", timed: true, duration: 2 * 60 }
{ name: "Get parent check", timed: false, requiresParent: true }
GET /api/parent/status: parent lock statusPOST /api/parent/verify: verify PIN and set HTTP-only session cookiePOST /api/parent/lock: clear parent session cookie