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: v106View 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 a 4-digit environment variable:
- Env key:
ROUTINE_PARENT_PIN - Value format: exactly 4 digits (example:
1234)
Optional hardening:
- Set
ROUTINE_PARENT_SESSION_SECRETto a long random string. - If not set, the app falls back to deriving session signing from
ROUTINE_PARENT_PIN.
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