Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ written to `e2e/screenshots/`.
`dist/` is a static site. Any static host works; the app needs HTTPS for clipboard, camera and
screen capture.

- **Vercel:** import the repository; `vercel.json` sets the build, output directory, security
headers (no framing, HSTS, camera and screen capture limited to this site) and cache rules.
- **Netlify / Cloudflare Pages:** build command `npm run build`, output directory `dist`, and copy
the headers from `vercel.json` into the host's headers file.
- **Cloudflare Workers** (where tick.metricdeck.app runs): `npm run build`, then `npx wrangler deploy`.
`wrangler.jsonc` serves `dist/` with clean paths (`/app` is `app.html`, and `/app.html` redirects
to `/app`); `public/_headers` sets the security headers (no framing, HSTS, camera and screen
capture limited to this site) and cache rules.
- **Netlify / Cloudflare Pages:** build command `npm run build`, output directory `dist`; both read
`public/_headers` as it is.

## Landing page and MetricDeck

Expand All @@ -72,7 +74,7 @@ screen capture.
`/authy-desktop-alternative` (`google-authenticator-on-pc.html`, `authy-desktop-alternative.html`;
same header, footer, styles and script as the landing page, each with its own title, description,
canonical and structured data: article, breadcrumb and FAQ). A new guide needs its file, an entry
in `PAGES` (`vite.config.ts`), a rewrite and redirect in `vercel.json`, a line in `sitemap.xml`
in `PAGES` (`vite.config.ts`), a line in `sitemap.xml`
and `llms.txt`, a link in every page's footer, and its slug in `e2e/run.mjs`.
- `llms.txt` summarises Tick and its pages for AI assistants.
- Structured data names MetricDeck by the same `@id` metricdeck.app uses
Expand All @@ -85,9 +87,8 @@ screen capture.
`utm_source=tickcodes` and a `utm_content` naming its placement, so visits show up in
MetricDeck's analytics.
- The MetricDeck mark is inlined in `index.html` (also saved as `public/metricdeck-icon.svg`).
- Production domain: `tick.metricdeck.app`. In Vercel, add the domain under Project →
Settings → Domains, then create a `CNAME` record for `tick` pointing to the target Vercel
shows. If the domain ever changes, update the canonical, Open Graph and sitemap URLs.
- Production domain: `tick.metricdeck.app`, attached to the Worker by `routes` in `wrangler.jsonc`
(Cloudflare creates its DNS record on deploy; metricdeck.app's DNS is on Cloudflare). If the domain ever changes, update the canonical, Open Graph and sitemap URLs.

## Project layout

Expand Down
13 changes: 13 additions & 0 deletions public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
X-Frame-Options: DENY
Content-Security-Policy: frame-ancestors 'none'
X-Content-Type-Options: nosniff
Referrer-Policy: no-referrer
Permissions-Policy: camera=(self), display-capture=(self), microphone=(), geolocation=()
Strict-Transport-Security: max-age=63072000; includeSubDomains

/assets/*
Cache-Control: public, max-age=31536000, immutable

/sw.js
Cache-Control: no-cache
3 changes: 3 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/app.html /app 301
/google-authenticator-on-pc.html /google-authenticator-on-pc 301
/authy-desktop-alternative.html /authy-desktop-alternative 301
86 changes: 0 additions & 86 deletions vercel.json

This file was deleted.

4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function csp(): Plugin {
};
}

// Pages served at clean paths (/app → app.html). Vercel rewrites them in production
// (vercel.json); this does the same for the dev and preview servers.
// Pages served at clean paths (/app → app.html). Cloudflare does it in production
// (html_handling in wrangler.jsonc); this does the same for the dev and preview servers.
const PAGES = ['app', 'google-authenticator-on-pc', 'authy-desktop-alternative'];

function cleanRoutes(): Plugin {
Expand Down
10 changes: 10 additions & 0 deletions wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "./node_modules/wrangler/config-schema.json",
// Static site on Cloudflare Workers: no code, just dist/. Clean paths (/app serves app.html,
// /app.html redirects to /app) come from html_handling; headers from public/_headers.
"name": "tick",
"compatibility_date": "2026-10-01",
"assets": { "directory": "./dist", "html_handling": "auto-trailing-slash" },
"routes": [{ "pattern": "tick.metricdeck.app", "custom_domain": true }],
"workers_dev": false
}
Loading