• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
ashryanio

ashryanio

routineTrackerApp

Public
Like
4
routineTrackerApp
Home
Code
8
backend
3
frontend
2
shared
2
.vtignore
AGENTS.md
README.md
deno.json
H
main.tsx
Environment variables
2
Branches
1
Pull requests
Remixes
2
History
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
2/15/2026
Viewing readonly version of main branch: v124
View latest version
README.md

Routine Tracker

Single-user routine checklist app for after-school tasks, with optional timers and per-action parent PIN checks.

Current architecture

  • main.tsx: HTTP entrypoint (export default app.fetch)
  • backend/index.ts: Hono app + routes + HTML bootstrap
  • backend/parentAuth.ts: parent PIN verification helpers
  • backend/schedule.ts: global routine schedule store + active routine calculation
  • frontend/index.html: app shell
  • frontend/index.tsx: React UI with boundary-driven refresh
  • shared/routines.ts: routine labels, task lists, and default schedule windows
  • shared/types.ts: shared TypeScript contracts

Parent PIN

Protected tasks require a 4-digit environment variable:

  • Env key: ROUTINE_PARENT_PIN
  • Value format: exactly 4 digits (example: 9854)

There is no parent unlock session. Each protected action requires entering the parent PIN.

Global schedule control

Routine timing is globally controlled by one Blob key:

  • Blob key: routine_schedule_config_v1
  • Default timezone: Asia/Tokyo
  • Default windows:
    • Morning: 06:30-08:30 (daily)
    • After school: 15:00-19:00 (Mon-Fri)
    • Bedtime: 20:00-21:30 (daily)

On first run, the app auto-creates this config if missing.

Smart freshness model (always-on display)

The UI does not poll every minute. It refreshes by:

  • scheduling one timer for nextChangeAt
  • re-syncing on visibilitychange, focus, and online
  • coarse 30-minute watchdog refresh

API routes

  • POST /api/parent/verify: verify parent PIN for a protected action
  • GET /api/routine/active: active routine, tasks, and next boundary
  • GET /api/routine/schedule: current global schedule config
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.