Files
josh 5d9daee627
Build and Deploy / Lint, typecheck, test (push) Successful in 30s
Build and Deploy / Build & Push (push) Successful in 1m39s
refactor: production-essentials hardening pass
Backend: structured logger, env-validated config, graceful SIGTERM/SIGINT
shutdown, per-IP rate limiter, per-tier scheduler concurrency latch, error
context on previously-silent catches, compiled-JS Dockerfile stage.

Frontend: lib/api.ts consolidates BACKEND_URL with lazy production-required
check, root + per-segment error.tsx / not-found.tsx / loading.tsx,
generateMetadata on park and ride pages, graceful fallback when backend is
unreachable, Plausible script gated on env vars.

Infra: CI runs lint + typecheck + tests on both packages before docker build,
compose adds healthchecks, log rotation, and memory limits; .env.example
documents every variable.

Cleanup: removed empty app/api/parks/ dir and 0-byte root parks.db, moved
wait-times-urls.txt into docs/, dropped an `as any` cast.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 10:17:52 -04:00

23 lines
1.1 KiB
Bash

# ── Frontend (web) ──────────────────────────────────────────────────────────
# Backend API base URL. Required in production — the frontend throws at
# startup if this is unset and NODE_ENV=production.
BACKEND_URL=http://localhost:3001
# Optional: Plausible analytics. Both must be set for the script to render.
# NEXT_PUBLIC_PLAUSIBLE_SRC=https://plausible.example.com/script.js
# NEXT_PUBLIC_PLAUSIBLE_WEBSITE_ID=your-website-id
# ── Backend ─────────────────────────────────────────────────────────────────
# Port the Hono server listens on (default 3001).
PORT=3001
# IANA timezone used by node-cron schedules and operating-hour windows.
TZ=America/New_York
# How long a park's schedule data is considered fresh before the tiered
# scraper re-fetches it (default 72).
PARK_HOURS_STALENESS_HOURS=72
# Per-IP request limit for the public API, per minute (default 60).
RATE_LIMIT_PER_MIN=60