Commit Graph

5 Commits

Author SHA1 Message Date
Jasper Van a5c281b26a refactor(api)!: make site routes RESTful (#526)
Move site configuration under settings, model analytics and licensing as resources, and isolate scheduler runs under the internal API.

BREAKING CHANGE: site email, branding, analytics, licensing, WebDAV verification, and scheduler endpoint paths have changed.

Refs #451
2026-07-27 15:22:28 -04:00
saltbo d693837150 chore: update default branch references from master to main 2026-06-12 12:45:39 -04:00
saltbo 88f6e22f72 fix(traffic): sync cloud usage in background 2026-05-09 11:46:26 -04:00
Jasper Van 29102e623d feat: v2.6 Z6 — 6h background entitlement refresh (#345)
- Add server/services/licensing-refresh-runner.ts: shared runner with
  5-min dedup guard, structured INFO logs, and no-op for unbound state
- Add workers/scheduled.ts + export scheduled() in workers/bootstrap.ts
  for CF Workers cron (every 6 hours)
- Add [triggers] crons = ["0 */6 * * *"] to wrangler.toml
- Add setInterval refresh on boot in server/entry-node.ts with
  "licensing.refresh.scheduler.started interval=6h" log
- Add POST /api/licensing/refresh-cron?secret=... public endpoint
  (timing-safe secret comparison) for non-CF platforms
- Extract ZPAN_CLOUD_URL_DEFAULT to shared/constants.ts, replacing
  four duplicated literals
- Document REFRESH_CRON_SECRET + scheduler setup in all 5 non-CF
  deploy guides (vercel, netlify, aws-lambda, azure-functions, cloud-run)

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-24 08:22:10 -04:00
Jasper Van b5be4c5ebd feat: v2.5.0 T2 — AWS Lambda deployment (entry + SAM + workflow + docs) (#331)
- server/entry-lambda.ts: Hono app via hono/aws-lambda handle(); lazy init
  pattern for CJS compatibility and warm-start reuse; serves SPA static
  files from dist/ with MIME detection and index.html fallback
- deploy/aws-lambda/template.yaml: SAM template with Function URL (no API
  Gateway), Node 22, TURSO_* / BETTER_AUTH_SECRET / APP_URL env vars,
  minimal IAM (AWSLambdaBasicExecutionRole)
- .github/workflows/deploy-aws-lambda.yml: 8-step contract (guard upstream,
  check secrets with exact names, resolve tag, checkout, ensure SAM artifact
  bucket, apply Turso migrations, build + sam deploy, post-deploy auto-gen
  BETTER_AUTH_SECRET + patch BETTER_AUTH_URL + write URL to summary)
- package.json: build:lambda script (tsup CJS, external @libsql/client)
- docs/deploy/aws-lambda.md: Prerequisites / Secrets / Trigger /
  First-boot storage / Cost sections
- README.md, V2_ROADMAP.md: link new doc

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-22 01:28:05 -04:00