Skip to content

Marketing site, docs, and public demo mode - #3

Open
Pranav-Karra-3301 wants to merge 4 commits into
mainfrom
feat/site-and-demo-mode
Open

Pranav-Karra-3301 wants to merge 4 commits into
mainfrom
feat/site-and-demo-mode

Conversation

@Pranav-Karra-3301

Copy link
Copy Markdown
Collaborator

Adds apps/site — the marketing and documentation site, already deployed and live at opentask.pranavkarra.me — plus the demo-mode feature that makes a public sandbox instance safe to expose.

Site (apps/site)

Next.js App Router + Tailwind v4, styled from the app's own semantic tokens so the site and the product share one palette.

/docs and /changelog render docs/*.md and CHANGELOG.md from the repo at build time — that's the reason the site lives in the monorepo rather than its own repo, and why there's no sync step to forget. The Markdown pipeline rewrites GitHub-shaped cross-links (install.md → /docs/install) and repo-relative asset paths, resolved against each document's own directory so ../ links survive.

All 17 pages prerender. Landing, /demo, sitemap.xml, robots.txt, llms.txt.

Demo mode (OPENTASK_DEMO_MODE)

A real server feature, off by default — any self-hoster can run a disposable sandbox with one env var.

  • /api/v1/info publishes the seeded credentials so the login page offers one-click access, and reports resets_at for the in-app countdown.
  • Refuses writes to the surfaces that would let a visitor reach out of the container, fill the disk, or lock the next visitor out: notification channels (arbitrary server-side POST — the one that actually matters), the Todoist importer, attachments, rambles, backups, tokens, push, the iCal token, integrations, PATCH /user, and the better-auth account mutations. Everything else stays fully live — tasks, projects, filters, search, boards, productivity.
  • Skips the nightly backup job and forces the update check off.
  • deploy/demo/ ships a supervisor that wipes, re-seeds, and restarts on a timer. It re-seeds rather than restoring a snapshot because the sample dataset resolves relative dates at seed time, so a golden copy would show yesterday's "today".

Verified in a real container: planted a task, waited out a cycle, confirmed it was gone and the 18 seeded tasks returned with dues re-anchored to today. Steady-state memory 170 MB.

Screenshots

scripts/capture-screenshots.mjs now drives a table of 9 views across light and dark plus a mobile viewport, and emits WebP for the site.

Fixes a silent bug: the dark toggle set data-theme, which appears nowhere in tokens.css (the appearance axis is data-mode), so hero-dark.png had been a light capture. Dark now goes through the real settings path and is asserted.

Verification

pnpm verify green — lint, typecheck, 1,898 tests, build. Live site crawled: no broken links, no unrewritten .md cross-links, no page errors.

🤖 Generated with Claude Code

Pranav-Karra-3301 and others added 4 commits July 25, 2026 18:30
Adds apps/site — the marketing and documentation site for
opentask.pranavkarra.me — plus the demo-mode feature that makes a public
sandbox instance safe to expose.

Site (apps/site)
- Next.js App Router + Tailwind v4, styled from the app's own semantic
  tokens so the site and the product share one palette.
- /docs and /changelog render docs/*.md and CHANGELOG.md from the repo at
  build time, so there is no sync step to forget. The Markdown pipeline
  rewrites GitHub-shaped cross-links (install.md -> /docs/install) and
  repo-relative asset paths, resolved against each document's own
  directory so ../ links survive.
- Landing, /demo, sitemap, robots, and llms.txt. Every page prerenders.

Demo mode (OPENTASK_DEMO_MODE)
- /api/v1/info publishes the seeded credentials so the login page can
  offer one-click access, and reports resets_at for the in-app countdown.
- Refuses writes to the surfaces that would let a visitor reach out of the
  container, fill the disk, or lock the next visitor out: notification
  channels (SSRF), the Todoist importer, attachments, rambles, backups,
  tokens, push, the iCal token, integrations, PATCH /user, and the
  better-auth account mutations. Everything else stays fully live.
- Skips the nightly backup job and forces the update check off.
- deploy/demo/ ships a supervisor that wipes, re-seeds, and restarts on a
  timer. It re-seeds rather than restoring a snapshot because the sample
  dataset resolves relative dates at seed time.

Screenshots
- scripts/capture-screenshots.mjs now drives a table of 9 views across
  light and dark plus a mobile viewport, and emits WebP for the site.
- Fixes a silent bug: the dark toggle set data-theme, which appears
  nowhere in tokens.css (the appearance axis is data-mode), so
  hero-dark.png had been a light capture. Dark now goes through the real
  settings path and is asserted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- .vercelignore: the CLI otherwise walks every node_modules tree and the
  upload stalls before it reaches Vercel.
- installCommand filters to @opentask/site's dependency closure, so the
  build does not compile better-sqlite3 / sharp / the Tauri CLI it never
  uses.
- .gitignore the CLI's .vercel link directory.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Screenshots are cropped to their subject. The seed dataset is small, so an
  uncropped 1440x900 capture was mostly empty scroll area and the interesting
  part rendered tiny. Each shot declares a frame; a minimum-height floor keeps
  sparse views (the saved filter holds two tasks) from becoming letterbox
  slivers. A manifest carries per-image dimensions since the crops no longer
  share an aspect ratio.
- One canvas colour across the whole page: no alternating section bands, no
  section dividers, no filled cards or footer. The nav becomes a floating pill
  that content scrolls under, since it can no longer lean on a bottom border.
- Drops the stats strip.
- Em dashes removed from site copy and from the docs sections added here.
- Adds /api: the real Scalar reference over the server's own OpenAPI document.
  scripts/generate-openapi.mjs builds it from the live Hono app and commits the
  result, because the Vercel build installs only the site's dependencies and so
  cannot generate it, and pointing Scalar at a live instance would need CORS the
  server does not ship. `pnpm verify` fails on a stale spec.
  Scalar's product toolbar and hosted Ask AI button are switched off.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Each capture was cropped to its own subject, so the figures arrived at six
different shapes and the site's grid changed height between sections. Every
desktop crop is now grown on its short axis to 16:10 and slid back inside the
viewport, then scaled to exactly 1440x900 (720x450 for the srcset). Shots
differ only in how far they are zoomed: Quick Add and Reporting land near 1.8x,
the board near 1.2x, Upcoming fills the frame. The phone shot keeps its
portrait shape, which is why manifest.json still carries per-image dimensions.

Two framing guards came out of reviewing the captures:
  - A zoomed crop is never allowed to put its left edge inside the sidebar. A
    slice of half-cut icons and orphaned badge counts reads as a broken shot,
    so the window slides clear of it, or takes the whole app.
  - The cursor parks in the bottom-right corner rather than bottom-centre,
    which sat inside the content column and left a row's hover controls showing
    in the denser views.

Seed: "Ship weekly status update today 4pm" lost its "weekly". The Quick Add
grammar read that as a recurrence and pushed the task to next Monday, so on any
weekday Today held nothing but one overdue task and the hero rendered the empty
state. The previous captures were taken on a Saturday, where "this weekend"
happened to land on the day and hid it. This affects the live demo too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant