Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

feat(site): build the marketing site and the MDX docs

spacesdrivef4c61d50d0ca
diff --git a/site/content/docs/concepts.mdx b/site/content/docs/concepts.mdx
new file mode 100644
index 0000000..55fed4f
--- /dev/null
+++ b/site/content/docs/concepts.mdx
@@ -0,0 +1,34 @@
+export const meta = { title: 'Members and administrators', description: 'Who sets up what, and what each person can and cannot change.' }
+
+## Two roles
+
+### Member
+
+A member signs in to an existing instance with an email and password. Members connect their own YouTube, Instagram and Reddit accounts, read their analytics, publish and schedule posts, and track content. A member never needs a server, a database, API keys or GitHub.
+
+### Administrator
+
+The administrator runs the instance. They create the Supabase project, get the platform keys (YouTube, Instagram, Cloudinary), deploy the backend and frontend to Cloudflare, and keep them running. The administrator is also the person members contact for Instagram tester access or when something is not working.
+
+## Who does what
+
+| Task | Member | Administrator |
+| --- | --- | --- |
+| Sign in and add accounts | Yes | Yes |
+| Read analytics, publish and schedule | Yes | Yes |
+| Request Instagram tester access | Yes, by email | Adds the tester in the Meta app |
+| Set up scheduling | Nothing to do. The server publishes scheduled posts. | Deploys the backend once; optionally adds the GitHub backup |
+| Create and own the Supabase project | No | Yes |
+| Hold API keys and secrets | Never | Yes, as server secrets only |
+| Deploy updates | No | Yes |
+
+## What is shared and what is yours
+
+- **Shared by everyone on the instance:** the YouTube API key, the Instagram (Meta) app, the Cloudinary account and the server itself. These are set once by the administrator.
+- **Yours alone:** the accounts you connect, their access tokens and cookies, your scheduled posts and your tracked content. Other members cannot see them, and the server never sends tokens or cookies back to any browser.
+
+<Callout type="tip" title="Running Twiligent just for yourself?">
+
+Then you are both. Follow [Run your own](/docs/self-host) once, then use the app like any member.
+
+</Callout>
diff --git a/site/content/docs/index.mdx b/site/content/docs/index.mdx
new file mode 100644
index 0000000..012cc0b
--- /dev/null
+++ b/site/content/docs/index.mdx
@@ -0,0 +1,32 @@
+export const meta = { title: 'Twiligent documentation', description: 'Guides for everyone who uses Twiligent, and for the people who run their own copy of it.' }
+
+## What Twiligent does
+
+Twiligent brings your YouTube channels, Instagram professional accounts and Reddit profiles into one place. You see their analytics side by side, publish and schedule Instagram posts, and follow individual Reddit posts and YouTube videos that matter to you.
+
+Twiligent is self-hosted. Every copy of it, called an **instance**, belongs to the person or team who set it up. That person is the instance's **administrator**. Everyone who signs in to it is a **member**.
+
+## Choose your path
+
+Which guides you need depends on one question: did someone give you a Twiligent link to sign in to, or are you setting Twiligent up yourself?
+
+<Cards>
+<Card href="/docs/use/getting-started" title="Use Twiligent" art={0}>You signed in to an instance someone else runs. Connect your accounts, read analytics and schedule posts. Nothing to install.</Card>
+<Card href="/docs/self-host" title="Run your own" art={1}>You want your own instance. Set up Supabase, the platform keys and Cloudflare, step by step, mostly on free plans.</Card>
+<Card href="/docs/reference/environment" title="Reference" art={2}>Every environment variable, how scheduling works, and the security model, in one place.</Card>
+</Cards>
+
+## What you can do
+
+| Area | What it covers |
+| --- | --- |
+| **Analytics** | Subscribers, followers, karma, views, likes and comments across platforms, with per-account detail pages. |
+| **Libraries** | Every YouTube video and Short, every Instagram reel, post and video, and every Reddit post, searchable and filterable. |
+| **Publishing** | Publish photos, Reels and Stories to Instagram now, schedule them for later, or upload many files at once. |
+| **Tracked content** | Follow any Reddit post or YouTube video by link, group them into categories and compare them. |
+
+<Callout type="note" title="Not sure whether you are a member or an administrator?">
+
+If you only ever opened a link and signed in, you are a member: read [Using Twiligent](/docs/use/getting-started). If you created the Supabase project and deployed the app, you are the administrator: read [Run your own](/docs/self-host).
+
+</Callout>
diff --git a/site/content/docs/reference/environment.mdx b/site/content/docs/reference/environment.mdx
new file mode 100644
index 0000000..fc4a1e3
--- /dev/null
+++ b/site/content/docs/reference/environment.mdx
@@ -0,0 +1,62 @@
+export const meta = { title: 'Environment variables', description: 'Every value Twiligent reads, where it comes from, and where it goes.' }
+
+<Callout type="note" title="Members can skip this page">
+
+Only the administrator of an instance sets these. If you sign in to someone else's Twiligent, nothing here applies to you.
+
+</Callout>
+
+## Backend (Cloudflare Worker)
+
+Set each one with `npx wrangler secret put NAME` in `backend/`. For local development, put them in `backend/.dev.vars`, which Git ignores. See [Deploy the backend](/docs/self-host/deploy-backend).
+
+The backend only answers browsers on `FRONTEND_URL` and the addresses in `ALLOWED_ORIGINS`. If the site loads but every page fails to load data, check that `FRONTEND_URL` matches the address in the browser exactly, including `https://`. A backend running on your own computer also accepts the local website on port 5173.
+
+| Name | Needed | Where to get it | Used for |
+| --- | --- | --- | --- |
+| `SUPABASE_URL` | <Badge tone="required">Required</Badge> | Supabase, Project Settings, Data API | Which database the Worker talks to. |
+| `SUPABASE_SERVICE_KEY` <Badge tone="secret">Secret</Badge> | <Badge tone="required">Required</Badge> | Supabase, Project Settings, API Keys, secret key (legacy: service_role) | Reads and writes all tables on behalf of members. |
+| `SUPABASE_ANON_KEY` | <Badge tone="required">Required</Badge> | Supabase, Project Settings, API Keys, publishable key (legacy: anon) | Checks that a sign-in token is genuine. |
+| `YOUTUBE_API_KEY` <Badge tone="secret">Secret</Badge> | <Badge tone="optional">For YouTube</Badge> | Google Cloud, APIs and Services, Credentials | Every YouTube read. |
+| `INSTAGRAM_APP_ID` | <Badge tone="optional">For Instagram</Badge> | Meta app, Instagram, API setup with Instagram business login | Starts Instagram sign-in. |
+| `INSTAGRAM_APP_SECRET` <Badge tone="secret">Secret</Badge> | <Badge tone="optional">For Instagram</Badge> | Same page as the app ID | Exchanges and renews Instagram access tokens. |
+| `CLOUDINARY_CLOUD_NAME` | <Badge tone="optional">For publishing</Badge> | Cloudinary dashboard | Where uploaded media goes. |
+| `CLOUDINARY_UPLOAD_PRESET` | <Badge tone="optional">For publishing</Badge> | Cloudinary, Settings, Upload, Upload presets (unsigned) | Lets browsers upload without the Cloudinary API secret. |
+| `BACKEND_URL` | <Badge tone="optional">For Instagram</Badge> | Your Worker address, no trailing slash | Builds the Instagram redirect URI. |
+| `FRONTEND_URL` | <Badge tone="required">Required</Badge> | Your Pages address | The only site the backend accepts requests from, and where members land after Instagram sign-in. |
+| `ALLOWED_ORIGINS` | <Badge tone="optional">Optional</Badge> | Other addresses the site is served from, comma-separated, for example {'https://twiligent.pages.dev'} | Lets the site call the backend from more than one address. |
+| `UPSTASH_REDIS_REST_URL` | <Badge tone="optional">Optional</Badge> | Upstash database, REST API | Cache address. |
+| `UPSTASH_REDIS_REST_TOKEN` <Badge tone="secret">Secret</Badge> | <Badge tone="optional">Optional</Badge> | Upstash database, REST API | Cache password. |
+| `SEND_EMAIL_HOOK_SECRET` <Badge tone="secret">Secret</Badge> | <Badge tone="optional">Optional</Badge> | Supabase, Authentication, Auth Hooks, Send Email hook | Proves an email request came from your Supabase project. |
+| `RESEND_API_KEY` <Badge tone="secret">Secret</Badge> | <Badge tone="optional">Optional</Badge> | Resend, API Keys (sending access) | Sends verification codes and other sign-in emails. |
+| `EMAIL_FROM` | <Badge tone="optional">Optional</Badge> | A sender on a domain verified in Resend, for example {'Twiligent <[email protected]>'} | The sender of those emails. |
+| `EMAIL_DAILY_LIMIT` | <Badge tone="optional">Optional</Badge> | A whole number; 100 when not set | Emails a day before sign-up points people to Google. |
+
+Platform keys are shared by every member of the instance. Missing ones only switch off that platform: Settings shows which are set, and members see a clear message instead of an error.
+
+## Frontend (Cloudflare Pages)
+
+Set these in `frontend/.env` before running `npm run build` in the top folder of the project, or as GitHub secrets when the deploy workflow builds for you. They are built into the site and are public.
+
+| Name | Needed | Value |
+| --- | --- | --- |
+| `VITE_SUPABASE_URL` | <Badge tone="required">Required</Badge> | Same as SUPABASE_URL. |
+| `VITE_SUPABASE_ANON_KEY` | <Badge tone="required">Required</Badge> | The publishable key. Never the secret key. |
+| `VITE_API_URL` | <Badge tone="required">Required</Badge> | Backend URL plus /api, for example {'https://twiligent.you.workers.dev/api'}. Defaults to {'http://localhost:8787/api'} in development. |
+| `VITE_ADMIN_EMAIL` | <Badge tone="optional">Optional</Badge> | Where members are told to write for Instagram tester access or help. |
+| `VITE_GOOGLE_CLIENT_ID` | <Badge tone="optional">Optional</Badge> | Web client ID from Google Auth Platform. Shows the Sign in with Google button; leave unset to hide it. |
+
+## GitHub Actions secrets
+
+| Name | Used by |
+| --- | --- |
+| `CLOUDFLARE_API_TOKEN` | Both deploy workflows |
+| `CLOUDFLARE_ACCOUNT_ID` | Both deploy workflows |
+| `VITE_SUPABASE_URL`, `VITE_SUPABASE_ANON_KEY`, `VITE_API_URL`, `VITE_ADMIN_EMAIL`, `VITE_GOOGLE_CLIENT_ID` | Frontend deploy workflow |
+| `SUPABASE_URL`, `SUPABASE_SERVICE_KEY` | Backup scheduler (publish-scheduled.yml) |
+
+## Not needed
+
+- `REDDIT_ENCRYPTION_KEY` appears in older notes but is no longer read. Reddit cookies are stored server-side and never returned to the browser.
+- A GitHub personal access token. Earlier versions asked for one in Settings; it was never used and has been removed.
+- A Reddit API key. Members use their own session cookie.
diff --git a/site/content/docs/reference/faq.mdx b/site/content/docs/reference/faq.mdx
new file mode 100644
index 0000000..7f5d571
--- /dev/null
+++ b/site/content/docs/reference/faq.mdx
@@ -0,0 +1,33 @@
+export const meta = { title: 'FAQ', description: 'Short answers to the questions people ask most.' }
+
+### Do I need GitHub to schedule posts?
+
+No. Members never do. Administrators only need the deployed Worker; the GitHub workflow is an optional backup.
+
+### Do I need my own Supabase project?
+
+Only if you run your own instance. Members of someone else's instance use theirs.
+
+### Why can't I connect my Instagram account?
+
+It must be a Business or Creator account, and while the instance's Meta app is in development mode it must be added as a tester. See [Connect your accounts](/docs/use/connect-accounts).
+
+### Can I connect a YouTube channel I do not own?
+
+Yes. YouTube analytics use public data, so any public channel works.
+
+### Does Twiligent publish to YouTube or Reddit?
+
+No. Publishing is Instagram only. YouTube and Reddit are analytics only.
+
+### What does running an instance cost?
+
+For a small team, nothing. Supabase, Cloudflare, Cloudinary and Upstash free plans cover typical use, and the YouTube and Instagram APIs are free.
+
+### How fresh is the data?
+
+Data is fetched when you open a page or choose Refresh, and cached for a short time when Redis is set up. Instagram tokens are renewed nightly.
+
+### Who do I contact for help?
+
+The administrator of your instance: the person who gave you its link. The [Troubleshooting](/docs/use/troubleshooting) page lists what to tell them.
diff --git a/site/content/docs/reference/scheduling.mdx b/site/content/docs/reference/scheduling.mdx
new file mode 100644
index 0000000..af9fa6a
--- /dev/null
+++ b/site/content/docs/reference/scheduling.mdx
@@ -0,0 +1,30 @@
+export const meta = { title: 'How scheduling works', description: 'What happens between choosing Schedule post and the post going live.' }
+
+## For members
+
+Nothing to set up. Pick a time, choose **Schedule post**, and close the browser if you like. The server publishes the post within 15 minutes after the time you picked.
+
+## For administrators
+
+Deploying the backend is all that is required. The Worker's cron trigger runs every 15 minutes and publishes every post that is due. The GitHub workflow is an optional second runner for extra reliability.
+
+### The lifecycle of a post
+
+| Step | Status | What happens |
+| --- | --- | --- |
+| 1 | <Badge>pending</Badge> | The file is on Cloudinary and the post is saved with its time. |
+| 2 | <Badge>publishing</Badge> | A scheduler claims the post. Only one scheduler can claim it, so it is published once. |
+| 3 | <Badge>published</Badge> | Instagram accepted it. The Instagram media ID is saved. |
+| 3 | <Badge>failed</Badge> | Instagram rejected it. The reason is saved and shown in the Error column. |
+
+### Two schedulers, one post
+
+Both schedulers claim a post by changing it from `pending` to `publishing` in a single database update that only succeeds while it is still pending. Whichever arrives second finds nothing to claim and skips it.
+
+### When posts stay pending
+
+- The Worker was never deployed, or its cron triggers were removed. Check **Triggers** on the Worker in the Cloudflare dashboard.
+- `SUPABASE_SERVICE_KEY` or `SUPABASE_URL` is wrong on the Worker.
+- The connected Instagram account's access was removed. Reconnect it.
+
+Twiligent warns members when a post is more than 30 minutes overdue and tells them to contact the administrator.
diff --git a/site/content/docs/reference/security.mdx b/site/content/docs/reference/security.mdx
new file mode 100644
index 0000000..dffb903
--- /dev/null
+++ b/site/content/docs/reference/security.mdx
@@ -0,0 +1,23 @@
+export const meta = { title: 'Security', description: 'How member data is kept apart, and the settings an administrator must get right.' }
+
+## What members can rely on
+
+- Other members cannot see your accounts, scheduled posts or tracked content.
+- Instagram access tokens and Reddit cookies are stored on the server and never sent to any browser, including yours.
+- No member, including you, ever handles the instance's API keys.
+
+## How isolation works
+
+The browser signs in with Supabase and sends its token with every request. The Worker verifies the token and takes the member's ID from it, never from anything the browser sends. Every database query is limited to that ID. Responses are stripped of tokens and cookies before they leave the Worker.
+
+## Administrator responsibilities
+
+| Setting | Why it matters |
+| --- | --- |
+| Row level security on all four tables | The publishable key ships in the website. With security off, anyone could use it to read every table directly. |
+| Secret key only in server secrets | It bypasses all database rules. Keep it in Worker secrets and GitHub Actions secrets only. |
+| Signups | Supabase allows anyone with the address to sign up. Turn signups off for a private instance. |
+| backend/.dev.vars never committed | It holds every secret for local development. |
+| Instagram testers | In development mode, only people you add can connect Instagram. |
+
+The SQL to turn on row level security is on the [Supabase](/docs/self-host/supabase) page.
diff --git a/site/content/docs/self-host/checklist.mdx b/site/content/docs/self-host/checklist.mdx
new file mode 100644
index 0000000..37e89bb
--- /dev/null
+++ b/site/content/docs/self-host/checklist.mdx
@@ -0,0 +1,17 @@
+export const meta = { title: 'Launch checklist', description: 'Confirm everything works before you invite anyone.' }
+
+| Check | How |
+| --- | --- |
+| Backend is up | `/api/health` on your backend URL returns status ok. |
+| Sign-in works | Create an account on the site and sign in. |
+| Keys are detected | Settings, Server API keys shows YouTube, Instagram and Cloudinary as set. |
+| YouTube works | Add any public channel in Accounts. |
+| Instagram works | Connect your own tester account in Accounts. |
+| Publishing works | Schedule a post 5 minutes ahead. It shows Published within 20 minutes. |
+| Data is private | Row level security is on for all four tables (Supabase, Table Editor shows no "RLS disabled" warning). |
+| Signups match your plan | Turn off new signups in Supabase if the instance is private. |
+| Members can reach you | VITE_ADMIN_EMAIL is your address. |
+
+## Tell your members
+
+Send them the site address and a link to [Using Twiligent](/docs/use/getting-started). They need nothing else. If they will connect Instagram, collect their usernames and add them as testers first.
diff --git a/site/content/docs/self-host/cloudinary.mdx b/site/content/docs/self-host/cloudinary.mdx
new file mode 100644
index 0000000..7be1462
--- /dev/null
+++ b/site/content/docs/self-host/cloudinary.mdx
@@ -0,0 +1,22 @@
+export const meta = { title: 'Cloudinary', description: 'Instagram publishes from a public URL, so files are uploaded to Cloudinary first.' }
+
+<Steps>
+<Step title="Create an account">
+
+Sign up at [cloudinary.com](https://cloudinary.com/users/register_free). On the dashboard, copy the **Cloud name**. This is `CLOUDINARY_CLOUD_NAME`.
+
+</Step>
+<Step title="Create an unsigned upload preset">
+
+Open **Settings**, then **Upload**, then **Upload presets**, and choose **Add upload preset**. Set **Signing mode** to **Unsigned** and save. Copy the preset name. This is `CLOUDINARY_UPLOAD_PRESET`.
+
+</Step>
+</Steps>
+
+<Callout type="note" title="Why unsigned">
+
+Browsers upload large videos straight to Cloudinary so they never pass through the Worker. Unsigned presets allow this without exposing your Cloudinary API secret. Both values are only handed to signed-in members.
+
+</Callout>
+
+Without Cloudinary, everything works except publishing and uploading screenshots for tracked Reddit posts.
diff --git a/site/content/docs/self-host/deploy-backend.mdx b/site/content/docs/self-host/deploy-backend.mdx
new file mode 100644
index 0000000..074802d
--- /dev/null
+++ b/site/content/docs/self-host/deploy-backend.mdx
@@ -0,0 +1,66 @@
+export const meta = { title: 'Deploy the backend', description: 'Put the Worker on Cloudflare and give it every secret.' }
+
+<Steps>
+<Step title="Install and sign in">
+
+Run these in the top folder of your copy of the project. One `npm install` there installs the backend and the website together; do not run it inside `backend`, `frontend` or `site`.
+
+```bash
+npm install
+cd backend
+npx wrangler login
+```
+
+A browser window opens to sign in to Cloudflare. Create a free account if you do not have one. Run the rest of the commands on this page from the `backend` folder.
+
+</Step>
+<Step title="Deploy once to get your URL">
+
+```bash
+npx wrangler deploy
+```
+
+Wrangler builds the Worker from `server.ts`, the entry file named in `wrangler.toml`, and prints the Worker address, for example `https://twiligent.your-subdomain.workers.dev`. This is your **backend URL**.
+
+If you changed the code, run `npm run typecheck` in the top folder first. Wrangler does not check TypeScript types, so this is the step that catches a type error before it reaches Cloudflare.
+
+</Step>
+<Step title="Add the secrets">
+
+Run each command and paste the value when asked. Values are encrypted by Cloudflare and never shown again.
+
+```bash
+npx wrangler secret put SUPABASE_URL
+npx wrangler secret put SUPABASE_SERVICE_KEY
+npx wrangler secret put SUPABASE_ANON_KEY
+npx wrangler secret put YOUTUBE_API_KEY
+npx wrangler secret put INSTAGRAM_APP_ID
+npx wrangler secret put INSTAGRAM_APP_SECRET
+npx wrangler secret put CLOUDINARY_CLOUD_NAME
+npx wrangler secret put CLOUDINARY_UPLOAD_PRESET
+npx wrangler secret put BACKEND_URL
+npx wrangler secret put FRONTEND_URL
+```
+
+If you use Redis, also add `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN`. Skip any platform you do not use. `FRONTEND_URL` is the address of the site from the next page; you can set it after deploying the frontend, but the site cannot reach the backend until you do. If the site is served from more than one address, list the others in `ALLOWED_ORIGINS`, separated by commas. To email verification codes, add the secrets in [Email verification codes](/docs/self-host/email-codes).
+
+</Step>
+<Step title="Check it is running">
+
+Open `https://your-backend-url/api/health`. It should return `{"status":"ok"}` with a timestamp. Every response also carries an `X-Request-Id` header; server error messages in the app show the same id, and you can find its log line with `npx wrangler tail`.
+
+</Step>
+</Steps>
+
+## Scheduled jobs
+
+Deploying also registers two cron triggers from `wrangler.toml`. You do not need to set anything up.
+
+| Schedule | What it does |
+| --- | --- |
+| `*/15 * * * *` | Publishes scheduled Instagram posts that are due. |
+| `0 0 * * *` | Renews Instagram access tokens before they expire. |
+
+## Run it locally
+
+Create `backend/.dev.vars` with the same names and values, one per line as `NAME=value`, with `BACKEND_URL=http://localhost:8787` and `FRONTEND_URL=http://localhost:5173`. Then run `npm run dev` in the top folder of the project to start the backend on port 8787 and the website on port 5173 together, or `npm run dev:backend` for the backend alone. The file is ignored by Git; never commit it.
diff --git a/site/content/docs/self-host/deploy-frontend.mdx b/site/content/docs/self-host/deploy-frontend.mdx
new file mode 100644
index 0000000..6a6d762
--- /dev/null
+++ b/site/content/docs/self-host/deploy-frontend.mdx
@@ -0,0 +1,49 @@
+export const meta = { title: 'Deploy the frontend', description: 'Build the website and host it on Cloudflare Pages.' }
+
+<Callout type="note" title="These values are public">
+
+Anything starting with `VITE_` is built into the website and visible to every visitor. Only use the publishable Supabase key here, never the secret one.
+
+</Callout>
+
+<Steps>
+<Step title="Create frontend/.env">
+
+```text
+VITE_SUPABASE_URL=https://abcdefgh.supabase.co
+VITE_SUPABASE_ANON_KEY=sb_publishable_...
+VITE_API_URL=https://twiligent.your-subdomain.workers.dev/api
+```
+
+`VITE_API_URL` is your backend URL followed by `/api`. Leaving off `/api` is the most common setup mistake.
+
+</Step>
+<Step title="Build and deploy">
+
+Run these in the top folder of the project. If you have not installed yet, run `npm install` there first; it covers the website too.
+
+```bash
+npm run build --workspace frontend
+cd frontend
+npx wrangler pages deploy dist --project-name=twiligent
+```
+
+`npm run build --workspace frontend` runs Vite with `frontend/vite.config.ts` and writes the site to `frontend/dist`. (A plain `npm run build` also works, but it builds the `site` folder too, which you do not need.) The first time, Wrangler creates the Pages project and prints the address, for example `https://twiligent.pages.dev`.
+
+</Step>
+<Step title="Point the backend at it">
+
+Set `FRONTEND_URL` on the Worker to that address. The backend only answers requests from it, and Instagram sign-in returns members there:
+
+```bash
+cd ../backend
+npx wrangler secret put FRONTEND_URL
+```
+
+</Step>
+</Steps>
+
+The repository also has a `site` folder: the Twiligent project's own public website and these docs. Your instance does not need it, so there is nothing to build or deploy for it.
+
+Open the site, create your account and connect something. For a custom domain, add it under the Pages project's **Custom domains** tab and update `FRONTEND_URL` to match. To keep the `pages.dev` address working too, add it to `ALLOWED_ORIGINS` on the Worker.
diff --git a/site/content/docs/self-host/email-codes.mdx b/site/content/docs/self-host/email-codes.mdx
new file mode 100644
index 0000000..e3dd828
--- /dev/null
+++ b/site/content/docs/self-host/email-codes.mdx
@@ -0,0 +1,66 @@
+export const meta = { title: 'Email verification codes (optional)', description: 'Confirm each new email account with a 6-digit code, sent free through Resend, with a daily cap.' }
+
+<Callout type="note" title="How it works">
+
+Supabase Auth hands every sign-up, password reset and sign-in email to your backend instead of sending it. The backend checks that the request came from your Supabase project, counts the day's emails, and sends the code through Resend. Resend's free plan sends 100 emails a day, so the backend stops at 100. After that, the sign-up page tells people to sign in with Google instead, and email codes start again at midnight UTC.
+
+</Callout>
+
+<Steps>
+<Step title="Create a Resend account and verify your domain">
+
+Sign up at [resend.com](https://resend.com). Under **Domains**, add the domain you will send from, such as `example.com`, and add the DNS records Resend shows. Emails from an unverified domain are refused. The free plan allows one domain.
+
+Under the domain's **Configuration**, turn off **Click tracking** and **Open tracking**. Click tracking rewrites the confirmation links, and its tracking record must not reuse a name you already serve, such as the subdomain Twiligent runs on: Resend's record replaces it and takes the site offline. If Resend lists a **Tracking** record, skip it.
+
+</Step>
+<Step title="Create an API key">
+
+Under **API Keys**, create a key with **Sending access** for that domain. Copy it; Resend shows it once.
+
+</Step>
+<Step title="Add the email secrets to the backend">
+
+In `backend/`, run:
+
+```bash
+npx wrangler secret put RESEND_API_KEY
+npx wrangler secret put EMAIL_FROM
+```
+
+`EMAIL_FROM` is the sender people see, on your verified domain, for example `Twiligent <[email protected]>`. If you pay for a Resend plan without a daily quota, also set `EMAIL_DAILY_LIMIT` to the number of emails a day you allow.
+
+</Step>
+<Step title="Point Supabase at the backend">
+
+In Supabase, open **Authentication**, **Auth Hooks**, and add a **Send Email** hook of type **HTTPS**. The URL is your backend address followed by `/api/auth/email-hook`, for example `https://twiligent-api.example.workers.dev/api/auth/email-hook`. Generate a secret, copy it, and save the hook.
+
+```bash
+npx wrangler secret put SEND_EMAIL_HOOK_SECRET
+```
+
+Paste the secret exactly as Supabase shows it, starting with `v1,whsec_`.
+
+</Step>
+<Step title="Turn on email confirmation">
+
+Open **Sign In / Providers**, **Email**. Turn on **Confirm email** and keep the email OTP length at 6. New members then enter the code on the sign-up page before they can sign in.
+
+</Step>
+<Step title="Slow down bursts">
+
+Open **Rate Limits** and set **Rate limit for sending emails** to about 30 an hour, so a burst of sign-ups cannot use the whole day at once. The backend also allows at most 5 emails a day to any one address. To stop automated sign-ups, turn on CAPTCHA under **Attack Protection**.
+
+</Step>
+<Step title="Test it">
+
+Create an account with an address you own. The code should arrive within a minute, from your `EMAIL_FROM` address. If it does not, run `npx wrangler tail` in `backend/` while you sign up: a `request failed` line explains why, for example an unverified domain.
+
+</Step>
+</Steps>
+
+<Callout type="warning" title="Every email counts">
+
+Password resets, email changes and security notices go through the same hook and count towards the 100. When the cap is reached, notices are skipped rather than blocking the change they report. Without Redis, the backend cannot count, and Resend's own daily quota is the only limit; the message people see is the same.
+
+</Callout>
diff --git a/site/content/docs/self-host/github.mdx b/site/content/docs/self-host/github.mdx
new file mode 100644
index 0000000..f632a49
--- /dev/null
+++ b/site/content/docs/self-host/github.mdx
@@ -0,0 +1,49 @@
+export const meta = { title: 'GitHub automation', description: 'Deploy on every push, and keep a second scheduler running in case the Worker misses a run.' }
+
+Both parts are optional. Fork [spacesdrive/twiligent](https://github.com/spacesdrive/twiligent) to your own GitHub account first. Add secrets in your fork under **Settings**, **Secrets and variables**, **Actions**, **New repository secret**.
+
+## Deploy on push
+
+The workflows `deploy-backend.yml` and `deploy-frontend.yml` deploy whenever `backend/` or `frontend/` changes on `main`. A change to `shared/`, `tsconfig.base.json`, `package.json` or `package-lock.json` in the top folder deploys both, because both parts use those files. Each workflow installs the packages itself, so there is nothing to install on GitHub. Before deploying, each one checks the TypeScript types and runs the tests, and stops if either fails. A third workflow, `ci.yml`, runs the same checks on every pull request and on pushes to other branches.
+
+| Secret | Where to get it |
+| --- | --- |
+| `CLOUDFLARE_API_TOKEN` | Cloudflare dashboard, **My Profile**, **API Tokens**, **Create Token**, template **Edit Cloudflare Workers**. Add the **Cloudflare Pages: Edit** permission. |
+| `CLOUDFLARE_ACCOUNT_ID` | Cloudflare dashboard, Workers and Pages overview, shown on the right as Account ID. |
+| `VITE_SUPABASE_URL` | Same value as in frontend/.env. |
+| `VITE_SUPABASE_ANON_KEY` | Same value as in frontend/.env. |
+| `VITE_API_URL` | Same value as in frontend/.env, ending in /api. |
+| `VITE_ADMIN_EMAIL` | Optional. Your contact address. |
+| `VITE_GOOGLE_CLIENT_ID` | Optional. Shows Continue with Google on the sign-in page. |
+
+Worker secrets stay in Cloudflare; the backend workflow does not need them.
+
+## Backup scheduler
+
+The Worker already publishes scheduled posts. `publish-scheduled.yml` runs the same job from GitHub every 15 minutes as a safety net, with `node scripts/publish-scheduled.ts` on Node 24. The script needs no packages, so the workflow installs nothing. Each post is claimed before publishing, so it is never posted twice even when both run at once.
+
+<Steps>
+<Step title="Add two secrets">
+
+`SUPABASE_URL` and `SUPABASE_SERVICE_KEY`, with the same values the Worker uses.
+
+</Step>
+<Step title="Enable workflows">
+
+Forks start with Actions turned off. Open the **Actions** tab and choose **I understand my workflows, go ahead and enable them**. Then open **Instagram Scheduled Publisher** and choose **Enable workflow**.
+
+</Step>
+<Step title="Run it once">
+
+Choose **Run workflow**. It worked if the run finishes with a green check and the log says `No posts due for publishing` or shows a Results line.
+
+</Step>
+</Steps>
+
+<Callout type="tip" title="Private forks">
+
+Public repositories get unlimited Actions minutes. A private fork gets 2,000 free minutes a month; change the schedule in the workflow to every 30 minutes to stay inside it.
+
+</Callout>
+
+The in-app version of these steps, with links filled in for your GitHub username, is in **Settings**, **Scheduled publishing**.
diff --git a/site/content/docs/self-host/google-sign-in.mdx b/site/content/docs/self-host/google-sign-in.mdx
new file mode 100644
index 0000000..0887fab
--- /dev/null
+++ b/site/content/docs/self-host/google-sign-in.mdx
@@ -0,0 +1,45 @@
+export const meta = { title: 'Sign in with Google (optional)', description: 'Let members sign in with their Google account, with your name and logo on Google\'s sign-in screen.' }
+
+<Callout type="note" title="How it works">
+
+Twiligent shows Google's own sign-in button. Google returns a signed ID token to the browser, and Supabase verifies it directly. Nothing redirects through your Supabase address, so every domain Google sees is one you own, which is what lets Google approve your logo.
+
+</Callout>
+
+<Steps>
+<Step title="Serve Twiligent from your own domain">
+
+Google only verifies domains you prove you own in [Search Console](https://search.google.com/search-console). Addresses like `twiligent.pages.dev` cannot be verified, so add a custom domain such as `twiligent.example.com` to your Cloudflare Pages project under **Custom domains**, and update `FRONTEND_URL` on the Worker.
+
+</Step>
+<Step title="Set up branding">
+
+In [Google Auth Platform, Branding](https://console.cloud.google.com/auth/branding), enter the app name, support email and a 120 by 120 pixel logo. Set the home page and privacy policy links; both must be on your domain, and the home page must link to the privacy policy. Add your domain under **Authorized domains**. One entry covers all its subdomains.
+
+</Step>
+<Step title="Choose the audience and scopes">
+
+Under **Audience**, pick **External** and publish the app to production. Under **Data access**, add only `openid`, `userinfo.email` and `userinfo.profile`. These are not sensitive, so there is no user cap and no security review.
+
+</Step>
+<Step title="Create the client">
+
+Under **Clients**, create a **Web application**. Add your Twiligent address as an authorized JavaScript origin, plus `http://localhost:5173` for development. No redirect URI is needed. Copy the client ID.
+
+</Step>
+<Step title="Turn on Google in Supabase">
+
+In Supabase, open **Authentication**, **Sign In / Providers**, **Google**. Enable it and paste the client ID into **Client IDs**. Leave **Skip nonce checks** off; Twiligent sends a nonce with every sign-in.
+
+</Step>
+<Step title="Add the client ID to the frontend">
+
+Set `VITE_GOOGLE_CLIENT_ID` in `frontend/.env` and as a GitHub secret, then redeploy. The **Continue with Google** button appears on the sign-in page.
+
+</Step>
+<Step title="Submit for brand verification">
+
+Open **Verification Center** and submit. Google reviews brands with basic scopes in a few business days. Until then sign-in works, but Google shows your domain instead of your name and logo.
+
+</Step>
+</Steps>
diff --git a/site/content/docs/self-host/index.mdx b/site/content/docs/self-host/index.mdx
new file mode 100644
index 0000000..150c36d
--- /dev/null
+++ b/site/content/docs/self-host/index.mdx
@@ -0,0 +1,44 @@
+export const meta = { title: 'Self-hosting overview', description: 'What you need to run your own Twiligent, what it costs, and the order to set it up in.' }
+
+<Callout type="note" title="Only the administrator follows this section">
+
+If you signed in to a Twiligent link someone gave you, you do not need any of this. The server, the keys and scheduling are already handled. Read [Using Twiligent](/docs/use/getting-started) instead.
+
+</Callout>
+
+## How the pieces fit
+
+Twiligent has two parts. The **frontend** is the website people sign in to, hosted on Cloudflare Pages. The **backend** is a Cloudflare Worker that talks to YouTube, Instagram and Reddit, stores data in Supabase, and publishes scheduled posts every 15 minutes. All secrets live in the backend; the frontend only holds values that are safe to be public.
+
+The repository has a third folder, `site`, which is the project's own public website and these docs. You do not need it to run Twiligent.
+
+## Accounts you need
+
+| Service | Needed for | | Cost |
+| --- | --- | --- | --- |
+| Supabase | Sign-in and the database | <Badge tone="required">Required</Badge> | Free plan is enough |
+| Cloudflare | Hosting the backend and frontend | <Badge tone="required">Required</Badge> | Free plan is enough |
+| Google Cloud | YouTube analytics | <Badge tone="optional">For YouTube</Badge> | Free, 10,000 quota units a day |
+| Meta for Developers | Connecting Instagram and publishing | <Badge tone="optional">For Instagram</Badge> | Free |
+| Cloudinary | Hosting media before Instagram fetches it | <Badge tone="optional">For publishing</Badge> | Free plan is enough |
+| Upstash | Caching to save API quota and speed pages up | <Badge tone="optional">Optional</Badge> | Free plan is enough |
+| Resend | Emailing verification codes to new members | <Badge tone="optional">Optional</Badge> | Free, 100 emails a day |
+| GitHub | Deploy on every push, and a backup scheduler | <Badge tone="optional">Optional</Badge> | Free |
+
+Reddit needs no key. Each member pastes their own Reddit session cookie when they connect an account.
+
+## Order of setup
+
+1. [Supabase](/docs/self-host/supabase): create the project, the tables and turn on row level security.
+2. [YouTube API key](/docs/self-host/youtube), [Instagram app](/docs/self-host/instagram), [Cloudinary](/docs/self-host/cloudinary) and optionally [Upstash Redis](/docs/self-host/redis), in any order.
+3. [Deploy the backend](/docs/self-host/deploy-backend) and give it every secret.
+4. [Deploy the frontend](/docs/self-host/deploy-frontend).
+5. Optionally connect [GitHub](/docs/self-host/github), then run through the [launch checklist](/docs/self-host/checklist).
+
+Keep a private note open while you work. Each page tells you which values to copy, and [Environment variables](/docs/reference/environment) lists all of them in one table.
+
+## What you need on your computer
+
+- Node.js 22.18 or newer, and Git. The tests and the backup scheduler script are TypeScript files that Node runs directly, which older versions cannot do.
+- A copy of the code: `git clone https://github.com/spacesdrive/twiligent.git`
+- The project's packages: run `npm install` once in the cloned `twiligent` folder. It installs the backend, the website and the Wrangler command used to deploy them.
diff --git a/site/content/docs/self-host/instagram.mdx b/site/content/docs/self-host/instagram.mdx
new file mode 100644
index 0000000..c45f488
--- /dev/null
+++ b/site/content/docs/self-host/instagram.mdx
@@ -0,0 +1,63 @@
+export const meta = { title: 'Instagram app', description: 'A Meta app lets members sign in with Instagram so Twiligent can read insights and publish.' }
+
+<Callout type="note" title="Before you start">
+
+You need a Meta developer account (free, at [developers.facebook.com](https://developers.facebook.com)) and an Instagram Business or Creator account to test with. You need your backend URL for the redirect; if you have not deployed yet, use `http://localhost:8787` now and add the real one later.
+
+</Callout>
+
+<Steps>
+<Step title="Create the app">
+
+In [My Apps](https://developers.facebook.com/apps) choose **Create app**. When asked for a use case, pick **Other**, then app type **Business**. Give it a name your members will recognise; Instagram shows it on the sign-in screen.
+
+</Step>
+<Step title="Add Instagram">
+
+On the app dashboard, add the **Instagram** product and choose **API setup with Instagram business login**. Do not use the Facebook login variant.
+
+</Step>
+<Step title="Copy the Instagram app ID and secret">
+
+On the Instagram API setup page, copy the **Instagram app ID** and **Instagram app secret**. These are `INSTAGRAM_APP_ID` and `INSTAGRAM_APP_SECRET`.
+
+<Callout type="warning" title="Use the Instagram values, not the Facebook ones">
+
+The app dashboard also shows a Facebook App ID under Settings, Basic. That one does not work here and produces an "Invalid platform app" error.
+
+</Callout>
+
+</Step>
+<Step title="Set the redirect URL">
+
+In **Set up Instagram business login**, open **Business login settings** and add this OAuth redirect URI, replacing the address with your backend URL:
+
+```text
+https://twiligent.your-subdomain.workers.dev/api/auth/instagram/callback
+```
+
+For local development, add `http://localhost:8787/api/auth/instagram/callback` as well. It must match `BACKEND_URL` exactly, with no trailing slash.
+
+</Step>
+<Step title="Add testers">
+
+While the app is in development mode, only Instagram accounts with a tester role can connect. Open **App roles**, then **Roles**, choose **Add people**, pick **Instagram Tester** and enter the Instagram username.
+
+The person then accepts the invite in Instagram under [Apps and websites](https://www.instagram.com/accounts/manage_access/), **Tester invites**. Members are told to email you for this; set your address with `VITE_ADMIN_EMAIL`.
+
+</Step>
+</Steps>
+
+## Permissions Twiligent asks for
+
+| Permission | Why |
+| --- | --- |
+| `instagram_business_basic` | Read the profile, follower count and media list. |
+| `instagram_business_manage_insights` | Read views, reach and other insights. |
+| `instagram_business_content_publish` | Publish photos, Reels and Stories. |
+| `instagram_business_manage_comments` | Read comment counts and comments. |
+| `instagram_business_manage_messages` | Requested with the business login set; not used to send messages. |
+
+## Going live for everyone
+
+To let any Instagram account connect without a tester role, submit the app for **App Review** with the permissions above, then switch it to **Live**. Meta asks for a privacy policy URL, a screencast of each permission in use, and business verification. For a private team, tester roles are usually simpler.
diff --git a/site/content/docs/self-host/redis.mdx b/site/content/docs/self-host/redis.mdx
new file mode 100644
index 0000000..1c97bc6
--- /dev/null
+++ b/site/content/docs/self-host/redis.mdx
@@ -0,0 +1,18 @@
+export const meta = { title: 'Upstash Redis (optional)', description: 'A cache that saves YouTube and Instagram quota, makes pages load faster, and makes rate limits exact.' }
+
+Twiligent works fully without Redis. Every cache read falls back to a live API call, and Redis errors are ignored. If Redis stops answering, the backend gives up on it within a few seconds and stops trying for half a minute, so pages keep loading at the speed of the live APIs. Add it when you have several members or many YouTube channels.
+
+The backend also limits how fast each person and each network can call it, so one client cannot use up the shared YouTube quota. With Redis, those limits are counted once across every Cloudflare location. Without it, each Worker instance counts on its own, so the limits are looser but still apply. There is nothing to configure.
+
+<Steps>
+<Step title="Create a database">
+
+Sign in at [console.upstash.com](https://console.upstash.com), choose **Create database**, and pick the region closest to your Supabase project.
+
+</Step>
+<Step title="Copy the REST values">
+
+On the database page, in the **REST API** section, copy **UPSTASH_REDIS_REST_URL** and **UPSTASH_REDIS_REST_TOKEN**. They are used under exactly those names.
+
+</Step>
+</Steps>
diff --git a/site/content/docs/self-host/supabase.mdx b/site/content/docs/self-host/supabase.mdx
new file mode 100644
index 0000000..69b4731
--- /dev/null
+++ b/site/content/docs/self-host/supabase.mdx
@@ -0,0 +1,105 @@
+export const meta = { title: 'Supabase', description: 'Supabase handles sign-in and stores every account, scheduled post and tracked item.' }
+
+<Steps>
+<Step title="Create a project">
+
+Sign in at [supabase.com/dashboard](https://supabase.com/dashboard) and choose **New project**. Pick a name, a strong database password and the region closest to you. Wait about two minutes for it to start.
+
+</Step>
+<Step title="Create the tables">
+
+Open **SQL Editor**, choose **New query**, paste the SQL below and choose **Run**. It creates the four tables Twiligent uses and turns on row level security for each.
+
+```sql
+create table accounts (
+ id text primary key,
+ user_id uuid not null references auth.users(id) on delete cascade,
+ platform text not null,
+ data jsonb not null
+);
+create index accounts_user_id_idx on accounts(user_id);
+
+create table settings (
+ user_id uuid not null references auth.users(id) on delete cascade,
+ key text not null,
+ value jsonb,
+ primary key (user_id, key)
+);
+
+create table scheduled_posts (
+ id text primary key,
+ user_id uuid not null references auth.users(id) on delete cascade,
+ account_id text not null references accounts(id) on delete cascade,
+ status text not null default 'pending',
+ scheduled_at timestamptz not null,
+ data jsonb
+);
+create index scheduled_posts_due_idx on scheduled_posts(status, scheduled_at);
+
+create table tracked_posts (
+ id text primary key,
+ user_id uuid not null references auth.users(id) on delete cascade,
+ account_id text references accounts(id) on delete set null,
+ url text not null,
+ label text not null default '',
+ category text not null default '',
+ content_type text not null default 'reddit',
+ created_at timestamptz not null default now(),
+ updated_at timestamptz not null default now(),
+ data jsonb
+);
+create index tracked_posts_user_id_idx on tracked_posts(user_id);
+
+alter table accounts enable row level security;
+alter table settings enable row level security;
+alter table scheduled_posts enable row level security;
+alter table tracked_posts enable row level security;
+```
+
+</Step>
+<Step title="Configure sign-in">
+
+Open **Authentication**, then **Sign In / Providers**, then **Email**.
+
+- Turn off **Confirm email** unless you set up [email verification codes](/docs/self-host/email-codes). Otherwise new members never receive a code and cannot sign in.
+- To keep the instance private, turn off **Allow new users to sign up** after you and your team have created accounts. You can also add members yourself under **Authentication**, **Users**, **Add user**.
+
+</Step>
+<Step title="Copy the project URL">
+
+Open **Project Settings**, then **Data API** (or **Integrations**, **Data API**). Copy the **Project URL**, which looks like `https://abcdefgh.supabase.co`. It is used as `SUPABASE_URL` and `VITE_SUPABASE_URL`.
+
+</Step>
+<Step title="Copy the two keys">
+
+Open **Project Settings**, then **API Keys**. Supabase shows either the new key format or the legacy one; both work.
+
+| Key | Looks like | Used as | Safety |
+| --- | --- | --- | --- |
+| Publishable key (legacy: anon) | `sb_publishable_...` | `SUPABASE_ANON_KEY` and `VITE_SUPABASE_ANON_KEY` | <Badge>Safe in the browser</Badge> |
+| Secret key (legacy: service_role) | `sb_secret_...` | `SUPABASE_SERVICE_KEY` | <Badge tone="secret">Server only</Badge> |
+
+<Callout type="danger" title="Never put the secret key in the frontend">
+
+The secret key can read and change every row in the database. It belongs only in the Worker's secrets and, if you use the backup scheduler, in GitHub Actions secrets.
+
+</Callout>
+
+</Step>
+</Steps>
+
+## Already have the tables?
+
+If you created the tables from an older README, make sure `tracked_posts` exists and has the `content_type` column, and that row level security is on. This is safe to run more than once:
+
+```sql
+alter table tracked_posts add column if not exists content_type text not null default 'reddit';
+alter table accounts enable row level security;
+alter table settings enable row level security;
+alter table scheduled_posts enable row level security;
+alter table tracked_posts enable row level security;
+```
+
+### Why row level security with no policies
+
+The backend uses the secret key, which bypasses row level security, and limits every query to the signed-in user itself. Turning security on with no policies means the public publishable key, which ships in the frontend, cannot read or change any table directly. Without it, anyone holding that public key could read other members' data.
diff --git a/site/content/docs/self-host/youtube.mdx b/site/content/docs/self-host/youtube.mdx
new file mode 100644
index 0000000..0563f37
--- /dev/null
+++ b/site/content/docs/self-host/youtube.mdx
@@ -0,0 +1,30 @@
+export const meta = { title: 'YouTube API key', description: 'One shared key lets every member add any public channel.' }
+
+<Steps>
+<Step title="Create a Google Cloud project">
+
+Open [Google Cloud Console](https://console.cloud.google.com/projectcreate) and create a project, for example `twiligent`.
+
+</Step>
+<Step title="Enable the YouTube Data API">
+
+Open [YouTube Data API v3](https://console.cloud.google.com/apis/library/youtube.googleapis.com) in the API Library, make sure your new project is selected, and choose **Enable**.
+
+</Step>
+<Step title="Create the key">
+
+Open **APIs and Services**, then [Credentials](https://console.cloud.google.com/apis/credentials). Choose **Create credentials**, then **API key**. Copy the key; it starts with `AIza`. This is `YOUTUBE_API_KEY`.
+
+</Step>
+<Step title="Restrict the key">
+
+Edit the key. Under **API restrictions** choose **Restrict key** and select only YouTube Data API v3. Leave **Application restrictions** at None, because the key is used by the Worker, not a browser.
+
+</Step>
+</Steps>
+
+<Callout type="tip" title="Quota">
+
+The free quota is 10,000 units a day, shared by all members. Most reads cost 1 unit. Adding [Upstash Redis](/docs/self-host/redis) caches results and makes the quota go much further.
+
+</Callout>
diff --git a/site/content/docs/use/analytics.mdx b/site/content/docs/use/analytics.mdx
new file mode 100644
index 0000000..05082b7
--- /dev/null
+++ b/site/content/docs/use/analytics.mdx
@@ -0,0 +1,22 @@
+export const meta = { title: 'Read your analytics', description: 'What each number means and where it comes from.' }
+
+## Overview
+
+The Overview has six tiles: **Audience**, **Views**, **Content**, **Accounts**, **Comments** and **Likes**. Select a tile to see its detail below. The first time you open it, Twiligent loads recent posts for each account in the background; the numbers fill in after a short wait.
+
+| Metric | How it is counted |
+| --- | --- |
+| Audience | YouTube subscribers plus Instagram followers plus Reddit karma. |
+| Views | YouTube channel views, Instagram views where Instagram reports them, and views on tracked content. |
+| Likes | YouTube likes, Instagram likes and Reddit karma. |
+| Karma | Reddit calls a post's upvotes "score"; Twiligent always shows it as karma. |
+
+## Account pages
+
+Select an account in the sidebar to open its own page. YouTube channels have tabs for videos, engagement, publishing times, growth, Shorts and tags. Instagram and Reddit pages show posting patterns, best days and hours, and top posts.
+
+## Why a number looks wrong
+
+- **Instagram views show a dash.** Instagram does not report views for some older posts or when insights are unavailable. A dash means "not reported", not zero.
+- **Reddit has no view counts.** Reddit stopped publishing views in 2018. You can enter them by hand for tracked Reddit posts.
+- **Numbers are a little old.** Use **Refresh** on an account, or **Refresh all** in the top bar.
diff --git a/site/content/docs/use/connect-accounts.mdx b/site/content/docs/use/connect-accounts.mdx
new file mode 100644
index 0000000..8c260a9
--- /dev/null
+++ b/site/content/docs/use/connect-accounts.mdx
@@ -0,0 +1,52 @@
+export const meta = { title: 'Connect your accounts', description: 'How to add YouTube channels, Instagram professional accounts and Reddit profiles.' }
+
+## YouTube
+
+Open **Accounts**, choose **Add account**, then **YouTube channel**. Paste a channel link, an `@handle` or a channel ID starting with `UC`, choose **Find** to check it, then **Add channel**. Any public channel works; you do not need to own it.
+
+## Instagram
+
+Instagram only connects **Business** or **Creator** accounts. You can switch a personal account to a professional one for free in the Instagram app under Settings, Account type and tools.
+
+### Get tester access first
+
+Most instances run their Meta app in development mode. In that mode Instagram only lets accounts added as **testers** sign in. Without tester access, Instagram shows an error or a blank page.
+
+<Steps>
+<Step title="Ask the administrator">
+
+Email your administrator with your Instagram username. The administrator adds you in the Meta app dashboard.
+
+</Step>
+<Step title="Accept the invite">
+
+Sign in to Instagram on the web and open [Apps and websites](https://www.instagram.com/accounts/manage_access/), then the **Tester invites** tab, and accept the invite. In the Instagram app it is under Settings and privacy, Website permissions, Apps and websites, Tester invites.
+
+</Step>
+<Step title="Connect">
+
+In Twiligent, open **Accounts**, choose **Add account**, then **Instagram account**, then **Continue to Instagram**. Approve every requested permission. Instagram sends you back and the account appears in the list.
+
+</Step>
+</Steps>
+
+<Callout type="note" title="Access lasts 60 days and renews itself">
+
+Instagram access tokens last 60 days. Twiligent renews them automatically every night, so you only reconnect if you remove access in Instagram or change your password.
+
+</Callout>
+
+## Reddit
+
+Reddit blocks most requests from servers, so Twiligent uses your browser session cookie to read your profile and posts.
+
+1. Sign in to reddit.com in your browser.
+2. Open the browser's developer tools (F12), then **Application**, then **Cookies**, then `https://www.reddit.com`.
+3. Find the cookie named `reddit_session` and copy its value.
+4. In Twiligent choose **Add account**, **Reddit account**, enter your username and paste the cookie.
+
+<Callout type="warning" title="Treat the cookie like a password">
+
+It signs in as you. Twiligent stores it on the server and never shows it again. If Reddit signs you out, the cookie stops working: remove the account and add it again with a fresh cookie.
+
+</Callout>
diff --git a/site/content/docs/use/getting-started.mdx b/site/content/docs/use/getting-started.mdx
new file mode 100644
index 0000000..a0bc4f8
--- /dev/null
+++ b/site/content/docs/use/getting-started.mdx
@@ -0,0 +1,43 @@
+export const meta = { title: 'Sign in and first steps', description: 'Everything a member does in the first ten minutes. No installation or setup needed.' }
+
+<Callout type="note" title="This guide is for members">
+
+You are a member if someone gave you a Twiligent link to sign in to. The server, keys and scheduling are already handled by the administrator.
+
+</Callout>
+
+<Steps>
+<Step title="Create your account">
+
+Open your instance's link and choose **Continue with Google**, if your instance offers it. Otherwise choose **Create an account** and use your email and a password of at least 6 characters, then enter the 6-digit code we email you. If you sign in with Google using the same email as an existing account, both open the same account. If you joined with Google and also want a password, set one in **Settings**, **Password**. Forgot it? Choose **Forgot password?** on the sign-in page and enter the 6-digit code we email you with a new password.
+
+</Step>
+<Step title="Connect an account">
+
+Open **Accounts** in the sidebar and choose **Add account**. Pick YouTube, Instagram or Reddit. Each one is explained in [Connect your accounts](/docs/use/connect-accounts).
+
+</Step>
+<Step title="Look around">
+
+The **Overview** fills in within a minute or two. Use the search box at the top of the sidebar, or press `Ctrl K` (`Cmd K` on a Mac), to jump to any page or account.
+
+</Step>
+<Step title="Choose a theme">
+
+Twiligent has a light and a dark theme. Switch with the sun or moon button at the top right, or pick **Match system** in Settings.
+
+</Step>
+</Steps>
+
+## Where things are
+
+| Page | Use it to |
+| --- | --- |
+| **Overview** | See audience, views, content, comments and likes across every account. |
+| **Videos, Shorts** | Browse and sort every video from your YouTube channels. |
+| **Instagram content** | Browse reels, posts and videos with views, likes and comments. |
+| **Reddit posts** | See every post from your Reddit accounts with karma and comments. |
+| **Tracked content** | Follow specific Reddit posts and YouTube videos by link. |
+| **Publish** | Post or schedule to Instagram. |
+| **Accounts** | Add, refresh and remove connected accounts. |
+| **Settings** | Theme, server status and setup guides. |
diff --git a/site/content/docs/use/publishing.mdx b/site/content/docs/use/publishing.mdx
new file mode 100644
index 0000000..373ee7a
--- /dev/null
+++ b/site/content/docs/use/publishing.mdx
@@ -0,0 +1,48 @@
+export const meta = { title: 'Publish and schedule', description: 'Post photos, Reels and Stories to Instagram now or later.' }
+
+## Publish a single post
+
+<Steps>
+<Step title="Choose the type and file">
+
+Open **Publish**, pick **Photo**, **Reel** or **Story**, then choose the file. Photos must be JPEG; Reels must be MP4 or MOV in 9:16; Stories accept either.
+
+</Step>
+<Step title="Write the caption and settings">
+
+Write the caption (up to 2,200 characters). In the panel on the right, pick the account and optionally add alt text, collaborators, tagged people, a location, and for Reels a cover image and audio name.
+
+</Step>
+<Step title="Publish now or schedule">
+
+Under **When**, keep **Publish now**, or pick **Schedule** and set a date and time. Then choose **Publish now** or **Schedule post**.
+
+</Step>
+</Steps>
+
+## What happens after you schedule
+
+The file uploads straight away. The server publishes the post within 15 minutes after the time you picked, even when your browser is closed. There is nothing for a member to set up.
+
+| Status | Meaning |
+| --- | --- |
+| **Pending** | Waiting for its time. You can edit the caption and time, or delete it. |
+| **Publishing** | The server is publishing it right now. |
+| **Published** | Live on Instagram. |
+| **Failed** | Instagram rejected it. The Error column says why. |
+
+<Callout type="warning" title="Pending for more than 30 minutes past its time?">
+
+The scheduler on the server is not running. Email the administrator with the time of the post. Publish shows the same warning automatically.
+
+</Callout>
+
+## Bulk upload
+
+Choose **Bulk upload** to add many files at once. Give each file its own caption or apply one caption to all, then either publish them one after another or **spread them out** from a start time at an interval such as once a day.
+
+## Limits
+
+- Instagram allows 100 posts per account in any 24 hours.
+- Photos up to 8MB; videos up to 300MB and 15 minutes; Stories up to 60 seconds.
+- Publishing needs Cloudinary set up by the administrator. If it is missing, Publish says so.
diff --git a/site/content/docs/use/tracked-content.mdx b/site/content/docs/use/tracked-content.mdx
new file mode 100644
index 0000000..71953a8
--- /dev/null
+++ b/site/content/docs/use/tracked-content.mdx
@@ -0,0 +1,17 @@
+export const meta = { title: 'Track content', description: 'Follow any Reddit post or YouTube video by its link, even ones you did not make.' }
+
+## Add an item
+
+Open **Tracked content** and choose **Track content**. Paste a Reddit post link or a YouTube video or Shorts link. Add an optional label and category, then choose **Track**.
+
+## Categories
+
+Categories group items, for example by campaign. Each category gets its own page in the sidebar with combined views, karma and comments. To set a category on many items, select them with the checkboxes and use **Assign category**.
+
+## Views and images for Reddit posts
+
+Reddit does not report views, so use **Edit** to enter the number from the post's insights page. Reddit posts also have no thumbnail; you can upload a screenshot so you recognise the post at a glance.
+
+## Keep numbers current
+
+Use the refresh button on a row to fetch the latest karma, likes and comments for that item.
diff --git a/site/content/docs/use/troubleshooting.mdx b/site/content/docs/use/troubleshooting.mdx
new file mode 100644
index 0000000..dcd778a
--- /dev/null
+++ b/site/content/docs/use/troubleshooting.mdx
@@ -0,0 +1,16 @@
+export const meta = { title: 'Troubleshooting', description: 'Common problems for members, and who to contact when you are stuck.' }
+
+| Problem | What to do |
+| --- | --- |
+| Instagram shows an error or a blank page when connecting | Your account is probably not a tester yet. See [Get tester access first](/docs/use/connect-accounts). |
+| "This Instagram account is already connected" | It is already in your Accounts list. Refresh it there instead. |
+| Instagram connection says the account type is wrong | Switch the Instagram account to Business or Creator, then connect again. |
+| Reddit says the session cookie is invalid or expired | Remove the Reddit account and add it again with a fresh reddit_session cookie. |
+| A scheduled post stays Pending | Email the administrator. |
+| A scheduled post Failed | Read the Error column. Common causes are a file Instagram does not accept or an account whose access was removed. |
+| Publish says Cloudinary is not set up | Only the administrator can fix this. Let them know. |
+| Analytics will not load | Use Refresh on the account. If it keeps failing, contact the administrator; the platform key may be missing. |
+
+## Contact the administrator
+
+For anything only the person running this instance can fix, email your administrator. Include what you were doing, the account involved and the exact message you saw. If the message ends with a request id, include it; it lets the administrator find what happened.
diff --git a/site/public/_redirects b/site/public/_redirects
new file mode 100644
index 0000000..24b1390
--- /dev/null
+++ b/site/public/_redirects
@@ -0,0 +1,16 @@
+# the app moved to app.twiligent.ujjwal.fyi; links to its old pages land there
+/login https://app.twiligent.ujjwal.fyi/login 301
+/accounts https://app.twiligent.ujjwal.fyi/accounts 301
+/settings https://app.twiligent.ujjwal.fyi/settings 301
+/upload https://app.twiligent.ujjwal.fyi/upload 301
+/videos https://app.twiligent.ujjwal.fyi/videos 301
+/shorts https://app.twiligent.ujjwal.fyi/shorts 301
+/reels https://app.twiligent.ujjwal.fyi/reels 301
+/tracked-content https://app.twiligent.ujjwal.fyi/tracked-content 301
+/tracked-content/* https://app.twiligent.ujjwal.fyi/tracked-content/:splat 301
+/reddit-posts https://app.twiligent.ujjwal.fyi/reddit-posts 301
+/reddit-posts/* https://app.twiligent.ujjwal.fyi/reddit-posts/:splat 301
+/reddit-tracked https://app.twiligent.ujjwal.fyi/tracked-content 301
+/channel/* https://app.twiligent.ujjwal.fyi/channel/:splat 301
+/instagram/* https://app.twiligent.ujjwal.fyi/instagram/:splat 301
+/reddit/* https://app.twiligent.ujjwal.fyi/reddit/:splat 301
diff --git a/site/public/robots.txt b/site/public/robots.txt
new file mode 100644
index 0000000..93448a8
--- /dev/null
+++ b/site/public/robots.txt
@@ -0,0 +1,4 @@
+User-agent: *
+Allow: /
+
+Sitemap: https://twiligent.ujjwal.fyi/sitemap.xml
diff --git a/site/src/components/Footer.tsx b/site/src/components/Footer.tsx
new file mode 100644
index 0000000..b861a74
--- /dev/null
+++ b/site/src/components/Footer.tsx
@@ -0,0 +1,121 @@
+import { Link } from 'react-router';
+import { CHANGELOG_URL, GITHUB_URL, LICENSE_URL, PRIVACY_URL, SIGN_UP_URL } from '@/lib/links';
+import { CheckCircle } from './icons';
+import { Logo, RibbonCrop } from './brand';
+import { Pill } from './Pill';
+
+interface FooterLink {
+ label: string;
+ href: string;
+}
+
+const COLUMNS: { heading: string; links: FooterLink[] }[] = [
+ {
+ heading: 'Product',
+ links: [
+ { label: 'Analytics', href: '/#analytics' },
+ { label: 'Publishing', href: '/#publishing' },
+ { label: 'Tracked content', href: '/docs/use/tracked-content' },
+ { label: 'Libraries', href: '/docs/use/analytics' },
+ ],
+ },
+ {
+ heading: 'Docs',
+ links: [
+ { label: 'Using Twiligent', href: '/docs/use/getting-started' },
+ { label: 'Run your own', href: '/docs/self-host' },
+ { label: 'Reference', href: '/docs/reference/environment' },
+ { label: 'FAQ', href: '/docs/reference/faq' },
+ ],
+ },
+ {
+ heading: 'Project',
+ links: [
+ { label: 'GitHub', href: GITHUB_URL },
+ { label: 'Changelog', href: CHANGELOG_URL },
+ { label: 'MIT licence', href: LICENSE_URL },
+ { label: 'Privacy policy', href: PRIVACY_URL },
+ ],
+ },
+];
+
+const TICKS = ['Open source', 'Your own data', 'Mostly free plans'];
+
+function FooterAnchor({ link }: { link: FooterLink }) {
+ const cls = 'text-[15px] text-ink-muted transition-colors hover:text-ink';
+ if (link.href.startsWith('/'))
+ return (
+ <Link to={link.href} className={cls}>
+ {link.label}
+ </Link>
+ );
+ return (
+ <a href={link.href} target="_blank" rel="noopener noreferrer" className={cls}>
+ {link.label}
+ </a>
+ );
+}
+
+export function Footer() {
+ return (
+ <footer className="mt-24">
+ <div className="relative isolate overflow-hidden bg-fold">
+ <RibbonCrop placement="bottom-left" size="w-[40rem]" className="-z-10" />
+ <RibbonCrop placement="bottom-right" size="w-[30rem]" className="-z-10" />
+ <div className="container-page flex flex-col items-center py-24 text-center text-white md:py-32">
+ <p className="eyebrow text-white/80">Intelligence, folded into everything</p>
+ <h2 className="display mt-4 max-w-[16ch] text-[40px] leading-[46px] md:text-[56px] md:leading-[62px]">
+ Bring every channel into view.
+ </h2>
+ <p className="mt-4 max-w-xl text-lg leading-7 text-white/85">Start on our instance, or run your own.</p>
+ <div className="mt-8 flex w-full flex-col items-center justify-center gap-3 sm:w-auto sm:flex-row">
+ <Pill href={SIGN_UP_URL} variant="dusk" size="lg" className="w-full sm:w-auto">
+ Get started
+ </Pill>
+ <Pill href="/docs/self-host" variant="white" size="lg" className="w-full sm:w-auto">
+ Run your own
+ </Pill>
+ </div>
+ <ul className="mt-6 flex flex-wrap justify-center gap-x-5 gap-y-2 text-sm text-white/85">
+ {TICKS.map(tick => (
+ <li key={tick} className="flex items-center gap-1.5">
+ <CheckCircle className="size-4" />
+ {tick}
+ </li>
+ ))}
+ </ul>
+ </div>
+ </div>
+
+ <div className="bg-surface pb-10">
+ <div className="container-page">
+ <div className="relative -mt-10 rounded-xl border border-line bg-surface-raised px-6 py-10 md:px-12">
+ <div className="grid gap-10 md:grid-cols-[1.4fr_repeat(3,1fr)]">
+ <div className="flex flex-col gap-3">
+ <Logo className="h-7" />
+ <p className="max-w-xs text-[15px] leading-6 text-ink-muted">
+ YouTube, Instagram and Reddit in one dashboard you can run yourself.
+ </p>
+ </div>
+ {COLUMNS.map(column => (
+ <nav key={column.heading} aria-label={column.heading} className="flex flex-col gap-3">
+ <p className="eyebrow text-ink-muted">{column.heading}</p>
+ <ul className="flex flex-col gap-2.5">
+ {column.links.map(link => (
+ <li key={link.label}>
+ <FooterAnchor link={link} />
+ </li>
+ ))}
+ </ul>
+ </nav>
+ ))}
+ </div>
+ <div className="mt-10 border-t border-line pt-6 text-[13px] text-ink-muted">
+ <p>&copy; {new Date().getFullYear()} Twiligent</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </footer>
+ );
+}
diff --git a/site/src/components/MarketingLayout.tsx b/site/src/components/MarketingLayout.tsx
new file mode 100644
index 0000000..6de6579
--- /dev/null
+++ b/site/src/components/MarketingLayout.tsx
@@ -0,0 +1,23 @@
+import { Outlet } from 'react-router';
+import { Navbar } from './Navbar';
+import { Footer } from './Footer';
+import { ScrollManager } from './ScrollManager';
+
+export function MarketingLayout() {
+ return (
+ <>
+ <a
+ href="#main"
+ className="sr-only focus:not-sr-only focus:fixed focus:top-3 focus:left-3 focus:z-[60] focus:rounded-full focus:bg-surface-raised focus:px-4 focus:py-2"
+ >
+ Skip to content
+ </a>
+ <ScrollManager />
+ <Navbar />
+ <main id="main">
+ <Outlet />
+ </main>
+ <Footer />
+ </>
+ );
+}
diff --git a/site/src/components/Navbar.tsx b/site/src/components/Navbar.tsx
new file mode 100644
index 0000000..c0140db
--- /dev/null
+++ b/site/src/components/Navbar.tsx
@@ -0,0 +1,322 @@
+import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
+import type { FocusEvent, PointerEvent } from 'react';
+import { Link, useLocation } from 'react-router';
+import { cn } from '@/lib/cn';
+import { usePrefersReducedMotion } from '@/hooks/usePrefersReducedMotion';
+import { SIGN_IN_URL, SIGN_UP_URL } from '@/lib/links';
+import { AltArrowDown, AltArrowRight, CloseCircle, HamburgerMenu } from './icons';
+import { BAR_LINKS, MENUS } from './navLinks';
+import type { MenuColumn, MenuItem as MenuItemData } from './navLinks';
+import { Logo } from './brand';
+import { Pill } from './Pill';
+import { ThemeToggle } from './ThemeToggle';
+
+const TRIGGER =
+ 'flex items-center gap-1 rounded-full px-3.5 py-2 text-[15px] font-medium text-ink transition-colors duration-150 hover:bg-surface-sunken';
+
+interface SpotBox {
+ left: number;
+ top: number;
+ width: number;
+ height: number;
+ hidden?: boolean;
+}
+
+interface MenuItemProps {
+ item: MenuItemData;
+ onDone: () => void;
+ onHover: (event: PointerEvent<HTMLElement> | FocusEvent<HTMLElement>) => void;
+}
+
+// one entry: an icon in a soft tile, a name, and a line about it
+function MenuItem({ item, onDone, onHover }: MenuItemProps) {
+ const Icon = item.icon;
+ const body = (
+ <>
+ <span className="grid size-10 shrink-0 place-items-center rounded-md bg-surface-sunken text-ink">
+ <Icon className="size-[22px]" />
+ </span>
+ <span className="flex min-w-0 flex-col gap-0.5 text-left">
+ <span className="text-[15px] font-semibold text-ink">{item.title}</span>
+ <span className="text-[13px] text-ink-muted">{item.description}</span>
+ </span>
+ </>
+ );
+ const cls = 'relative z-10 flex items-center gap-3.5 rounded-md px-3 py-2.5';
+ const events = { onPointerEnter: onHover, onFocus: onHover };
+ if (item.href.startsWith('/')) {
+ return (
+ <Link to={item.href} className={cls} onClick={onDone} {...events}>
+ {body}
+ </Link>
+ );
+ }
+ return (
+ <a href={item.href} target="_blank" rel="noopener noreferrer" className={cls} onClick={onDone} {...events}>
+ {body}
+ </a>
+ );
+}
+
+interface ColumnsProps {
+ columns: MenuColumn[];
+ onDone: () => void;
+ stacked?: boolean;
+}
+
+// one soft highlight behind the items that slides to whichever the pointer or keyboard is on
+function Columns({ columns, onDone, stacked = false }: ColumnsProps) {
+ const surface = useRef<HTMLDivElement>(null);
+ const [spot, setSpot] = useState<SpotBox | null>(null);
+ const hover = (event: PointerEvent<HTMLElement> | FocusEvent<HTMLElement>) => {
+ const box = surface.current?.getBoundingClientRect();
+ if (!box) return;
+ const r = event.currentTarget.getBoundingClientRect();
+ setSpot({ left: r.left - box.left, top: r.top - box.top, width: r.width, height: r.height });
+ };
+ return (
+ <div
+ ref={surface}
+ onPointerLeave={() => setSpot(s => s && { ...s, hidden: true })}
+ className={cn('relative flex gap-5', stacked && 'flex-col gap-4')}
+ >
+ <span
+ aria-hidden="true"
+ className="pointer-events-none absolute rounded-md bg-surface-sunken"
+ style={{
+ left: spot?.left ?? 0,
+ top: spot?.top ?? 0,
+ width: spot?.width ?? 0,
+ height: spot?.height ?? 0,
+ opacity: spot && !spot.hidden ? 1 : 0,
+ transition:
+ 'opacity 130ms ease, left 220ms var(--ease-panel), top 220ms var(--ease-panel), width 220ms var(--ease-panel), height 220ms var(--ease-panel)',
+ }}
+ />
+ {columns.map(column => (
+ <div key={column.heading} className="min-w-0 flex-1">
+ <p className="eyebrow px-3 pb-2 text-ink-muted">{column.heading}</p>
+ <ul className="flex flex-col gap-1">
+ {column.items.map(item => (
+ <li key={item.title}>
+ <MenuItem item={item} onDone={onDone} onHover={hover} />
+ </li>
+ ))}
+ </ul>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+// a floating island; a menu opens inside it below a hairline, so the bar and its panel read as one surface that grows
+export function Navbar() {
+ const reduce = usePrefersReducedMotion();
+ const location = useLocation();
+ const island = useRef<HTMLDivElement>(null);
+ const closeTimer = useRef<number | undefined>(undefined);
+ const [open, setOpen] = useState<string | null>(null);
+ const [scrolled, setScrolled] = useState(false);
+
+ useEffect(() => {
+ const onScroll = () => setScrolled(window.scrollY > 8);
+ onScroll();
+ window.addEventListener('scroll', onScroll, { passive: true });
+ return () => window.removeEventListener('scroll', onScroll);
+ }, []);
+
+ // moving to another page closes the menu behind it
+ const here = location.pathname + location.hash;
+ const [lastPath, setLastPath] = useState(here);
+ if (here !== lastPath) {
+ setLastPath(here);
+ setOpen(null);
+ }
+
+ const close = useCallback(() => setOpen(null), []);
+
+ // a menu opened from the keyboard takes focus to its first item, and Escape hands focus back to its button
+ const trigger = useRef<HTMLButtonElement | null>(null);
+ const openFromKeyboard = (id: string, button: HTMLButtonElement) => {
+ trigger.current = button;
+ setOpen(id);
+ window.requestAnimationFrame(() => document.querySelector<HTMLElement>('#nav-panel a')?.focus());
+ };
+
+ useEffect(() => {
+ if (!open) return;
+ const onKey = (event: KeyboardEvent) => {
+ if (event.key !== 'Escape') return;
+ setOpen(null);
+ trigger.current?.focus();
+ trigger.current = null;
+ };
+ const onDown = (event: globalThis.PointerEvent) => {
+ if (!island.current?.contains(event.target as Node)) setOpen(null);
+ };
+ document.addEventListener('keydown', onKey);
+ document.addEventListener('pointerdown', onDown);
+ return () => {
+ document.removeEventListener('keydown', onKey);
+ document.removeEventListener('pointerdown', onDown);
+ };
+ }, [open]);
+
+ // hovering opens at once; leaving waits a moment so a pointer cutting a corner into the panel does not shut it
+ const hoverOpen = (id: string) => (event: PointerEvent) => {
+ if (event.pointerType !== 'mouse') return;
+ window.clearTimeout(closeTimer.current);
+ setOpen(id);
+ };
+ const hoverLeave = (event: PointerEvent) => {
+ if (event.pointerType !== 'mouse' || open === 'mobile') return;
+ closeTimer.current = window.setTimeout(() => setOpen(null), 160);
+ };
+ const hoverStay = () => window.clearTimeout(closeTimer.current);
+
+ // the panel keeps showing the last menu while it closes, so its contents fade with it
+ const [shown, setShown] = useState<string | null>(null);
+ if (open && open !== shown) setShown(open);
+ const menu = MENUS.find(m => m.id === shown);
+ const raised = scrolled || open;
+
+ // the panel's height follows its contents, so it eases between menus of different sizes
+ const contents = useRef<HTMLDivElement>(null);
+ const [height, setHeight] = useState(0);
+ useLayoutEffect(() => {
+ const el = contents.current;
+ if (!el) return;
+ const observer = new ResizeObserver(() => setHeight(el.offsetHeight));
+ observer.observe(el);
+ return () => observer.disconnect();
+ }, []);
+
+ return (
+ <header className="fixed inset-x-0 top-0 z-50 pt-3 md:pt-4">
+ <div className="container-page">
+ <div
+ ref={island}
+ onPointerLeave={hoverLeave}
+ onPointerEnter={hoverStay}
+ className={cn(
+ 'overflow-hidden rounded-lg ring-1 backdrop-blur-md transition-[background-color,box-shadow] duration-300 ease-out',
+ raised ? 'bg-surface-raised/95 shadow-md ring-line' : 'bg-surface-raised/70 ring-line/70',
+ )}
+ >
+ <nav
+ aria-label="Main"
+ className="flex h-16 items-center justify-between gap-3 px-4 md:h-[68px] md:px-6 lg:grid lg:grid-cols-[1fr_auto_1fr]"
+ >
+ <Link to="/" aria-label="Twiligent home" className="flex min-h-11 shrink-0 items-center justify-self-start">
+ <Logo className="h-6 md:h-7" />
+ </Link>
+
+ <ul className="hidden items-center gap-1 justify-self-center lg:flex">
+ {MENUS.map(m => (
+ <li key={m.id}>
+ <button
+ type="button"
+ aria-expanded={open === m.id}
+ aria-controls="nav-panel"
+ onPointerEnter={hoverOpen(m.id)}
+ onClick={event => {
+ // detail is 0 when Enter or Space pressed the button rather than a pointer
+ if (event.detail === 0 && open !== m.id) openFromKeyboard(m.id, event.currentTarget);
+ else setOpen(current => (current === m.id ? null : m.id));
+ }}
+ className={cn(TRIGGER, open === m.id && 'bg-surface-sunken')}
+ >
+ {m.label}
+ <AltArrowDown
+ className={cn('-mr-0.5 size-4 transition-transform duration-200', open === m.id && 'rotate-180')}
+ />
+ </button>
+ </li>
+ ))}
+ {BAR_LINKS.map(link => (
+ <li key={link.href}>
+ <Link to={link.href} className={TRIGGER} onPointerEnter={() => setOpen(null)}>
+ {link.label}
+ </Link>
+ </li>
+ ))}
+ </ul>
+
+ <div className="flex items-center gap-2 justify-self-end">
+ <ThemeToggle className="hidden sm:flex" />
+ <span className="hidden md:inline-flex">
+ <Pill href={SIGN_IN_URL} variant="soft" size="sm">
+ Sign in
+ </Pill>
+ </span>
+ <Pill href={SIGN_UP_URL} size="sm" className="pr-3">
+ Get started
+ <AltArrowRight className="-mr-0.5 size-4 transition-transform group-hover:translate-x-0.5" />
+ </Pill>
+ <button
+ type="button"
+ aria-expanded={open === 'mobile'}
+ aria-controls="nav-panel"
+ aria-label={open === 'mobile' ? 'Close menu' : 'Open menu'}
+ onClick={() => setOpen(current => (current === 'mobile' ? null : 'mobile'))}
+ className="flex size-10 items-center justify-center rounded-full text-ink hover:bg-surface-sunken lg:hidden"
+ >
+ {open === 'mobile' ? <CloseCircle className="size-6" /> : <HamburgerMenu className="size-6" />}
+ </button>
+ </div>
+ </nav>
+
+ <div
+ id="nav-panel"
+ inert={!open}
+ className="overflow-hidden"
+ style={{
+ height: open ? height : 0,
+ opacity: open ? 1 : 0,
+ transition: reduce ? 'none' : 'height 380ms var(--ease-panel), opacity 240ms var(--ease-panel)',
+ }}
+ >
+ <div ref={contents}>
+ {shown && (
+ <div key={shown} className="nav-panel-in mx-4 border-t border-line pt-4 pb-6 md:mx-6">
+ {shown === 'mobile' ? (
+ <div className="max-h-[calc(100svh-120px)] space-y-6 overflow-x-hidden overflow-y-auto">
+ {MENUS.map(m => (
+ <Columns key={m.id} columns={m.columns} onDone={close} stacked />
+ ))}
+ <div className="flex flex-col gap-2 border-t border-line pt-5">
+ {BAR_LINKS.map(link => (
+ <Link
+ key={link.href}
+ to={link.href}
+ className="px-3 py-1.5 text-[15px] font-semibold text-ink"
+ >
+ {link.label}
+ </Link>
+ ))}
+ <div className="mt-2 flex flex-col gap-2 sm:flex-row">
+ <Pill href={SIGN_UP_URL} className="w-full sm:w-auto">
+ Get started
+ </Pill>
+ <Pill href={SIGN_IN_URL} variant="soft" className="w-full sm:w-auto">
+ Sign in
+ </Pill>
+ </div>
+ <div className="flex items-center justify-between px-3 pt-2 text-sm text-ink-muted">
+ Theme
+ <ThemeToggle />
+ </div>
+ </div>
+ </div>
+ ) : (
+ menu && <Columns columns={menu.columns} onDone={close} />
+ )}
+ </div>
+ )}
+ </div>
+ </div>
+ </div>
+ </div>
+ </header>
+ );
+}
diff --git a/site/src/components/Pill.tsx b/site/src/components/Pill.tsx
new file mode 100644
index 0000000..44afcfd
--- /dev/null
+++ b/site/src/components/Pill.tsx
@@ -0,0 +1,58 @@
+import type { ReactNode } from 'react';
+import { Link } from 'react-router';
+import { cn } from '@/lib/cn';
+
+// dusk and white sit on the fold gradient, where the theme colours would not hold contrast
+export type PillVariant = 'accent' | 'soft' | 'ink' | 'dusk' | 'white';
+export type PillSize = 'sm' | 'md' | 'lg';
+
+const VARIANTS: Record<PillVariant, string> = {
+ accent: 'bg-accent text-on-accent hover:bg-accent-hover',
+ soft: 'bg-surface-raised text-ink ring-1 ring-line hover:ring-line-strong',
+ ink: 'bg-ink text-ink-inverse hover:bg-ink/85',
+ dusk: 'bg-dusk text-white hover:bg-oxblood',
+ white: 'bg-white text-dusk hover:bg-paper',
+};
+
+const SIZES: Record<PillSize, string> = {
+ sm: 'h-9 px-4 text-sm',
+ md: 'h-11 px-5 text-[15px]',
+ lg: 'h-[50px] px-7 text-[17px]',
+};
+
+export interface PillProps {
+ href: string;
+ variant?: PillVariant;
+ size?: PillSize;
+ className?: string;
+ children: ReactNode;
+ onClick?: () => void;
+}
+
+// the brand's capsule button; a path inside the site uses the router, anything else is a plain link
+export function Pill({ href, variant = 'accent', size = 'md', className, children, onClick }: PillProps) {
+ const cls = cn(
+ 'group inline-flex shrink-0 items-center justify-center gap-2 rounded-full font-semibold whitespace-nowrap transition-colors duration-150',
+ VARIANTS[variant],
+ SIZES[size],
+ className,
+ );
+ if (href.startsWith('/')) {
+ return (
+ <Link to={href} className={cls} onClick={onClick}>
+ {children}
+ </Link>
+ );
+ }
+ const external = !href.startsWith('https://app.twiligent.ujjwal.fyi');
+ return (
+ <a
+ href={href}
+ className={cls}
+ onClick={onClick}
+ {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}
+ >
+ {children}
+ </a>
+ );
+}
diff --git a/site/src/components/ScrollManager.tsx b/site/src/components/ScrollManager.tsx
new file mode 100644
index 0000000..9245e50
--- /dev/null
+++ b/site/src/components/ScrollManager.tsx
@@ -0,0 +1,22 @@
+import { useEffect } from 'react';
+import { useLocation } from 'react-router';
+
+// a new page starts at the top; a link with #section lands on that section once it has rendered
+export function ScrollManager() {
+ const { pathname, hash } = useLocation();
+ useEffect(() => {
+ if (!hash) {
+ window.scrollTo({ top: 0 });
+ return;
+ }
+ const id = decodeURIComponent(hash.slice(1));
+ let tries = 0;
+ const find = () => {
+ const target = document.getElementById(id);
+ if (target) target.scrollIntoView({ block: 'start' });
+ else if (tries++ < 20) window.setTimeout(find, 50);
+ };
+ find();
+ }, [pathname, hash]);
+ return null;
+}
diff --git a/site/src/components/ThemeToggle.tsx b/site/src/components/ThemeToggle.tsx
new file mode 100644
index 0000000..98c8b97
--- /dev/null
+++ b/site/src/components/ThemeToggle.tsx
@@ -0,0 +1,21 @@
+import { Moon, Sun } from './icons';
+import { useTheme } from '@/lib/theme';
+import { cn } from '@/lib/cn';
+
+export function ThemeToggle({ className }: { className?: string }) {
+ const [theme, toggle] = useTheme();
+ const next = theme === 'dark' ? 'light' : 'dark';
+ return (
+ <button
+ type="button"
+ onClick={toggle}
+ aria-label={`Switch to the ${next} theme`}
+ className={cn(
+ 'flex size-10 items-center justify-center rounded-full text-ink-muted transition-colors hover:bg-surface-sunken hover:text-ink',
+ className,
+ )}
+ >
+ {theme === 'dark' ? <Sun className="size-5" /> : <Moon className="size-5" />}
+ </button>
+ );
+}
diff --git a/site/src/components/brand.tsx b/site/src/components/brand.tsx
new file mode 100644
index 0000000..a6e1227
--- /dev/null
+++ b/site/src/components/brand.tsx
@@ -0,0 +1,76 @@
+import { cn } from '@/lib/cn';
+
+export interface LogoProps {
+ // sets the height; the lockup keeps its own proportions
+ className?: string;
+}
+
+// the primary lockup on paper and the reversed one on dusk; the kit's files, never redrawn
+export function Logo({ className }: LogoProps) {
+ return (
+ <span className={cn('relative inline-flex items-center', className ?? 'h-7')}>
+ <img src="/brand/twiligent-lockup-horizontal.svg" alt="Twiligent" className="h-full w-auto dark:hidden" />
+ <img
+ src="/brand/twiligent-lockup-horizontal-reversed.svg"
+ alt="Twiligent"
+ className="hidden h-full w-auto dark:block"
+ />
+ </span>
+ );
+}
+
+export function Mark({ className }: LogoProps) {
+ return <img src="/brand/twiligent-mark-color.svg" alt="" className={cn('w-auto', className ?? 'h-10')} />;
+}
+
+export type RibbonPlacement = 'bottom-right' | 'top-right' | 'bottom-left' | 'top-left';
+
+const PLACEMENTS: Record<RibbonPlacement, string> = {
+ 'bottom-right': '-right-[12%] -bottom-[38%]',
+ 'top-right': '-right-[14%] -top-[40%]',
+ 'bottom-left': '-left-[12%] -bottom-[40%]',
+ 'top-left': '-left-[14%] -top-[38%]',
+};
+
+export interface RibbonCropProps {
+ placement?: RibbonPlacement;
+ // width of the ribbon against its panel; it stays whole and unstretched, only its edge bleeds off
+ size?: string;
+ className?: string;
+}
+
+// the brand's graphic: a large single-colour crop of the ribbon at 14% white, bleeding off one corner
+export function RibbonCrop({ placement = 'bottom-right', size = 'w-[58%]', className }: RibbonCropProps) {
+ return (
+ <img
+ src="/brand/twiligent-mark-white.svg"
+ alt=""
+ aria-hidden="true"
+ className={cn(
+ 'pointer-events-none absolute aspect-[1921/1663] h-auto max-w-none opacity-[0.14] select-none',
+ size,
+ PLACEMENTS[placement],
+ className,
+ )}
+ />
+ );
+}
+
+export type BandTone = 'fold' | 'dusk';
+
+export interface FoldBandProps {
+ tone?: BandTone;
+ placement?: RibbonPlacement;
+ className?: string;
+ children?: React.ReactNode;
+}
+
+// a panel in the fold gradient or deep dusk with a ribbon crop; mockups sit on it the way Activepieces sets them on a painted scene
+export function FoldBand({ tone = 'fold', placement = 'bottom-right', className, children }: FoldBandProps) {
+ return (
+ <div className={cn('relative isolate overflow-hidden', tone === 'fold' ? 'bg-fold' : 'bg-dusk-panel', className)}>
+ <RibbonCrop placement={placement} className="-z-10" />
+ {children}
+ </div>
+ );
+}
diff --git a/site/src/components/icons.tsx b/site/src/components/icons.tsx
new file mode 100644
index 0000000..d766818
--- /dev/null
+++ b/site/src/components/icons.tsx
@@ -0,0 +1,68 @@
+// generated by build/genIcons.ts; edit the list there and run `npm run icons --workspace site`
+// icons from Solar by 480 Design, CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), credited in THIRD_PARTY_NOTICES.md
+import type { SVGProps } from 'react';
+
+export type IconProps = Omit<SVGProps<SVGSVGElement>, 'dangerouslySetInnerHTML' | 'children'>;
+export type Icon = (props: IconProps) => React.JSX.Element;
+
+// each icon draws in currentColor at 1em, so it takes its colour and size from the text beside it
+function solar(markup: string): Icon {
+ return function SolarIcon(props: IconProps) {
+ return <svg viewBox="0 0 24 24" width="1em" height="1em" aria-hidden="true" focusable="false" {...props} dangerouslySetInnerHTML={{ __html: markup }} />;
+ };
+}
+
+export const Book = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M4.72718 2.71244C5.03258 2.41324 5.46135 2.21816 6.27103 2.11151C7.10452 2.00172 8.2092 2 9.7931 2H14.2069C15.7908 2 16.8955 2.00172 17.729 2.11151C18.5387 2.21816 18.9674 2.41324 19.2728 2.71244C19.5782 3.01165 19.7773 3.43172 19.8862 4.22499C19.9982 5.04159 20 6.12387 20 7.67568V15.5135L7.34563 15.5135C6.44305 15.5132 5.82716 15.513 5.29899 15.6517C4.82674 15.7756 4.38867 15.9781 4 16.2442V7.67568C4 6.12387 4.00176 5.04159 4.11382 4.225C4.22268 3.43172 4.42179 3.01165 4.72718 2.71244ZM7.58621 5.78378C7.12914 5.78378 6.75862 6.1468 6.75862 6.59459C6.75862 7.04239 7.12914 7.40541 7.58621 7.40541H16.4138C16.8709 7.40541 17.2414 7.04239 17.2414 6.59459C17.2414 6.1468 16.8709 5.78378 16.4138 5.78378H7.58621ZM6.75862 10.3784C6.75862 9.93058 7.12914 9.56757 7.58621 9.56757H13.1034C13.5605 9.56757 13.931 9.93058 13.931 10.3784C13.931 10.8262 13.5605 11.1892 13.1034 11.1892H7.58621C7.12914 11.1892 6.75862 10.8262 6.75862 10.3784Z\" clip-rule=\"evenodd\"/><path d=\"M7.47341 17.1351C6.39395 17.1351 6.01657 17.1421 5.72738 17.218C4.93365 17.4264 4.30088 18.0044 4.02952 18.7558C4.0463 19.1382 4.07259 19.4746 4.11382 19.775C4.22268 20.5683 4.42179 20.9884 4.72718 21.2876C5.03258 21.5868 5.46135 21.7818 6.27103 21.8885C7.10452 21.9983 8.2092 22 9.7931 22H14.2069C15.7908 22 16.8955 21.9983 17.729 21.8885C18.5387 21.7818 18.9674 21.5868 19.2728 21.2876C19.4894 21.0753 19.6526 20.8023 19.768 20.3784H7.58621C7.12914 20.3784 6.75862 20.0154 6.75862 19.5676C6.75862 19.1198 7.12914 18.7568 7.58621 18.7568H19.9704C19.9909 18.2908 19.9972 17.7564 19.9991 17.1351H7.47341Z\"/></g>");
+export const UsersGroup = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M9.00098 13.001C12.867 13.001 16.001 14.7918 16.001 17.001C16.001 19.2101 12.867 21.001 9.00098 21.001C5.13498 21.001 2.00098 19.2101 2.00098 17.001C2.00098 14.7918 5.13498 13.001 9.00098 13.001Z\"/><path d=\"M16.4766 14.001C18.9615 14.0011 20.9996 15.3434 21 17C21 18.6569 18.9638 20 16.4785 20C17.2107 19.1997 17.7148 18.1955 17.7148 17.002C17.7148 15.8071 17.2099 14.8017 16.4766 14.001Z\"/><path d=\"M9.00098 2C11.2101 2 13.001 3.79086 13.001 6C13.001 8.20914 11.2101 10 9.00098 10C6.79184 10 5.00098 8.20914 5.00098 6C5.00098 3.79086 6.79184 2 9.00098 2Z\"/><path d=\"M15 3.00098C16.6567 3.00118 18 4.34425 18 6.00098C17.9999 7.6576 16.6566 9.00078 15 9.00098C14.6388 9.00098 14.2924 8.93633 13.9717 8.81934C14.4445 7.98748 14.7148 7.02523 14.7148 6C14.7148 4.97534 14.4449 4.0132 13.9727 3.18164C14.2931 3.06489 14.6392 3.00098 15 3.00098Z\"/></g>");
+export const Login = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M3.5 9.56757V14.4324C3.5 16.7258 3.5 17.8724 4.22162 18.5849C4.87718 19.2321 5.89572 19.2913 7.81827 19.2968C7.81303 19.262 7.80803 19.2271 7.80324 19.192C7.68837 18.3484 7.68839 17.2759 7.68841 15.9453L7.68841 15.8919C7.68841 15.4889 8.01933 15.1622 8.42754 15.1622C8.83575 15.1622 9.16667 15.4889 9.16667 15.8919C9.16667 17.2885 9.16824 18.2626 9.26832 18.9975C9.36554 19.7114 9.54337 20.0895 9.81613 20.3588C10.0889 20.6281 10.4718 20.8037 11.195 20.8996C11.9394 20.9985 12.926 21 14.3406 21H15.3261C16.7407 21 17.7273 20.9985 18.4717 20.8996C19.1948 20.8037 19.5778 20.6281 19.8505 20.3588C20.1233 20.0895 20.3011 19.7114 20.3983 18.9975C20.4984 18.2626 20.5 17.2885 20.5 15.8919V8.10811C20.5 6.71149 20.4984 5.73743 20.3983 5.0025C20.3011 4.28855 20.1233 3.91048 19.8505 3.6412C19.5778 3.37192 19.1948 3.19635 18.4717 3.10036C17.7273 3.00155 16.7407 3 15.3261 3H14.3406C12.926 3 11.9394 3.00155 11.195 3.10036C10.4718 3.19635 10.0889 3.37192 9.81613 3.6412C9.54337 3.91048 9.36554 4.28855 9.26832 5.0025C9.16824 5.73743 9.16667 6.71149 9.16667 8.10811C9.16667 8.51113 8.83575 8.83784 8.42754 8.83784C8.01933 8.83784 7.68841 8.51113 7.68841 8.10811L7.68841 8.05472C7.68839 6.72409 7.68837 5.65156 7.80324 4.80803C7.80803 4.77288 7.81303 4.73795 7.81827 4.70325C5.89572 4.70867 4.87718 4.76792 4.22162 5.41515C3.5 6.12759 3.5 7.27425 3.5 9.56757ZM13.385 14.9484L15.8487 12.516C16.1374 12.231 16.1374 11.769 15.8487 11.484L13.385 9.05157C13.0963 8.76659 12.6283 8.76659 12.3397 9.05157C12.051 9.33655 12.051 9.79859 12.3397 10.0836L13.5417 11.2703H6.45652C6.04831 11.2703 5.71739 11.597 5.71739 12C5.71739 12.403 6.04831 12.7297 6.45652 12.7297H13.5417L12.3397 13.9164C12.051 14.2014 12.051 14.6635 12.3397 14.9484C12.6283 15.2334 13.0963 15.2334 13.385 14.9484Z\" clip-rule=\"evenodd\"/>");
+export const Plug = /* @__PURE__ */ solar("<path fill=\"currentColor\" d=\"M12 2C6.47715 2 2 6.48336 2 12.0139C2 17.2918 6.07759 21.6161 11.2503 22L11.2499 15.9387C9.67737 15.5949 8.5 14.1924 8.5 12.5146V12.0139C8.5 11.4608 8.94772 11.0125 9.5 11.0125H9.75V9.0097C9.75 8.59491 10.0858 8.25866 10.5 8.25866C10.9142 8.25866 11.25 8.59491 11.25 9.0097V11.0125H12.75V9.0097C12.75 8.59491 13.0858 8.25866 13.5 8.25866C13.9142 8.25866 14.25 8.59491 14.25 9.0097V11.0125H14.5C15.0523 11.0125 15.5 11.4608 15.5 12.0139V12.5146C15.5 14.1925 14.3226 15.595 12.7499 15.9388L12.7497 22C17.9224 21.6161 22 17.2918 22 12.0139C22 6.48336 17.5228 2 12 2Z\"/>");
+export const Chart = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M17.2929 2.29289C17 2.58579 17 3.05719 17 4V17C17 17.9428 17 18.4142 17.2929 18.7071C17.5858 19 18.0572 19 19 19C19.9428 19 20.4142 19 20.7071 18.7071C21 18.4142 21 17.9428 21 17V4C21 3.05719 21 2.58579 20.7071 2.29289C20.4142 2 19.9428 2 19 2C18.0572 2 17.5858 2 17.2929 2.29289Z\"/><path d=\"M10 7C10 6.05719 10 5.58579 10.2929 5.29289C10.5858 5 11.0572 5 12 5C12.9428 5 13.4142 5 13.7071 5.29289C14 5.58579 14 6.05719 14 7V17C14 17.9428 14 18.4142 13.7071 18.7071C13.4142 19 12.9428 19 12 19C11.0572 19 10.5858 19 10.2929 18.7071C10 18.4142 10 17.9428 10 17V7Z\"/><path d=\"M3.29289 9.29289C3 9.58579 3 10.0572 3 11V17C3 17.9428 3 18.4142 3.29289 18.7071C3.58579 19 4.05719 19 5 19C5.94281 19 6.41421 19 6.70711 18.7071C7 18.4142 7 17.9428 7 17V11C7 10.0572 7 9.58579 6.70711 9.29289C6.41421 9 5.94281 9 5 9C4.05719 9 3.58579 9 3.29289 9.29289Z\"/><path d=\"M3 21.25C2.58579 21.25 2.25 21.5858 2.25 22C2.25 22.4142 2.58579 22.75 3 22.75H21C21.4142 22.75 21.75 22.4142 21.75 22C21.75 21.5858 21.4142 21.25 21 21.25H3Z\"/></g>");
+export const Plane = /* @__PURE__ */ solar("<path fill=\"currentColor\" d=\"M18.6357 15.6701L20.3521 10.5208C21.8516 6.02242 22.6013 3.77322 21.414 2.58595C20.2268 1.39869 17.9776 2.14842 13.4792 3.64788L8.32987 5.36432C4.69923 6.57453 2.88392 7.17964 2.36806 8.06698C1.87731 8.91112 1.87731 9.95369 2.36806 10.7978C2.88392 11.6852 4.69923 12.2903 8.32987 13.5005C8.77981 13.6505 9.28601 13.5434 9.62294 13.2096L15.1286 7.75495C15.4383 7.44808 15.9382 7.45041 16.245 7.76015C16.5519 8.06989 16.5496 8.56975 16.2398 8.87662L10.8231 14.2432C10.4518 14.6111 10.3342 15.1742 10.4995 15.6701C11.7097 19.3007 12.3148 21.1161 13.2022 21.6319C14.0463 22.1227 15.0889 22.1227 15.933 21.6319C16.8204 21.1161 17.4255 19.3008 18.6357 15.6701Z\"/>");
+export const Bookmark = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M21 11.0975V16.0909C21 19.1875 21 20.7358 20.2659 21.4123C19.9158 21.735 19.4739 21.9377 19.0031 21.9915C18.016 22.1045 16.8633 21.0849 14.5578 19.0458C13.5388 18.1445 13.0292 17.6938 12.4397 17.5751C12.1494 17.5166 11.8506 17.5166 11.5603 17.5751C10.9708 17.6938 10.4612 18.1445 9.44216 19.0458C7.13673 21.0849 5.98402 22.1045 4.99692 21.9915C4.52615 21.9377 4.08421 21.735 3.73411 21.4123C3 20.7358 3 19.1875 3 16.0909V11.0975C3 6.80891 3 4.6646 4.31802 3.3323C5.63604 2 7.75736 2 12 2C16.2426 2 18.364 2 19.682 3.3323C21 4.6646 21 6.80891 21 11.0975ZM8.25 6C8.25 5.58579 8.58579 5.25 9 5.25H15C15.4142 5.25 15.75 5.58579 15.75 6C15.75 6.41421 15.4142 6.75 15 6.75H9C8.58579 6.75 8.25 6.41421 8.25 6Z\" clip-rule=\"evenodd\"/>");
+export const QuestionCircle = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM12 7.75C11.3787 7.75 10.875 8.25368 10.875 8.875C10.875 9.28921 10.5392 9.625 10.125 9.625C9.71079 9.625 9.375 9.28921 9.375 8.875C9.375 7.42525 10.5503 6.25 12 6.25C13.4497 6.25 14.625 7.42525 14.625 8.875C14.625 9.58584 14.3415 10.232 13.883 10.704C13.7907 10.7989 13.7027 10.8869 13.6187 10.9708C13.4029 11.1864 13.2138 11.3753 13.0479 11.5885C12.8289 11.8699 12.75 12.0768 12.75 12.25V13C12.75 13.4142 12.4142 13.75 12 13.75C11.5858 13.75 11.25 13.4142 11.25 13V12.25C11.25 11.5948 11.555 11.0644 11.8642 10.6672C12.0929 10.3733 12.3804 10.0863 12.6138 9.85346C12.6842 9.78321 12.7496 9.71789 12.807 9.65877C13.0046 9.45543 13.125 9.18004 13.125 8.875C13.125 8.25368 12.6213 7.75 12 7.75ZM12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z\" clip-rule=\"evenodd\"/>");
+export const Server = /* @__PURE__ */ solar("<g fill=\"currentColor\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"><path d=\"M2 7C2 5.11438 2 4.17157 2.58579 3.58579C3.17157 3 4.11438 3 6 3H18C19.8856 3 20.8284 3 21.4142 3.58579C22 4.17157 22 5.11438 22 7C22 8.88562 22 9.82843 21.4142 10.4142C20.8284 11 19.8856 11 18 11H6C4.11438 11 3.17157 11 2.58579 10.4142C2 9.82843 2 8.88562 2 7ZM6 6.25C5.58579 6.25 5.25 6.58579 5.25 7C5.25 7.41421 5.58579 7.75 6 7.75H8C8.41421 7.75 8.75 7.41421 8.75 7C8.75 6.58579 8.41421 6.25 8 6.25H6ZM10.25 7C10.25 6.58579 10.5858 6.25 11 6.25H18C18.4142 6.25 18.75 6.58579 18.75 7C18.75 7.41421 18.4142 7.75 18 7.75H11C10.5858 7.75 10.25 7.41421 10.25 7Z\"/><path d=\"M2 17C2 15.1144 2 14.1716 2.58579 13.5858C3.17157 13 4.11438 13 6 13H18C19.8856 13 20.8284 13 21.4142 13.5858C22 14.1716 22 15.1144 22 17C22 18.8856 22 19.8284 21.4142 20.4142C20.8284 21 19.8856 21 18 21H6C4.11438 21 3.17157 21 2.58579 20.4142C2 19.8284 2 18.8856 2 17ZM6 16.25C5.58579 16.25 5.25 16.5858 5.25 17C5.25 17.4142 5.58579 17.75 6 17.75H8C8.41421 17.75 8.75 17.4142 8.75 17C8.75 16.5858 8.41421 16.25 8 16.25H6ZM10.25 17C10.25 16.5858 10.5858 16.25 11 16.25H18C18.4142 16.25 18.75 16.5858 18.75 17C18.75 17.4142 18.4142 17.75 18 17.75H11C10.5858 17.75 10.25 17.4142 10.25 17Z\"/></g>");
+export const ServerSquare = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M3.17157 4.17157C2 5.34315 2 7.22876 2 11V11.25H22V11C22 7.22876 22 5.34315 20.8284 4.17157C19.6569 3 17.7712 3 14 3H10C6.22876 3 4.34315 3 3.17157 4.17157ZM22 12.75H2V13C2 16.7712 2 18.6569 3.17157 19.8284C4.34315 21 6.22876 21 10 21H14C17.7712 21 19.6569 21 20.8284 19.8284C22 18.6569 22 16.7712 22 13V12.75ZM5.25 17.5C5.25 17.9142 5.58579 18.25 6 18.25C6.41421 18.25 6.75 17.9142 6.75 17.5V15.5C6.75 15.0858 6.41421 14.75 6 14.75C5.58579 14.75 5.25 15.0858 5.25 15.5L5.25 17.5ZM9 18.25C8.58579 18.25 8.25 17.9142 8.25 17.5V15.5C8.25 15.0858 8.58579 14.75 9 14.75C9.41421 14.75 9.75 15.0858 9.75 15.5V17.5C9.75 17.9142 9.41421 18.25 9 18.25ZM13.5 15.75C13.0858 15.75 12.75 16.0858 12.75 16.5C12.75 16.9142 13.0858 17.25 13.5 17.25H18C18.4142 17.25 18.75 16.9142 18.75 16.5C18.75 16.0858 18.4142 15.75 18 15.75H13.5ZM9 9.25C8.58579 9.25 8.25 8.91421 8.25 8.5V6.5C8.25 6.08579 8.58579 5.75 9 5.75C9.41421 5.75 9.75 6.08579 9.75 6.5V8.5C9.75 8.91421 9.41421 9.25 9 9.25ZM5.25 8.5C5.25 8.91421 5.58579 9.25 6 9.25C6.41421 9.25 6.75 8.91421 6.75 8.5V6.5C6.75 6.08579 6.41421 5.75 6 5.75C5.58579 5.75 5.25 6.08579 5.25 6.5L5.25 8.5ZM12.75 7.5C12.75 7.08579 13.0858 6.75 13.5 6.75H18C18.4142 6.75 18.75 7.08579 18.75 7.5C18.75 7.91421 18.4142 8.25 18 8.25H13.5C13.0858 8.25 12.75 7.91421 12.75 7.5Z\" clip-rule=\"evenodd\"/>");
+export const Database = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M20 18C20 20.2091 16.4183 22 12 22C7.58172 22 4 20.2091 4 18V13.974C4.50221 14.5906 5.21495 15.1029 6.00774 15.4992C7.58004 16.2854 9.69967 16.75 12 16.75C14.3003 16.75 16.42 16.2854 17.9923 15.4992C18.7851 15.1029 19.4978 14.5906 20 13.974V18Z\"/><path d=\"M12 10.75C14.3003 10.75 16.42 10.2854 17.9923 9.49925C18.7851 9.10285 19.4978 8.59059 20 7.97397V12C20 12.5 18.2143 13.5911 17.3214 14.1576C15.9983 14.8192 14.118 15.25 12 15.25C9.88205 15.25 8.00168 14.8192 6.67856 14.1576C5.5 13.5683 4 12.5 4 12V7.97397C4.50221 8.59059 5.21495 9.10285 6.00774 9.49925C7.58004 10.2854 9.69967 10.75 12 10.75Z\"/><path d=\"M17.3214 8.15761C15.9983 8.81917 14.118 9.25 12 9.25C9.88205 9.25 8.00168 8.81917 6.67856 8.15761C6.16384 7.95596 5.00637 7.31492 4.2015 6.27935C4.06454 6.10313 4.00576 5.87853 4.03988 5.65798C4.06283 5.50969 4.0948 5.35695 4.13578 5.26226C4.82815 3.40554 8.0858 2 12 2C15.9142 2 19.1718 3.40554 19.8642 5.26226C19.9052 5.35695 19.9372 5.50969 19.9601 5.65798C19.9942 5.87853 19.9355 6.10313 19.7985 6.27935C18.9936 7.31492 17.8362 7.95596 17.3214 8.15761Z\"/></g>");
+export const Key = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M22 8.29344C22 11.7692 19.1708 14.5869 15.6807 14.5869C15.0439 14.5869 13.5939 14.4405 12.8885 13.8551L12.0067 14.7333C11.4883 15.2496 11.6283 15.4016 11.8589 15.652C11.9551 15.7565 12.0672 15.8781 12.1537 16.0505C12.1537 16.0505 12.8885 17.075 12.1537 18.0995C11.7128 18.6849 10.4783 19.5045 9.06754 18.0995L8.77362 18.3922C8.77362 18.3922 9.65538 19.4167 8.92058 20.4412C8.4797 21.0267 7.30403 21.6121 6.27531 20.5876L5.2466 21.6121C4.54119 22.3146 3.67905 21.9048 3.33616 21.6121L2.45441 20.7339C1.63143 19.9143 2.1115 19.0264 2.45441 18.6849L10.0963 11.0743C10.0963 11.0743 9.3615 9.90338 9.3615 8.29344C9.3615 4.81767 12.1907 2 15.6807 2C19.1708 2 22 4.81767 22 8.29344ZM15.681 10.4889C16.8984 10.4889 17.8853 9.50601 17.8853 8.29353C17.8853 7.08105 16.8984 6.09814 15.681 6.09814C14.4635 6.09814 13.4766 7.08105 13.4766 8.29353C13.4766 9.50601 14.4635 10.4889 15.681 10.4889Z\" clip-rule=\"evenodd\"/>");
+export const Letter = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M3.17157 5.17157C2 6.34315 2 8.22876 2 12C2 15.7712 2 17.6569 3.17157 18.8284C4.34315 20 6.22876 20 10 20H14C17.7712 20 19.6569 20 20.8284 18.8284C22 17.6569 22 15.7712 22 12C22 8.22876 22 6.34315 20.8284 5.17157C19.6569 4 17.7712 4 14 4H10C6.22876 4 4.34315 4 3.17157 5.17157ZM18.5762 7.51986C18.8413 7.83807 18.7983 8.31099 18.4801 8.57617L16.2837 10.4066C15.3973 11.1452 14.6789 11.7439 14.0448 12.1517C13.3843 12.5765 12.7411 12.8449 12 12.8449C11.2589 12.8449 10.6157 12.5765 9.95518 12.1517C9.32112 11.7439 8.60271 11.1452 7.71636 10.4066L5.51986 8.57617C5.20165 8.31099 5.15866 7.83807 5.42383 7.51986C5.68901 7.20165 6.16193 7.15866 6.48014 7.42383L8.63903 9.22291C9.57199 10.0004 10.2197 10.5384 10.7666 10.8901C11.2959 11.2306 11.6549 11.3449 12 11.3449C12.3451 11.3449 12.7041 11.2306 13.2334 10.8901C13.7803 10.5384 14.428 10.0004 15.361 9.22291L17.5199 7.42383C17.8381 7.15866 18.311 7.20165 18.5762 7.51986Z\" clip-rule=\"evenodd\"/>");
+export const Gallery = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M18 8C18 9.10457 17.1046 10 16 10C14.8954 10 14 9.10457 14 8C14 6.89543 14.8954 6 16 6C17.1046 6 18 6.89543 18 8Z\"/><path fill-rule=\"evenodd\" d=\"M11.9426 1.25H12.0574C14.3658 1.24999 16.1748 1.24998 17.5863 1.43975C19.031 1.63399 20.1711 2.03933 21.0659 2.93414C21.9607 3.82895 22.366 4.96897 22.5603 6.41371C22.75 7.82519 22.75 9.63423 22.75 11.9426V12.0309C22.75 13.9397 22.75 15.5023 22.6463 16.7745C22.5422 18.0531 22.3287 19.1214 21.8509 20.0087C21.6401 20.4001 21.3812 20.7506 21.0659 21.0659C20.1711 21.9607 19.031 22.366 17.5863 22.5603C16.1748 22.75 14.3658 22.75 12.0574 22.75H11.9426C9.63423 22.75 7.82519 22.75 6.41371 22.5603C4.96897 22.366 3.82895 21.9607 2.93414 21.0659C2.14086 20.2726 1.7312 19.2852 1.51335 18.0604C1.29935 16.8573 1.2602 15.3603 1.25207 13.5015C1.25 13.0287 1.25 12.5286 1.25 12.001V11.9426C1.24999 9.63424 1.24998 7.82519 1.43975 6.41371C1.63399 4.96897 2.03933 3.82895 2.93414 2.93414C3.82895 2.03933 4.96897 1.63399 6.41371 1.43975C7.82519 1.24998 9.63424 1.24999 11.9426 1.25ZM6.61358 2.92637C5.33517 3.09825 4.56445 3.42514 3.9948 3.9948C3.42514 4.56445 3.09825 5.33517 2.92637 6.61358C2.75159 7.91356 2.75 9.62178 2.75 12C2.75 12.2905 2.75 12.5715 2.75034 12.8435L3.75148 11.9675C4.66275 11.1702 6.03617 11.2159 6.89238 12.0721L11.1821 16.3618C11.8693 17.0491 12.9511 17.1428 13.7463 16.5839L14.0445 16.3744C15.1887 15.5702 16.7368 15.6634 17.7764 16.599L20.6068 19.1463C20.8917 18.548 21.0609 17.7618 21.1513 16.6527C21.2494 15.4482 21.25 13.9459 21.25 12C21.25 9.62178 21.2484 7.91356 21.0736 6.61358C20.9018 5.33517 20.5749 4.56445 20.0052 3.9948C19.4355 3.42514 18.6648 3.09825 17.3864 2.92637C16.0864 2.75159 14.3782 2.75 12 2.75C9.62178 2.75 7.91356 2.75159 6.61358 2.92637Z\" clip-rule=\"evenodd\"/></g>");
+export const Cloud = /* @__PURE__ */ solar("<path fill=\"currentColor\" d=\"M16.2857 20C19.4416 20 22 17.4717 22 14.3529C22 11.8811 20.393 9.78024 18.1551 9.01498C17.8371 6.19371 15.4159 4 12.4762 4C9.32028 4 6.7619 6.52827 6.7619 9.64706C6.7619 10.3369 6.88706 10.9978 7.11616 11.6089C6.8475 11.5567 6.56983 11.5294 6.28571 11.5294C3.91878 11.5294 2 13.4256 2 15.7647C2 18.1038 3.91878 20 6.28571 20H16.2857Z\"/>");
+export const CloudUpload = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M6.50001 18L6.50001 17.9105C6.49991 17.0449 6.49981 16.2512 6.58661 15.6056C6.6822 14.8946 6.90709 14.1432 7.52514 13.5251C8.14319 12.9071 8.89464 12.6822 9.6056 12.5866C10.2512 12.4998 11.0449 12.4999 11.9105 12.5H12.0895C12.9551 12.4999 13.7488 12.4998 14.3944 12.5866C15.1054 12.6822 15.8568 12.9071 16.4749 13.5251C17.0929 14.1432 17.3178 14.8946 17.4134 15.6056C17.4989 16.2417 17.5001 17.0215 17.5 17.8722C20.0726 17.3221 22 15.0599 22 12.3529C22 9.88113 20.393 7.78024 18.1551 7.01498C17.8371 4.19371 15.4159 2 12.4762 2C9.32028 2 6.7619 4.52827 6.7619 7.64706C6.7619 8.33687 6.88706 8.9978 7.11616 9.60887C6.8475 9.55673 6.56983 9.52941 6.28571 9.52941C3.91878 9.52941 2 11.4256 2 13.7647C2 16.1038 3.91878 18 6.28571 18L6.50001 18Z\"/><path fill-rule=\"evenodd\" d=\"M12 14C10.1144 14 9.17157 14 8.58579 14.5858C8 15.1716 8 16.1144 8 18C8 19.8856 8 20.8284 8.58579 21.4142C9.17157 22 10.1144 22 12 22C13.8856 22 14.8284 22 15.4142 21.4142C16 20.8284 16 19.8856 16 18C16 16.1144 16 15.1716 15.4142 14.5858C14.8284 14 13.8856 14 12 14ZM13.8047 17.0842L12.4714 15.7508C12.2111 15.4905 11.7889 15.4905 11.5286 15.7508L10.1953 17.0842C9.93491 17.3445 9.93491 17.7666 10.1953 18.027C10.4556 18.2873 10.8777 18.2873 11.1381 18.027L11.3333 17.8317V19.7778C11.3333 20.146 11.6318 20.4444 12 20.4444C12.3682 20.4444 12.6667 20.146 12.6667 19.7778V17.8317L12.8619 18.027C13.1223 18.2873 13.5444 18.2873 13.8047 18.027C14.0651 17.7666 14.0651 17.3445 13.8047 17.0842Z\" clip-rule=\"evenodd\"/></g>");
+export const Checklist = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M3.46447 3.46447C2 4.92893 2 7.28595 2 12C2 16.714 2 19.0711 3.46447 20.5355C4.92893 22 7.28595 22 12 22C16.714 22 19.0711 22 20.5355 20.5355C22 19.0711 22 16.714 22 12C22 7.28595 22 4.92893 20.5355 3.46447C19.0711 2 16.714 2 12 2C7.28595 2 4.92893 2 3.46447 3.46447ZM10.5431 7.51724C10.8288 7.2173 10.8172 6.74256 10.5172 6.4569C10.2173 6.17123 9.74256 6.18281 9.4569 6.48276L7.14286 8.9125L6.5431 8.28276C6.25744 7.98281 5.78271 7.97123 5.48276 8.2569C5.18281 8.54256 5.17123 9.01729 5.4569 9.31724L6.59976 10.5172C6.74131 10.6659 6.9376 10.75 7.14286 10.75C7.34812 10.75 7.5444 10.6659 7.68596 10.5172L10.5431 7.51724ZM13 8.25C12.5858 8.25 12.25 8.58579 12.25 9C12.25 9.41422 12.5858 9.75 13 9.75H18C18.4142 9.75 18.75 9.41422 18.75 9C18.75 8.58579 18.4142 8.25 18 8.25H13ZM10.5431 14.5172C10.8288 14.2173 10.8172 13.7426 10.5172 13.4569C10.2173 13.1712 9.74256 13.1828 9.4569 13.4828L7.14286 15.9125L6.5431 15.2828C6.25744 14.9828 5.78271 14.9712 5.48276 15.2569C5.18281 15.5426 5.17123 16.0173 5.4569 16.3172L6.59976 17.5172C6.74131 17.6659 6.9376 17.75 7.14286 17.75C7.34812 17.75 7.5444 17.6659 7.68596 17.5172L10.5431 14.5172ZM13 15.25C12.5858 15.25 12.25 15.5858 12.25 16C12.25 16.4142 12.5858 16.75 13 16.75H18C18.4142 16.75 18.75 16.4142 18.75 16C18.75 15.5858 18.4142 15.25 18 15.25H13Z\" clip-rule=\"evenodd\"/>");
+export const CodeFile = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M19.3517 7.61665L15.3929 4.05375C14.2651 3.03868 13.7012 2.53114 13.0092 2.26562L13 5.00011C13 7.35713 13 8.53564 13.7322 9.26787C14.4645 10.0001 15.643 10.0001 18 10.0001H21.5801C21.2175 9.29588 20.5684 8.71164 19.3517 7.61665Z\"/><path fill-rule=\"evenodd\" d=\"M10 22H14C17.7712 22 19.6569 22 20.8284 20.8284C22 19.6569 22 17.7712 22 14V13.5629C22 12.6901 22 12.0344 21.9574 11.5001H18L17.9051 11.5001C16.808 11.5002 15.8385 11.5003 15.0569 11.3952C14.2098 11.2813 13.3628 11.0198 12.6716 10.3285C11.9803 9.63726 11.7188 8.79028 11.6049 7.94316C11.4998 7.16164 11.4999 6.19207 11.5 5.09497L11.5092 2.26057C11.5095 2.17813 11.5166 2.09659 11.53 2.01666C11.1214 2 10.6358 2 10.0298 2C6.23869 2 4.34315 2 3.17157 3.17157C2 4.34315 2 6.22876 2 10V14C2 17.7712 2 19.6569 3.17157 20.8284C4.34315 22 6.22876 22 10 22ZM10.9697 15.4697C11.2626 15.1768 11.7374 15.1768 12.0303 15.4697L13.0303 16.4697C13.3232 16.7626 13.3232 17.2374 13.0303 17.5303L12.0303 18.5303C11.7374 18.8232 11.2626 18.8232 10.9697 18.5303C10.6768 18.2374 10.6768 17.7626 10.9697 17.4697L11.4393 17L10.9697 16.5303C10.6768 16.2374 10.6768 15.7626 10.9697 15.4697ZM10.7022 14.2633C10.8477 13.8755 10.6512 13.4432 10.2633 13.2978C9.8755 13.1523 9.44319 13.3488 9.29775 13.7367L7.79775 17.7367C7.65231 18.1245 7.84882 18.5568 8.23666 18.7022C8.6245 18.8477 9.05681 18.6512 9.20225 18.2633L10.7022 14.2633ZM7.53033 13.4697C7.82322 13.7626 7.82322 14.2374 7.53033 14.5303L7.06066 15L7.53033 15.4697C7.82322 15.7626 7.82322 16.2374 7.53033 16.5303C7.23744 16.8232 6.76256 16.8232 6.46967 16.5303L5.46967 15.5303C5.17678 15.2374 5.17678 14.7626 5.46967 14.4697L6.46967 13.4697C6.76256 13.1768 7.23744 13.1768 7.53033 13.4697Z\" clip-rule=\"evenodd\"/></g>");
+export const Calendar = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M7.75 2.5C7.75 2.08579 7.41421 1.75 7 1.75C6.58579 1.75 6.25 2.08579 6.25 2.5V4.07926C4.81067 4.19451 3.86577 4.47737 3.17157 5.17157C2.47737 5.86577 2.19451 6.81067 2.07926 8.25H21.9207C21.8055 6.81067 21.5226 5.86577 20.8284 5.17157C20.1342 4.47737 19.1893 4.19451 17.75 4.07926V2.5C17.75 2.08579 17.4142 1.75 17 1.75C16.5858 1.75 16.25 2.08579 16.25 2.5V4.0129C15.5847 4 14.839 4 14 4H10C9.16097 4 8.41527 4 7.75 4.0129V2.5Z\"/><path fill-rule=\"evenodd\" d=\"M2 12C2 11.161 2 10.4153 2.0129 9.75H21.9871C22 10.4153 22 11.161 22 12V14C22 17.7712 22 19.6569 20.8284 20.8284C19.6569 22 17.7712 22 14 22H10C6.22876 22 4.34315 22 3.17157 20.8284C2 19.6569 2 17.7712 2 14V12ZM17 14C17.5523 14 18 13.5523 18 13C18 12.4477 17.5523 12 17 12C16.4477 12 16 12.4477 16 13C16 13.5523 16.4477 14 17 14ZM17 18C17.5523 18 18 17.5523 18 17C18 16.4477 17.5523 16 17 16C16.4477 16 16 16.4477 16 17C16 17.5523 16.4477 18 17 18ZM13 13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13C11 12.4477 11.4477 12 12 12C12.5523 12 13 12.4477 13 13ZM13 17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17C11 16.4477 11.4477 16 12 16C12.5523 16 13 16.4477 13 17ZM7 14C7.55228 14 8 13.5523 8 13C8 12.4477 7.55228 12 7 12C6.44772 12 6 12.4477 6 13C6 13.5523 6.44772 14 7 14ZM7 18C7.55228 18 8 17.5523 8 17C8 16.4477 7.55228 16 7 16C6.44772 16 6 16.4477 6 17C6 17.5523 6.44772 18 7 18Z\" clip-rule=\"evenodd\"/></g>");
+export const CalendarMark = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M7.75 2.5C7.75 2.08579 7.41421 1.75 7 1.75C6.58579 1.75 6.25 2.08579 6.25 2.5V4.07926C4.81067 4.19451 3.86577 4.47737 3.17157 5.17157C2.47737 5.86577 2.19451 6.81067 2.07926 8.25H21.9207C21.8055 6.81067 21.5226 5.86577 20.8284 5.17157C20.1342 4.47737 19.1893 4.19451 17.75 4.07926V2.5C17.75 2.08579 17.4142 1.75 17 1.75C16.5858 1.75 16.25 2.08579 16.25 2.5V4.0129C15.5847 4 14.839 4 14 4H10C9.16097 4 8.41527 4 7.75 4.0129V2.5Z\"/><path fill-rule=\"evenodd\" d=\"M22 12V14C22 17.7712 22 19.6569 20.8284 20.8284C19.6569 22 17.7712 22 14 22H10C6.22876 22 4.34315 22 3.17157 20.8284C2 19.6569 2 17.7712 2 14V12C2 11.161 2 10.4153 2.0129 9.75H21.9871C22 10.4153 22 11.161 22 12ZM16.5 18C17.3284 18 18 17.3284 18 16.5C18 15.6716 17.3284 15 16.5 15C15.6716 15 15 15.6716 15 16.5C15 17.3284 15.6716 18 16.5 18Z\" clip-rule=\"evenodd\"/></g>");
+export const ShieldCheck = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M3.37752 5.08241C3 5.62028 3 7.21907 3 10.4167V11.9914C3 17.6294 7.23896 20.3655 9.89856 21.5273C10.62 21.8424 10.9807 22 12 22C13.0193 22 13.38 21.8424 14.1014 21.5273C16.761 20.3655 21 17.6294 21 11.9914V10.4167C21 7.21907 21 5.62028 20.6225 5.08241C20.245 4.54454 18.7417 4.02996 15.7351 3.00079L15.1623 2.80472C13.595 2.26824 12.8114 2 12 2C11.1886 2 10.405 2.26824 8.83772 2.80472L8.26491 3.00079C5.25832 4.02996 3.75503 4.54454 3.37752 5.08241ZM15.0595 10.4995C15.3353 10.1905 15.3085 9.71642 14.9995 9.44055C14.6905 9.16467 14.2164 9.19151 13.9405 9.50049L10.9286 12.8739L10.0595 11.9005C9.78358 11.5915 9.30947 11.5647 9.00049 11.8405C8.69151 12.1164 8.66467 12.5905 8.94055 12.8995L10.3691 14.4995C10.5114 14.6589 10.7149 14.75 10.9286 14.75C11.1422 14.75 11.3457 14.6589 11.488 14.4995L15.0595 10.4995Z\" clip-rule=\"evenodd\"/>");
+export const ChatDots = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C10.4003 22 8.88867 21.6239 7.54785 20.9561C7.19153 20.7786 6.78396 20.7204 6.39941 20.8232L4.17383 21.4189C3.20749 21.6775 2.3225 20.7925 2.58105 19.8262L3.17676 17.6006C3.27965 17.216 3.22142 16.8085 3.04395 16.4521C2.37612 15.1113 2 13.5997 2 12C2 6.47715 6.47715 2 12 2ZM7.99121 11C7.43893 11 6.99121 11.4477 6.99121 12C6.99121 12.5523 7.43893 13 7.99121 13C8.54327 12.9997 8.99121 12.5521 8.99121 12C8.99121 11.4479 8.54327 11.0003 7.99121 11ZM12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11ZM16.0088 11C15.4565 11 15.0088 11.4477 15.0088 12C15.0088 12.5523 15.4565 13 16.0088 13C16.5611 13 17.0088 12.5523 17.0088 12C17.0088 11.4477 16.5611 11 16.0088 11Z\" clip-rule=\"evenodd\"/>");
+export const Widget = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M7.625 15C8.67337 15 9.19784 15.0001 9.61133 15.1777C10.1625 15.4146 10.6008 15.8688 10.8291 16.4404C11.0003 16.8692 11 17.4129 11 18.5C11 19.5871 11.0003 20.1308 10.8291 20.5596C10.6008 21.1312 10.1625 21.5854 9.61133 21.8223C9.19784 21.9999 8.67337 22 7.625 22H5.375C4.32663 22 3.80216 21.9999 3.38867 21.8223C2.83749 21.5854 2.39922 21.1312 2.1709 20.5596C1.99969 20.1308 2 19.5871 2 18.5C2 17.4129 1.99969 16.8692 2.1709 16.4404C2.39922 15.8688 2.83749 15.4146 3.38867 15.1777C3.80216 15.0001 4.32663 15 5.375 15H7.625Z\"/><path d=\"M17.5 11C19.6213 11 20.6818 11.0002 21.3408 11.6445C21.9998 12.2889 22 13.3262 22 15.4004V17.5996C22 19.6738 21.9998 20.7111 21.3408 21.3555C20.6818 21.9998 19.6213 22 17.5 22C15.3787 22 14.3182 21.9998 13.6592 21.3555C13.0002 20.7111 13 19.6738 13 17.5996V15.4004C13 13.3262 13.0002 12.2889 13.6592 11.6445C14.3182 11.0002 15.3787 11 17.5 11Z\"/><path d=\"M6.5 2C8.62132 2 9.68181 2.00017 10.3408 2.64453C10.9998 3.2889 11 4.32621 11 6.40039V8.59961C11 10.6738 10.9998 11.7111 10.3408 12.3555C9.68181 12.9998 8.62132 13 6.5 13C4.37868 13 3.31819 12.9998 2.65918 12.3555C2.00017 11.7111 2 10.6738 2 8.59961V6.40039C2 4.32621 2.00017 3.2889 2.65918 2.64453C3.31819 2.00017 4.37868 2 6.5 2Z\"/><path d=\"M18.625 2C19.6734 2 20.1978 2.00012 20.6113 2.17773C21.1625 2.41459 21.6008 2.8688 21.8291 3.44043C22.0003 3.86921 22 4.41293 22 5.5C22 6.58707 22.0003 7.13079 21.8291 7.55957C21.6008 8.1312 21.1625 8.58541 20.6113 8.82227C20.1978 8.99988 19.6734 9 18.625 9H16.375C15.3266 9 14.8022 8.99988 14.3887 8.82227C13.8375 8.58541 13.3992 8.1312 13.1709 7.55957C12.9997 7.13079 13 6.58707 13 5.5C13 4.41293 12.9997 3.86921 13.1709 3.44043C13.3992 2.8688 13.8375 2.41459 14.3887 2.17773C14.8022 2.00012 15.3266 2 16.375 2H18.625Z\"/></g>");
+export const Layers = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M4.97883 9.68508C2.99294 8.89073 2 8.49355 2 8C2 7.50645 2.99294 7.10927 4.97883 6.31492L7.7873 5.19153C9.77318 4.39718 10.7661 4 12 4C13.2339 4 14.2268 4.39718 16.2127 5.19153L19.0212 6.31492C21.0071 7.10927 22 7.50645 22 8C22 8.49355 21.0071 8.89073 19.0212 9.68508L16.2127 10.8085C14.2268 11.6028 13.2339 12 12 12C10.7661 12 9.77318 11.6028 7.7873 10.8085L4.97883 9.68508Z\"/><path fill-rule=\"evenodd\" d=\"M2 8C2 8.49355 2.99294 8.89073 4.97883 9.68508L7.7873 10.8085C9.77318 11.6028 10.7661 12 12 12C13.2339 12 14.2268 11.6028 16.2127 10.8085L19.0212 9.68508C21.0071 8.89073 22 8.49355 22 8C22 7.50645 21.0071 7.10927 19.0212 6.31492L16.2127 5.19153C14.2268 4.39718 13.2339 4 12 4C10.7661 4 9.77318 4.39718 7.7873 5.19153L4.97883 6.31492C2.99294 7.10927 2 7.50645 2 8Z\" clip-rule=\"evenodd\"/><path d=\"M19.0212 13.6851L16.2127 14.8085C14.2268 15.6028 13.2339 16 12 16C10.7661 16 9.77318 15.6028 7.7873 14.8085L4.97883 13.6851C2.99294 12.8907 2 12.4935 2 12C2 11.5551 2.80681 11.1885 4.42043 10.5388L7.56143 11.7952C9.41007 12.535 10.572 13 12 13C13.428 13 14.5899 12.535 16.4386 11.7952L19.5796 10.5388C21.1932 11.1885 22 11.5551 22 12C22 12.4935 21.0071 12.8907 19.0212 13.6851Z\"/><path d=\"M19.0212 17.6849L16.2127 18.8083C14.2268 19.6026 13.2339 19.9998 12 19.9998C10.7661 19.9998 9.77318 19.6026 7.7873 18.8083L4.97883 17.6849C2.99294 16.8905 2 16.4934 2 15.9998C2 15.5549 2.80681 15.1883 4.42043 14.5386L7.56143 15.795C9.41007 16.5348 10.572 16.9998 12 16.9998C13.428 16.9998 14.5899 16.5348 16.4386 15.795L19.5796 14.5386C21.1932 15.1883 22 15.5549 22 15.9998C22 16.4934 21.0071 16.8905 19.0212 17.6849Z\"/></g>");
+export const Library = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M8.50989 2.00001H15.49C15.7225 1.99995 15.9007 1.99991 16.0565 2.01515C17.1643 2.12352 18.0711 2.78958 18.4556 3.68678H5.54428C5.92879 2.78958 6.83555 2.12352 7.94337 2.01515C8.09917 1.99991 8.27741 1.99995 8.50989 2.00001Z\"/><path d=\"M6.31052 4.72312C4.91989 4.72312 3.77963 5.56287 3.3991 6.67691C3.39117 6.70013 3.38356 6.72348 3.37629 6.74693C3.77444 6.62636 4.18881 6.54759 4.60827 6.49382C5.68865 6.35531 7.05399 6.35538 8.64002 6.35547L8.75846 6.35547L15.5321 6.35547C17.1181 6.35538 18.4835 6.35531 19.5639 6.49382C19.9833 6.54759 20.3977 6.62636 20.7958 6.74693C20.7886 6.72348 20.781 6.70013 20.773 6.67691C20.3925 5.56287 19.2522 4.72312 17.8616 4.72312H6.31052Z\"/><path fill-rule=\"evenodd\" d=\"M8.67239 7.54204H15.3276C18.7024 7.54204 20.3898 7.54204 21.3377 8.52887C22.2855 9.5157 22.0625 11.0403 21.6165 14.0896L21.1935 16.9811C20.8437 19.3724 20.6689 20.568 19.7717 21.284C18.8745 22 17.5512 22 14.9046 22H9.09536C6.44881 22 5.12553 22 4.22834 21.284C3.33115 20.568 3.15626 19.3724 2.80648 16.9811L2.38351 14.0896C1.93748 11.0403 1.71447 9.5157 2.66232 8.52887C3.61017 7.54204 5.29758 7.54204 8.67239 7.54204ZM8 18.0001C8 17.5859 8.3731 17.2501 8.83333 17.2501H15.1667C15.6269 17.2501 16 17.5859 16 18.0001C16 18.4144 15.6269 18.7502 15.1667 18.7502H8.83333C8.3731 18.7502 8 18.4144 8 18.0001Z\" clip-rule=\"evenodd\"/></g>");
+export const Videocamera = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M2 12.5V11.5C2 8.21252 2 6.56878 2.90796 5.46243C3.07418 5.25989 3.25989 5.07418 3.46243 4.90796C4.56878 4 6.21252 4 9.5 4C12.7875 4 14.4312 4 15.5376 4.90796C15.7401 5.07418 15.9258 5.25989 16.092 5.46243C16.7936 6.3173 16.9531 7.49303 16.9893 9.50002L17.6584 9.17082C19.6042 8.19788 20.5772 7.7114 21.2886 8.15107C22 8.59075 22 9.67853 22 11.8541V12.1459C22 14.3215 22 15.4093 21.2886 15.8489C20.5772 16.2886 19.6042 15.8021 17.6584 14.8292L16.9893 14.5C16.9531 16.507 16.7936 17.6827 16.092 18.5376C15.9258 18.7401 15.7401 18.9258 15.5376 19.092C14.4312 20 12.7875 20 9.5 20C6.21252 20 4.56878 20 3.46243 19.092C3.25989 18.9258 3.07418 18.7401 2.90796 18.5376C2 17.4312 2 15.7875 2 12.5ZM13.5607 9.56066C14.1464 8.97487 14.1464 8.02513 13.5607 7.43934C12.9749 6.85355 12.0251 6.85355 11.4393 7.43934C10.8536 8.02513 10.8536 8.97487 11.4393 9.56066C12.0251 10.1464 12.9749 10.1464 13.5607 9.56066Z\" clip-rule=\"evenodd\"/>");
+export const RefreshCircle = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM5.46056 11.0833C5.83331 7.79988 8.62404 5.25 12.0096 5.25C14.148 5.25 16.0489 6.26793 17.2521 7.84246C17.5036 8.17158 17.4406 8.64227 17.1115 8.89376C16.7824 9.14526 16.3117 9.08233 16.0602 8.7532C15.1289 7.53445 13.6613 6.75 12.0096 6.75C9.45213 6.75 7.33639 8.63219 6.9733 11.0833H7.33652C7.63996 11.0833 7.9135 11.2662 8.02953 11.5466C8.14556 11.8269 8.0812 12.1496 7.86649 12.364L6.69823 13.5307C6.40542 13.8231 5.9311 13.8231 5.63829 13.5307L4.47003 12.364C4.25532 12.1496 4.19097 11.8269 4.30699 11.5466C4.42302 11.2662 4.69656 11.0833 5 11.0833H5.46056ZM18.3617 10.4693C18.0689 10.1769 17.5946 10.1769 17.3018 10.4693L16.1335 11.636C15.9188 11.8504 15.8545 12.1731 15.9705 12.4534C16.0865 12.7338 16.3601 12.9167 16.6635 12.9167H17.0267C16.6636 15.3678 14.5479 17.25 11.9905 17.25C10.3464 17.25 8.88484 16.4729 7.9529 15.2638C7.70002 14.9358 7.22908 14.8748 6.90101 15.1277C6.57295 15.3806 6.512 15.8515 6.76487 16.1796C7.96886 17.7416 9.86205 18.75 11.9905 18.75C15.376 18.75 18.1667 16.2001 18.5395 12.9167H19C19.3035 12.9167 19.577 12.7338 19.693 12.4534C19.8091 12.1731 19.7447 11.8504 19.53 11.636L18.3617 10.4693Z\" clip-rule=\"evenodd\"/>");
+export const LockKeyhole = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M5.25 10.0546V8C5.25 4.27208 8.27208 1.25 12 1.25C15.7279 1.25 18.75 4.27208 18.75 8V10.0546C19.8648 10.1379 20.5907 10.348 21.1213 10.8787C22 11.7574 22 13.1716 22 16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H8C5.17157 22 3.75736 22 2.87868 21.1213C2 20.2426 2 18.8284 2 16C2 13.1716 2 11.7574 2.87868 10.8787C3.40931 10.348 4.13525 10.1379 5.25 10.0546ZM6.75 8C6.75 5.10051 9.10051 2.75 12 2.75C14.8995 2.75 17.25 5.10051 17.25 8V10.0036C16.867 10 16.4515 10 16 10H8C7.54849 10 7.13301 10 6.75 10.0036V8ZM14 16C14 17.1046 13.1046 18 12 18C10.8954 18 10 17.1046 10 16C10 14.8954 10.8954 14 12 14C13.1046 14 14 14.8954 14 16Z\" clip-rule=\"evenodd\"/>");
+export const Home = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M2.5192 7.82274C2 8.77128 2 9.91549 2 12.2039V13.725C2 17.6258 2 19.5763 3.17157 20.7881C4.34315 22 6.22876 22 10 22H14C17.7712 22 19.6569 22 20.8284 20.7881C22 19.5763 22 17.6258 22 13.725V12.2039C22 9.91549 22 8.77128 21.4808 7.82274C20.9616 6.87421 20.0131 6.28551 18.116 5.10812L16.116 3.86687C14.1106 2.62229 13.1079 2 12 2C10.8921 2 9.88939 2.62229 7.88403 3.86687L5.88403 5.10813C3.98695 6.28551 3.0384 6.87421 2.5192 7.82274ZM11.25 18C11.25 18.4142 11.5858 18.75 12 18.75C12.4142 18.75 12.75 18.4142 12.75 18V15C12.75 14.5858 12.4142 14.25 12 14.25C11.5858 14.25 11.25 14.5858 11.25 15V18Z\" clip-rule=\"evenodd\"/>");
+export const DocumentText = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M4.17157 3.17157C3 4.34315 3 6.22876 3 10V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10C21 6.22876 21 4.34315 19.8284 3.17157C18.6569 2 16.7712 2 13 2H11C7.22876 2 5.34315 2 4.17157 3.17157ZM7.25 8C7.25 7.58579 7.58579 7.25 8 7.25H16C16.4142 7.25 16.75 7.58579 16.75 8C16.75 8.41421 16.4142 8.75 16 8.75H8C7.58579 8.75 7.25 8.41421 7.25 8ZM7.25 12C7.25 11.5858 7.58579 11.25 8 11.25H16C16.4142 11.25 16.75 11.5858 16.75 12C16.75 12.4142 16.4142 12.75 16 12.75H8C7.58579 12.75 7.25 12.4142 7.25 12ZM8 15.25C7.58579 15.25 7.25 15.5858 7.25 16C7.25 16.4142 7.58579 16.75 8 16.75H13C13.4142 16.75 13.75 16.4142 13.75 16C13.75 15.5858 13.4142 15.25 13 15.25H8Z\" clip-rule=\"evenodd\"/>");
+export const Upload = /* @__PURE__ */ solar("<g fill=\"currentColor\"><path d=\"M12.5535 2.49392C12.4114 2.33852 12.2106 2.25 12 2.25C11.7894 2.25 11.5886 2.33852 11.4465 2.49392L7.44648 6.86892C7.16698 7.17462 7.18822 7.64902 7.49392 7.92852C7.79963 8.20802 8.27402 8.18678 8.55352 7.88108L11.25 4.9318V16C11.25 16.4142 11.5858 16.75 12 16.75C12.4142 16.75 12.75 16.4142 12.75 16V4.9318L15.4465 7.88108C15.726 8.18678 16.2004 8.20802 16.5061 7.92852C16.8118 7.64902 16.833 7.17462 16.5535 6.86892L12.5535 2.49392Z\"/><path d=\"M3.75 15C3.75 14.5858 3.41422 14.25 3 14.25C2.58579 14.25 2.25 14.5858 2.25 15V15.0549C2.24998 16.4225 2.24996 17.5248 2.36652 18.3918C2.48754 19.2919 2.74643 20.0497 3.34835 20.6516C3.95027 21.2536 4.70814 21.5125 5.60825 21.6335C6.47522 21.75 7.57754 21.75 8.94513 21.75H15.0549C16.4225 21.75 17.5248 21.75 18.3918 21.6335C19.2919 21.5125 20.0497 21.2536 20.6517 20.6516C21.2536 20.0497 21.5125 19.2919 21.6335 18.3918C21.75 17.5248 21.75 16.4225 21.75 15.0549V15C21.75 14.5858 21.4142 14.25 21 14.25C20.5858 14.25 20.25 14.5858 20.25 15C20.25 16.4354 20.2484 17.4365 20.1469 18.1919C20.0482 18.9257 19.8678 19.3142 19.591 19.591C19.3142 19.8678 18.9257 20.0482 18.1919 20.1469C17.4365 20.2484 16.4354 20.25 15 20.25H9C7.56459 20.25 6.56347 20.2484 5.80812 20.1469C5.07435 20.0482 4.68577 19.8678 4.40901 19.591C4.13225 19.3142 3.9518 18.9257 3.85315 18.1919C3.75159 17.4365 3.75 16.4354 3.75 15Z\"/></g>");
+export const ClockCircle = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 7.25C11.5858 7.25 11.25 7.58579 11.25 8V12C11.25 12.1989 11.3291 12.3896 11.4697 12.5303L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L12.75 11.6895V8C12.75 7.58579 12.4142 7.25 12 7.25Z\" clip-rule=\"evenodd\"/>");
+export const InfoCircle = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM12 17.75C12.4142 17.75 12.75 17.4142 12.75 17V11C12.75 10.5858 12.4142 10.25 12 10.25C11.5858 10.25 11.25 10.5858 11.25 11V17C11.25 17.4142 11.5858 17.75 12 17.75ZM12 7C12.5523 7 13 7.44772 13 8C13 8.55228 12.5523 9 12 9C11.4477 9 11 8.55228 11 8C11 7.44772 11.4477 7 12 7Z\" clip-rule=\"evenodd\"/>");
+export const Lightbulb = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M11.5 2C15.6421 2 19 5.43634 19 9.6748C18.9999 11.947 18.0335 13.9894 16.501 15.3936C15.9903 15.8614 15.6119 16.2084 15.3438 16.46C15.2098 16.5857 15.1069 16.6834 15.0312 16.7588C14.9935 16.7964 14.9649 16.8265 14.9434 16.8496C14.9328 16.861 14.9247 16.8703 14.9189 16.877L14.9141 16.8828L14.9111 16.8867C14.6746 17.1854 14.6233 17.2622 14.5928 17.332C14.5623 17.4018 14.5401 17.4925 14.4805 17.8721C14.457 18.0219 14.4541 18.2787 14.4541 18.9766V19.0068C14.4541 19.4159 14.4544 19.769 14.4287 20.0586C14.4016 20.3646 14.3417 20.6675 14.1807 20.9531C14.0011 21.2713 13.7426 21.536 13.4316 21.7197C13.1524 21.8846 12.8558 21.9459 12.5566 21.9736C12.2737 21.9998 11.9289 22 11.5293 22H11.4707C11.0711 22 10.7263 21.9998 10.4434 21.9736C10.1442 21.9459 9.84759 21.8846 9.56836 21.7197C9.25741 21.536 8.99886 21.2713 8.81934 20.9531C8.65829 20.6675 8.59841 20.3646 8.57129 20.0586C8.54564 19.769 8.54588 19.4159 8.5459 19.0068V18.9766C8.5459 18.2787 8.54304 18.0219 8.51953 17.8721C8.45986 17.4925 8.43771 17.4018 8.40723 17.332C8.37674 17.2622 8.32538 17.1854 8.08887 16.8867L8.08594 16.8828L8.08105 16.877C8.07526 16.8703 8.06721 16.861 8.05664 16.8496C8.03515 16.8265 8.00646 16.7964 7.96875 16.7588C7.89312 16.6834 7.79023 16.5857 7.65625 16.46C7.38812 16.2084 7.00967 15.8614 6.49902 15.3936C4.96655 13.9894 4.00011 11.947 4 9.6748C4 5.43634 7.35786 2 11.5 2ZM9.91406 19.6748C9.91704 19.7716 9.92196 19.8564 9.92871 19.9326C9.94726 20.1419 9.97856 20.2179 10 20.2559C10.0598 20.3619 10.1454 20.4505 10.249 20.5117C10.2862 20.5337 10.3608 20.565 10.5654 20.584C10.7794 20.6038 11.0618 20.6045 11.499 20.6045C11.9364 20.6045 12.2195 20.6038 12.4336 20.584C12.6372 20.5651 12.7118 20.5336 12.749 20.5117C12.8527 20.4505 12.9392 20.3619 12.999 20.2559C13.0205 20.2178 13.0518 20.1417 13.0703 19.9326C13.0771 19.8564 13.081 19.7716 13.084 19.6748H9.91406ZM13.4893 13.3506C13.1307 13.1432 12.6713 13.2665 12.4639 13.625C12.2465 14.0003 11.8424 14.25 11.3809 14.25C10.9193 14.25 10.5151 14.0004 10.2979 13.625C10.0905 13.2666 9.63192 13.1435 9.27344 13.3506C8.91489 13.558 8.79162 14.0174 8.99902 14.376C9.35228 14.9866 9.93553 15.4497 10.6309 15.6465V17C10.6309 17.4142 10.9667 17.7499 11.3809 17.75C11.7951 17.75 12.1309 17.4142 12.1309 17V15.6465C12.8262 15.4497 13.4094 14.9866 13.7627 14.376C13.9701 14.0175 13.8478 13.558 13.4893 13.3506Z\" clip-rule=\"evenodd\"/>");
+export const DangerTriangle = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M5.31171 10.7615C8.23007 5.58716 9.68925 3 12 3C14.3107 3 15.7699 5.58716 18.6883 10.7615L19.0519 11.4063C21.4771 15.7061 22.6897 17.856 21.5937 19.428C20.4978 21 17.7864 21 12.3637 21H11.6363C6.21356 21 3.50217 21 2.40626 19.428C1.31034 17.856 2.52291 15.7061 4.94805 11.4063L5.31171 10.7615ZM12 7.25C12.4142 7.25 12.75 7.58579 12.75 8V13C12.75 13.4142 12.4142 13.75 12 13.75C11.5858 13.75 11.25 13.4142 11.25 13V8C11.25 7.58579 11.5858 7.25 12 7.25ZM12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z\" clip-rule=\"evenodd\"/>");
+export const ShieldWarning = /* @__PURE__ */ solar("<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M3 10.4167C3 7.21907 3 5.62028 3.37752 5.08241C3.75503 4.54454 5.25832 4.02996 8.26491 3.00079L8.83772 2.80472C10.405 2.26824 11.1886 2 12 2C12.8114 2 13.595 2.26824 15.1623 2.80472L15.7351 3.00079C18.7417 4.02996 20.245 4.54454 20.6225 5.08241C21 5.62028 21 7.21907 21 10.4167V11.9914C21 17.6294 16.761 20.3655 14.1014 21.5273C13.38 21.8424 13.0193 22 12 22C10.9807 22 10.62 21.8424 9.89856 21.5273C7.23896 20.3655 3 17.6294 3 11.9914V10.4167ZM12 7.25C12.4142 7.25 12.75 7.58579 12.75 8V12C12.75 12.4142 12.4142 12.75 12 12.75C11.5858 12.75 11.25 12.4142 11.25 12V8C11.25 7.58579 11.5858 7.25 12 7.25ZM12 16C12.5523 16 13 15.5523 13 15C13 14.4477 12.5523 14 12 14C11.4477 14 11 14.4477 11 15C11 15.5523 11.4477 16 12 16Z\" clip-rule=\"evenodd\"/>");
+export const AltArrowDown = /* @__PURE__ */ solar("<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M19 9L12 15L5 9\"/>");
+export const AltArrowRight = /* @__PURE__ */ solar("<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M9 5L15 12L9 19\"/>");
+export const AltArrowLeft = /* @__PURE__ */ solar("<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M15 5L9 12L15 19\"/>");
+export const ArrowRight = /* @__PURE__ */ solar("<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M4 12H20M14 18L20 12L14 6\"/>");
+export const HamburgerMenu = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M20 7L4 7\"/><path d=\"M20 12L4 12\"/><path d=\"M20 17L4 17\"/></g>");
+export const CloseCircle = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M14.5 9.50002L9.5 14.5M9.49998 9.5L14.5 14.5\"/></g>");
+export const Close = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M19.0068 5L5.00684 19\"/><path d=\"M19 19L5 5\"/></g>");
+export const Magnifer = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"11.5\" cy=\"11.5\" r=\"9.5\"/><path d=\"M18.2173 18.2178L21.9999 22.0004\"/></g>");
+export const Copy = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M6 11C6 8.17157 6 6.75736 6.87868 5.87868C7.75736 5 9.17157 5 12 5H15C17.8284 5 19.2426 5 20.1213 5.87868C21 6.75736 21 8.17157 21 11V16C21 18.8284 21 20.2426 20.1213 21.1213C19.2426 22 17.8284 22 15 22H12C9.17157 22 7.75736 22 6.87868 21.1213C6 20.2426 6 18.8284 6 16V11Z\"/><path d=\"M6 19C4.34315 19 3 17.6569 3 16V10C3 6.22876 3 4.34315 4.17157 3.17157C5.34315 2 7.22876 2 11 2H15C16.6569 2 18 3.34315 18 5\"/></g>");
+export const CheckCircle = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path stroke-linejoin=\"round\" d=\"M8.5 12.5L10.5 14.5L15.5 9.5\"/></g>");
+export const LinkMinimalistic = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M8.99991 11.9999H14.9999\"/><path d=\"M9 18H8C4.68629 18 2 15.3137 2 12C2 8.68629 4.68629 6 8 6H9\"/><path d=\"M15 6H16C19.3137 6 22 8.68629 22 12C22 15.3137 19.3137 18 16 18H15\"/></g>");
+export const Sun = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"5\"/><path d=\"M12 2V4\"/><path d=\"M12 20V22\"/><path d=\"M4 12L2 12\"/><path d=\"M22 12L20 12\"/><path d=\"M19.7778 4.22266L17.5558 6.25424\"/><path d=\"M4.22217 4.22266L6.44418 6.25424\"/><path d=\"M6.44434 17.5557L4.22211 19.7779\"/><path d=\"M19.7778 19.7773L17.5558 17.5551\"/></g>");
+export const Moon = /* @__PURE__ */ solar("<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M12 22C17.5228 22 22 17.5228 22 12C22 11.5373 21.3065 11.4608 21.0672 11.8568C19.9289 13.7406 17.8615 15 15.5 15C11.9101 15 9 12.0899 9 8.5C9 6.13845 10.2594 4.07105 12.1432 2.93276C12.5392 2.69347 12.4627 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\"/>");
+export const Pen = /* @__PURE__ */ solar("<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" d=\"M14.3601 4.07866L15.2869 3.15178C16.8226 1.61607 19.3125 1.61607 20.8482 3.15178C22.3839 4.68748 22.3839 7.17735 20.8482 8.71306L19.9213 9.63993M14.3601 4.07866C14.3601 4.07866 14.4759 6.04828 16.2138 7.78618C17.9517 9.52407 19.9213 9.63993 19.9213 9.63993M19.9213 9.63993L11.4001 18.1612C10.8229 18.7383 10.5344 19.0269 10.2162 19.2751C9.84082 19.5679 9.43469 19.8189 9.00498 20.0237C8.6407 20.1973 8.25352 20.3263 7.47918 20.5844L4.19792 21.6782L3.39584 21.9456C3.01478 22.0726 2.59466 21.9734 2.31063 21.6894C2.0266 21.4053 1.92743 20.9852 2.05445 20.6042L2.32181 19.8021L3.41556 16.5208C3.67368 15.7465 3.80273 15.3593 3.97634 14.995C4.18114 14.5653 4.43213 14.1592 4.7249 13.7838C4.97308 13.4656 5.26166 13.1771 5.83882 12.5999L14.3601 4.07866M4.19792 21.6782L2.32181 19.8021\"/>");
+export const DangerTriangleLine = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M5.31171 10.7615C8.23007 5.58716 9.68925 3 12 3C14.3107 3 15.7699 5.58716 18.6883 10.7615L19.0519 11.4063C21.4771 15.7061 22.6897 17.856 21.5937 19.428C20.4978 21 17.7864 21 12.3637 21H11.6363C6.21356 21 3.50217 21 2.40626 19.428C1.31034 17.856 2.52291 15.7061 4.94805 11.4063L5.31171 10.7615Z\"/><path d=\"M12 8V13\"/><path stroke-linejoin=\"round\" d=\"M12 16H12.0001\"/></g>");
+export const List = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M20 7L4 7\"/><path d=\"M15 12L4 12\"/><path d=\"M9 17H4\"/></g>");
+export const Add = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M4 12L20 12\"/><path d=\"M12.0204 4L12.0205 20.0003\"/></g>");
+export const Hashtag = /* @__PURE__ */ solar("<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M10 3L5 21\"/><path d=\"M19 3L14 21\"/><path d=\"M22 9H4\"/><path d=\"M20 16H2\"/></g>");
diff --git a/site/src/components/marks.tsx b/site/src/components/marks.tsx
new file mode 100644
index 0000000..551aa1b
--- /dev/null
+++ b/site/src/components/marks.tsx
@@ -0,0 +1,37 @@
+import type React from 'react';
+
+// the platforms' own marks, unmodified, for the places that name them
+
+export type PlatformIconProps = React.SVGProps<SVGSVGElement>;
+
+export function YouTubeIcon({ className, ...props }: PlatformIconProps) {
+ return (
+ <svg viewBox="0 0 24 24" className={className} fill="currentColor" aria-hidden="true" {...props}>
+ <path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" />
+ </svg>
+ );
+}
+
+export function InstagramIcon({ className, ...props }: PlatformIconProps) {
+ return (
+ <svg viewBox="0 0 24 24" className={className} fill="currentColor" aria-hidden="true" {...props}>
+ <path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z" />
+ </svg>
+ );
+}
+
+export function RedditIcon({ className, ...props }: PlatformIconProps) {
+ return (
+ <svg viewBox="0 0 24 24" className={className} fill="currentColor" aria-hidden="true" {...props}>
+ <path d="M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z" />
+ </svg>
+ );
+}
+
+export function GitHubIcon({ className, ...props }: PlatformIconProps) {
+ return (
+ <svg viewBox="0 0 24 24" className={className} fill="currentColor" aria-hidden="true" {...props}>
+ <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
+ </svg>
+ );
+}
diff --git a/site/src/components/mockups/AnalyticsCard.tsx b/site/src/components/mockups/AnalyticsCard.tsx
new file mode 100644
index 0000000..c552faf
--- /dev/null
+++ b/site/src/components/mockups/AnalyticsCard.tsx
@@ -0,0 +1,243 @@
+import { useRef } from 'react';
+import { AnimatePresence, LayoutGroup, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { formatNumber } from '@/lib/format';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { Lightbulb } from '@/components/icons';
+import { PanelCard, PlatformMark } from './kit';
+import { AreaChart } from './AreaChart';
+import { CountUp } from './CountUp';
+import { Cursor } from './Cursor';
+import { MONTHS, YOUTUBE_WEEKS } from './sample';
+
+// reset, numbers and chart, look at week 8, look at week 12, travel to the tab, click it, read the comparison
+const STEPS = [0.5, 1.9, 1.1, 1.2, 0.9, 0.5, 3.6];
+const PHASE = { count: 1, peek: 2, latest: 3, travel: 4, click: 5, compare: 6 } as const;
+
+// four of the eight tabs on the app's channel page
+const TABS = ['Overview', 'Engagement', 'Growth', 'Shorts and regular'];
+const COMPARE_TAB = 3;
+
+const EASE = [0.22, 1, 0.36, 1] as const;
+
+function OverviewView({ play, focus }: { play: boolean; focus: number | null }) {
+ const week = focus ?? YOUTUBE_WEEKS.length - 1;
+ const gained = YOUTUBE_WEEKS[week] - YOUTUBE_WEEKS[Math.max(0, week - 1)];
+ return (
+ <div className="flex h-full flex-col gap-3">
+ <div className="grid grid-cols-3 gap-2.5">
+ {[
+ { label: 'Subscribers', value: 84_213, style: 'number' as const },
+ { label: 'Avg views', value: 18_400, style: 'compact' as const },
+ { label: 'Engagement', value: 5.2, style: 'percent' as const },
+ ].map(stat => (
+ <div key={stat.label} className="rounded-md border border-line p-2.5">
+ <p className="truncate text-[10px] text-ink-muted">{stat.label}</p>
+ <CountUp
+ value={stat.value}
+ style={stat.style}
+ active={play}
+ className="mt-1 block font-display text-base font-semibold text-ink"
+ />
+ </div>
+ ))}
+ </div>
+ <div className="flex min-h-0 flex-1 flex-col rounded-md border border-line p-3">
+ <div className="flex items-center justify-between">
+ <p className="text-[11px] font-semibold text-ink">Subscribers, last 12 weeks</p>
+ <span className="font-mono text-[10px] text-success">+12,413</span>
+ </div>
+ <AreaChart
+ series={[{ values: YOUTUBE_WEEKS, tone: 'accent' }]}
+ play={play}
+ labels={MONTHS}
+ focus={focus}
+ anchors
+ tooltip={
+ <>
+ <p className="font-mono text-[10px] text-ink-muted">Week {week + 1}</p>
+ <p className="text-xs font-semibold text-ink tabular-nums">
+ {formatNumber(YOUTUBE_WEEKS[week])}
+ <span className="ml-1.5 font-mono text-[10px] font-normal text-success">+{formatNumber(gained)}</span>
+ </p>
+ </>
+ }
+ className="mt-2 min-h-0 flex-1"
+ />
+ </div>
+ </div>
+ );
+}
+
+const SPLIT = [
+ { label: 'Shorts', share: 61, average: '24.1K', bar: 'bg-accent' },
+ { label: 'Regular videos', share: 39, average: '15.8K', bar: 'bg-afterglow' },
+];
+
+// the month's uploads in the order they went up
+const UPLOADS = [
+ 'short',
+ 'short',
+ 'regular',
+ 'short',
+ 'short',
+ 'short',
+ 'regular',
+ 'short',
+ 'short',
+ 'regular',
+ 'short',
+ 'regular',
+ 'short',
+];
+
+function CompareView() {
+ return (
+ <div className="flex h-full flex-col gap-3">
+ <div className="rounded-md border border-line p-3.5">
+ <p className="text-[11px] font-semibold text-ink">Views this month</p>
+ <ul className="mt-3 flex flex-col gap-3.5">
+ {SPLIT.map((row, i) => (
+ <li key={row.label}>
+ <div className="flex items-center justify-between text-xs">
+ <span className="text-ink">{row.label}</span>
+ <span className="font-mono text-ink tabular-nums">{row.share}%</span>
+ </div>
+ <span className="mt-1.5 block h-2 overflow-hidden rounded-full bg-surface-sunken">
+ <motion.span
+ className={cn('block h-full rounded-full', row.bar)}
+ initial={{ width: '0%' }}
+ animate={{ width: `${row.share}%` }}
+ transition={{ duration: 1, ease: EASE, delay: 0.2 + i * 0.12 }}
+ />
+ </span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ <div className="grid grid-cols-2 gap-2.5">
+ {SPLIT.map(row => (
+ <div key={row.label} className="rounded-md border border-line p-2.5">
+ <p className="truncate text-[10px] text-ink-muted">Avg views, {row.label.toLowerCase()}</p>
+ <p className="mt-1 font-display text-base font-semibold text-ink tabular-nums">{row.average}</p>
+ </div>
+ ))}
+ </div>
+ <div className="rounded-md border border-line p-3">
+ <div className="flex items-center justify-between text-[11px]">
+ <span className="font-semibold text-ink">Uploads this month</span>
+ <span className="font-mono text-[10px] text-ink-muted">9 Shorts, 4 regular</span>
+ </div>
+ <div className="mt-2.5 flex gap-1">
+ {UPLOADS.map((kind, i) => (
+ <motion.span
+ key={i}
+ className={cn('h-5 flex-1 rounded-sm', kind === 'short' ? 'bg-accent/80' : 'bg-afterglow/80')}
+ initial={{ opacity: 0, scale: 0.6 }}
+ animate={{ opacity: 1, scale: 1 }}
+ transition={{ duration: 0.3, ease: EASE, delay: 0.45 + i * 0.035 }}
+ />
+ ))}
+ </div>
+ </div>
+ <motion.div
+ className="mt-auto flex items-start gap-2.5 rounded-md bg-afterglow-soft p-3"
+ initial={{ opacity: 0, y: 8 }}
+ animate={{ opacity: 1, y: 0 }}
+ transition={{ duration: 0.5, ease: EASE, delay: 0.9 }}
+ >
+ <Lightbulb className="mt-0.5 size-4 shrink-0 text-afterglow-text" />
+ <p className="text-xs leading-5 text-ink">
+ <span className="font-semibold">Shorts vs long-form:</span> Shorts brought 61% of this month's views.
+ </p>
+ </motion.div>
+ </div>
+ );
+}
+
+// one channel's analytics: the numbers count up and the line draws, the cursor reads two weeks off the chart,
+// then opens Shorts and regular to compare the two kinds of video
+export function AnalyticsCard() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop, reduce } = useAutoplay(ref, STEPS);
+ const comparing = phase >= PHASE.click;
+ const focus = phase === PHASE.peek ? 7 : phase === PHASE.latest ? 11 : null;
+ const target =
+ reduce || phase < PHASE.peek || phase > PHASE.click
+ ? null
+ : phase === PHASE.peek
+ ? 'point-7'
+ : phase === PHASE.latest
+ ? 'point-11'
+ : `tab-${COMPARE_TAB}`;
+ const clicks = loop + (phase >= PHASE.click ? 1 : 0);
+
+ return (
+ <div
+ ref={ref}
+ role="img"
+ aria-label="A YouTube channel's analytics in Twiligent: subscribers, average views and engagement, a weekly growth chart, and how Shorts compare with regular videos."
+ className="relative w-full max-w-[34rem]"
+ >
+ <PanelCard className="flex h-[28rem] flex-col p-5">
+ <div className="flex items-center gap-3">
+ <span className="grid size-10 place-items-center rounded-full bg-surface-sunken">
+ <PlatformMark platform="youtube" className="size-5" />
+ </span>
+ <div className="min-w-0 flex-1">
+ <p className="truncate font-display text-base font-semibold text-ink">Northwind Kitchen</p>
+ <p className="text-xs text-ink-muted">YouTube channel</p>
+ </div>
+ <span className="hidden rounded-full bg-surface-sunken px-2.5 py-1 text-[11px] font-medium text-ink-muted sm:inline">
+ Last 12 weeks
+ </span>
+ </div>
+
+ <LayoutGroup id="analytics-card-tabs">
+ <div className="mt-4 flex gap-1 rounded-full bg-surface-sunken p-1">
+ {TABS.map((tab, i) => {
+ const active = comparing ? i === COMPARE_TAB : i === 0;
+ return (
+ <span
+ key={tab}
+ data-cursor={`tab-${i}`}
+ className={cn(
+ 'relative flex-1 truncate rounded-full px-1 py-1.5 text-center text-[11px] font-medium transition-colors duration-300',
+ active ? 'text-ink' : 'text-ink-muted',
+ // a phone has room for three tabs
+ i === 1 && 'hidden sm:block',
+ )}
+ >
+ {active && (
+ <motion.span
+ layoutId="active-tab"
+ className="absolute inset-0 rounded-full bg-surface-raised shadow-sm"
+ transition={{ duration: 0.45, ease: EASE }}
+ />
+ )}
+ <span className="relative">{tab}</span>
+ </span>
+ );
+ })}
+ </div>
+ </LayoutGroup>
+
+ <div className="relative mt-4 min-h-0 flex-1">
+ <AnimatePresence mode="wait" initial={false}>
+ <motion.div
+ key={comparing ? 'compare' : `overview-${loop}`}
+ className="h-full"
+ initial={{ opacity: 0, y: 6 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -4 }}
+ transition={{ duration: 0.26, ease: EASE }}
+ >
+ {comparing ? <CompareView /> : <OverviewView play={phase >= PHASE.count} focus={focus} />}
+ </motion.div>
+ </AnimatePresence>
+ </div>
+ </PanelCard>
+ <Cursor stage={ref} target={target} clicks={clicks} />
+ </div>
+ );
+}
diff --git a/site/src/components/mockups/AreaChart.tsx b/site/src/components/mockups/AreaChart.tsx
new file mode 100644
index 0000000..b3a41a5
--- /dev/null
+++ b/site/src/components/mockups/AreaChart.tsx
@@ -0,0 +1,179 @@
+import { useId, useRef } from 'react';
+import type { CSSProperties, ReactNode } from 'react';
+import { cn } from '@/lib/cn';
+import { useElementSize } from '@/hooks/useElementSize';
+import { areaPath, chartPoints, seriesRange, smoothPath } from '@/lib/chart';
+
+export type ChartTone = 'accent' | 'afterglow';
+
+export interface ChartSeries {
+ values: number[];
+ tone: ChartTone;
+}
+
+export interface AreaChartProps {
+ series: ChartSeries[];
+ // starts the drawing; pictures that loop remount the chart with a new key to draw it again
+ play: boolean;
+ labels?: string[];
+ gridLines?: number;
+ // the point a reader is looking at: a guide line, a dot on each series, and the tooltip above the first
+ focus?: number | null;
+ tooltip?: ReactNode;
+ // a dot on each line's latest point; small sparklines leave it out
+ dots?: boolean;
+ // marks each point of the first line with data-cursor="point-<n>" for a picture's cursor to move to
+ anchors?: boolean;
+ delay?: number;
+ className?: string;
+}
+
+const TONES: Record<ChartTone, { stroke: string; fill: string; color: string }> = {
+ accent: { stroke: 'stroke-accent', fill: 'fill-accent', color: 'var(--accent)' },
+ afterglow: { stroke: 'stroke-afterglow', fill: 'fill-afterglow', color: 'var(--color-afterglow)' },
+};
+
+const GLIDE = 'transition-transform duration-500 ease-[var(--ease-panel)]';
+
+// a smooth area chart drawn at the size it is given, in CSS only so the hero can use it without the animation library
+export function AreaChart({
+ series,
+ play,
+ labels,
+ gridLines = 3,
+ focus = null,
+ tooltip,
+ dots = true,
+ anchors = false,
+ delay = 0,
+ className,
+}: AreaChartProps) {
+ const id = useId();
+ const plotRef = useRef<HTMLDivElement>(null);
+ const { width, height } = useElementSize(plotRef);
+ const range = seriesRange(series.map(s => s.values));
+ // room above the highest point for its dot and below the lowest for the line's width, smaller on small charts
+ const margin = { top: Math.min(16, height * 0.14), bottom: Math.min(4, height * 0.06) };
+ const box = { width, height, ...margin };
+ const plotted = series.map(s => chartPoints(s.values, box, range));
+ const usable = height - margin.top - margin.bottom;
+ const focusPoint = focus === null ? null : plotted[0]?.[focus];
+
+ return (
+ <div className={cn('flex flex-col', className)}>
+ <div
+ ref={plotRef}
+ className={cn('relative min-h-0 flex-1', play && 'chart-play')}
+ style={{ '--delay': `${delay}ms` } as CSSProperties}
+ >
+ {width > 0 && (
+ <svg width={width} height={height} className="absolute inset-0 overflow-visible" aria-hidden="true">
+ <defs>
+ {series.map((s, i) => (
+ <linearGradient key={i} id={`${id}-${i}`} x1="0" y1="0" x2="0" y2="1">
+ <stop offset="0%" style={{ stopColor: TONES[s.tone].color, stopOpacity: i === 0 ? 0.32 : 0.22 }} />
+ <stop offset="100%" style={{ stopColor: TONES[s.tone].color, stopOpacity: 0 }} />
+ </linearGradient>
+ ))}
+ </defs>
+ {Array.from({ length: gridLines }, (_, i) => {
+ const y = margin.top + (usable * (i + 1)) / (gridLines + 1);
+ return <line key={i} x1="0" x2={width} y1={y} y2={y} className="stroke-line" strokeDasharray="2 6" />;
+ })}
+ {plotted.map((points, i) => (
+ <path key={`fill-${i}`} className="chart-fill" d={areaPath(points, height)} fill={`url(#${id}-${i})`} />
+ ))}
+ {plotted.map((points, i) => (
+ <path
+ key={`line-${i}`}
+ className={cn('chart-line', TONES[series[i].tone].stroke)}
+ d={smoothPath(points)}
+ pathLength={1}
+ fill="none"
+ strokeWidth={i === 0 ? 2.5 : 2}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ />
+ ))}
+ {focus === null &&
+ dots &&
+ plotted.map((points, i) => {
+ const [x, y] = points[points.length - 1];
+ const tone = TONES[series[i].tone];
+ return (
+ <g key={`dot-${i}`} className="chart-dot">
+ {i === 0 && play && <circle cx={x} cy={y} r="4" className={cn('ping-soft', tone.fill)} />}
+ <circle
+ cx={x}
+ cy={y}
+ r="4.5"
+ className={cn(tone.fill, 'stroke-surface-raised')}
+ strokeWidth="2.5"
+ />
+ </g>
+ );
+ })}
+ {focusPoint && (
+ <g>
+ <line
+ x1="0"
+ x2="0"
+ y1={margin.top - 6}
+ y2={height}
+ className={cn('stroke-line-strong', GLIDE)}
+ strokeDasharray="3 4"
+ style={{ transform: `translateX(${focusPoint[0]}px)` }}
+ />
+ {plotted.map((points, i) => {
+ const [x, y] = points[focus ?? 0];
+ return (
+ <circle
+ key={`focus-${i}`}
+ r="4.5"
+ className={cn(TONES[series[i].tone].fill, 'stroke-surface-raised', GLIDE)}
+ strokeWidth="2.5"
+ style={{ transform: `translate(${x}px, ${y}px)` }}
+ />
+ );
+ })}
+ </g>
+ )}
+ </svg>
+ )}
+ {anchors &&
+ plotted[0]?.map(([x, y], i) => (
+ <span key={i} data-cursor={`point-${i}`} className="absolute size-0" style={{ left: x, top: y }} />
+ ))}
+ {focusPoint && tooltip && (
+ <div
+ className={cn('pointer-events-none absolute top-0 left-0 z-10', GLIDE)}
+ style={{ transform: `translate(${focusPoint[0]}px, ${focusPoint[1]}px)` }}
+ >
+ <div
+ className={cn(
+ 'rounded-md border border-line bg-surface-raised px-2.5 py-1.5 whitespace-nowrap shadow-md',
+ GLIDE,
+ // near either edge the tooltip opens toward the middle so the card never cuts it off
+ focusPoint[0] > width * 0.7
+ ? '-translate-x-[calc(100%-10px)]'
+ : focusPoint[0] < width * 0.3
+ ? '-translate-x-[10px]'
+ : '-translate-x-1/2',
+ '-translate-y-[calc(100%+14px)]',
+ )}
+ >
+ {tooltip}
+ </div>
+ </div>
+ )}
+ </div>
+ {labels && (
+ <div className="mt-2 flex justify-between font-mono text-[10px] text-ink-muted">
+ {labels.map(label => (
+ <span key={label}>{label}</span>
+ ))}
+ </div>
+ )}
+ </div>
+ );
+}
diff --git a/site/src/components/mockups/CountUp.tsx b/site/src/components/mockups/CountUp.tsx
new file mode 100644
index 0000000..295905e
--- /dev/null
+++ b/site/src/components/mockups/CountUp.tsx
@@ -0,0 +1,37 @@
+import { useEffect } from 'react';
+import { animate, motion, useMotionValue, useReducedMotion, useTransform } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { formatNumber } from '@/lib/format';
+import type { NumberStyle } from '@/lib/format';
+
+export interface CountUpProps {
+ value: number;
+ // counts up from `from` while true, and rests at `from` while false
+ active: boolean;
+ from?: number;
+ style?: NumberStyle;
+ duration?: number;
+ className?: string;
+}
+
+// a number that counts up to its value, in fixed-width digits so the text around it never shifts
+export function CountUp({ value, active, from = 0, style = 'number', duration = 1.4, className }: CountUpProps) {
+ const reduce = useReducedMotion();
+ const current = useMotionValue(reduce ? value : from);
+ const text = useTransform(current, v => formatNumber(v, style));
+
+ useEffect(() => {
+ if (reduce) {
+ current.jump(value);
+ return;
+ }
+ if (!active) {
+ current.jump(from);
+ return;
+ }
+ const controls = animate(current, value, { duration, ease: [0.16, 1, 0.3, 1] });
+ return () => controls.stop();
+ }, [active, reduce, value, from, duration, current]);
+
+ return <motion.span className={cn('tabular-nums', className)}>{text}</motion.span>;
+}
diff --git a/site/src/components/mockups/Cursor.tsx b/site/src/components/mockups/Cursor.tsx
new file mode 100644
index 0000000..6602be0
--- /dev/null
+++ b/site/src/components/mockups/Cursor.tsx
@@ -0,0 +1,79 @@
+import { useEffect, useLayoutEffect, useRef } from 'react';
+import type { RefObject } from 'react';
+import { animate, motion, useMotionValue } from 'motion/react';
+
+export interface CursorProps {
+ // the picture the cursor moves over; targets inside it carry data-cursor="<name>"
+ stage: RefObject<HTMLElement | null>;
+ target: string | null;
+ // goes up by one for each click, so the same target can be clicked twice
+ clicks: number;
+}
+
+// glide and press timings measured from the Activepieces product pictures
+const GLIDE = { duration: 0.72, ease: [0.5, 0.02, 0.2, 1] as const };
+const FADE = { duration: 0.26 };
+
+// where the pointer's tip rests on a target, as a share of its width and height
+const TIP: [number, number] = [0.58, 0.62];
+
+function locate(stage: HTMLElement, name: string): [number, number] | null {
+ const el = stage.querySelector<HTMLElement>(`[data-cursor="${name}"]`);
+ if (!el) return null;
+ const s = stage.getBoundingClientRect();
+ const r = el.getBoundingClientRect();
+ return [r.left - s.left + r.width * TIP[0], r.top - s.top + r.height * TIP[1]];
+}
+
+// a pointer that glides between named targets in a picture and clicks them, hidden while target is null
+export function Cursor({ stage, target, clicks }: CursorProps) {
+ const x = useMotionValue(0);
+ const y = useMotionValue(0);
+ const opacity = useMotionValue(0);
+ const glyph = useRef<SVGSVGElement>(null);
+ const ring = useRef<HTMLSpanElement>(null);
+ const shown = useRef(false);
+
+ useLayoutEffect(() => {
+ const el = stage.current;
+ const spot = el && target ? locate(el, target) : null;
+ if (!spot) {
+ shown.current = false;
+ animate(opacity, 0, FADE);
+ return;
+ }
+ // the first stop after being hidden is where the cursor appears, not somewhere it travels to
+ if (shown.current) {
+ animate(x, spot[0], GLIDE);
+ animate(y, spot[1], GLIDE);
+ } else {
+ x.jump(spot[0]);
+ y.jump(spot[1]);
+ animate(opacity, 1, FADE);
+ shown.current = true;
+ }
+ }, [stage, target, x, y, opacity]);
+
+ useEffect(() => {
+ if (clicks === 0 || !glyph.current || !ring.current) return;
+ animate(glyph.current, { scale: [1, 0.82, 1] }, { duration: 0.26, times: [0, 0.5, 1] });
+ animate(ring.current, { scale: [0.35, 1.9], opacity: [0.5, 0] }, { duration: 0.48, ease: 'easeOut' });
+ }, [clicks]);
+
+ return (
+ <motion.div aria-hidden="true" className="pointer-events-none absolute top-0 left-0 z-30" style={{ x, y, opacity }}>
+ <span
+ ref={ring}
+ className="absolute -top-1.5 -left-1.5 size-5 rounded-full border-[1.5px] border-ink-muted opacity-0"
+ />
+ <svg ref={glyph} width="22" height="24" viewBox="0 0 22 24" className="origin-[3px_2px] drop-shadow-md">
+ <path
+ d="M2.5 1.75 V18.6 L7 14.55 L10.15 21.6 L13.35 20.2 L10.3 13.3 H16.6 Z"
+ className="fill-dusk stroke-paper"
+ strokeWidth="1.5"
+ strokeLinejoin="round"
+ />
+ </svg>
+ </motion.div>
+ );
+}
diff --git a/site/src/components/mockups/OverviewWindow.tsx b/site/src/components/mockups/OverviewWindow.tsx
new file mode 100644
index 0000000..52f010e
--- /dev/null
+++ b/site/src/components/mockups/OverviewWindow.tsx
@@ -0,0 +1,247 @@
+import type { CSSProperties } from 'react';
+import { cn } from '@/lib/cn';
+import { formatNumber } from '@/lib/format';
+import {
+ Bookmark,
+ CalendarMark,
+ Chart,
+ ClockCircle,
+ Gallery,
+ Home,
+ Plane,
+ RefreshCircle,
+ UsersGroup,
+ Videocamera,
+ Widget,
+} from '@/components/icons';
+import { Mark } from '@/components/brand';
+import { PlatformMark, Window } from './kit';
+import { AreaChart } from './AreaChart';
+import type { ChartTone } from './AreaChart';
+import { ACCOUNTS, INSTAGRAM_WEEKS, MONTHS, YOUTUBE_WEEKS } from './sample';
+
+const NAV = [
+ { label: 'Overview', icon: Home, active: true },
+ { label: 'Videos', icon: Videocamera },
+ { label: 'Shorts', icon: Widget },
+ { label: 'Instagram content', icon: Gallery },
+ { label: 'Reddit posts', icon: Chart },
+ { label: 'Tracked content', icon: Bookmark },
+];
+
+interface Tile {
+ label: string;
+ value: string;
+ change: string;
+ trend: number[];
+ tone: ChartTone;
+ wide?: boolean;
+}
+
+const TOTAL = ACCOUNTS.reduce((sum, account) => sum + account.audience, 0);
+
+const TILES: Tile[] = [
+ {
+ label: 'Total audience',
+ value: formatNumber(TOTAL, 'compact'),
+ change: '+3.1%',
+ trend: YOUTUBE_WEEKS,
+ tone: 'accent',
+ },
+ {
+ label: 'Views, last 30 days',
+ value: '1.9M',
+ change: '+12.6%',
+ trend: [3, 4, 3.6, 4.4, 5, 4.6, 5.6, 6.1, 5.8, 6.8, 7.4, 8],
+ tone: 'afterglow',
+ },
+ {
+ label: 'Engagement',
+ value: '4.8%',
+ change: '+0.4 pts',
+ trend: [4.1, 4.3, 4.2, 4.4, 4.3, 4.5, 4.6, 4.5, 4.7, 4.6, 4.8, 4.8],
+ tone: 'accent',
+ wide: true,
+ },
+ {
+ label: 'Posts scheduled',
+ value: '14',
+ change: '3 this week',
+ trend: [2, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8],
+ tone: 'afterglow',
+ wide: true,
+ },
+];
+
+// delays for the parts as the window settles in, in milliseconds
+const delay = (ms: number) => ({ '--delay': `${ms}ms` }) as CSSProperties;
+
+// the Overview page of the app, settling in piece by piece in CSS alone, so the hero never waits on the animation library
+export function OverviewWindow({ className }: { className?: string }) {
+ const top = ACCOUNTS[0].audience;
+ return (
+ <div
+ role="img"
+ aria-label="The Twiligent Overview: audience totals, a growth chart, the top accounts across YouTube, Instagram and Reddit, and the next scheduled post."
+ className={className}
+ >
+ <Window url="app.twiligent.ujjwal.fyi" bodyClassName="flex h-[30rem] md:h-[34rem]">
+ <aside className="hidden w-56 shrink-0 flex-col gap-1 border-r border-line bg-surface-sunken/40 p-3 md:flex">
+ <div className="flex items-center gap-2 px-2 pt-1 pb-4">
+ <Mark className="h-5" />
+ <span className="font-display text-sm font-semibold text-ink">Twiligent</span>
+ </div>
+ {NAV.map(item => {
+ const Icon = item.icon;
+ return (
+ <span
+ key={item.label}
+ className={cn(
+ 'flex items-center gap-2.5 rounded-md px-2.5 py-1.5 text-[13px]',
+ item.active ? 'bg-surface-raised font-medium text-ink shadow-sm' : 'text-ink-muted',
+ )}
+ >
+ <Icon className={cn('size-4', item.active && 'text-accent-text')} />
+ {item.label}
+ </span>
+ );
+ })}
+ <span className="mt-3 border-t border-line pt-3" />
+ <span className="flex items-center gap-2.5 rounded-md px-2.5 py-1.5 text-[13px] text-ink-muted">
+ <Plane className="size-4" />
+ Publish
+ </span>
+ <span className="flex items-center gap-2.5 rounded-md px-2.5 py-1.5 text-[13px] text-ink-muted">
+ <UsersGroup className="size-4" />
+ Accounts
+ </span>
+ </aside>
+
+ <div className="flex min-w-0 flex-1 flex-col gap-4 p-4 md:p-6">
+ <div className="flex items-center justify-between gap-3">
+ <div>
+ <p className="font-display text-lg font-semibold text-ink md:text-xl">Overview</p>
+ <p className="text-xs text-ink-muted">{ACCOUNTS.length} accounts across YouTube, Instagram and Reddit</p>
+ </div>
+ <div className="hidden items-center gap-2 sm:flex">
+ <span className="rounded-full bg-surface-sunken px-3 py-1.5 text-xs font-medium text-ink-muted">
+ Last 12 weeks
+ </span>
+ <span className="flex items-center gap-1.5 rounded-full border border-line px-3 py-1.5 text-xs font-medium text-ink">
+ <RefreshCircle className="size-4" />
+ Refresh
+ </span>
+ </div>
+ </div>
+
+ <div className="grid grid-cols-2 gap-3 lg:grid-cols-4">
+ {TILES.map((tile, i) => (
+ <div
+ key={tile.label}
+ className={cn(
+ 'rise-in flex flex-col rounded-md border border-line bg-surface-raised p-3',
+ tile.wide && 'hidden lg:flex',
+ )}
+ style={delay(150 + i * 90)}
+ >
+ <p className="text-[11px] font-medium text-ink-muted">{tile.label}</p>
+ <div className="mt-1 flex items-end justify-between gap-2">
+ <div>
+ <p className="font-display text-lg font-semibold tracking-tight text-ink tabular-nums">
+ {tile.value}
+ </p>
+ <p className="mt-0.5 font-mono text-[10px] text-success">{tile.change}</p>
+ </div>
+ <AreaChart
+ series={[{ values: tile.trend, tone: tile.tone }]}
+ play
+ gridLines={0}
+ dots={false}
+ delay={350 + i * 90}
+ className="h-9 w-16 shrink-0"
+ />
+ </div>
+ </div>
+ ))}
+ </div>
+
+ <div className="grid min-h-0 flex-1 gap-3 lg:grid-cols-[1fr_15.5rem]">
+ <div className="rise-in flex min-h-0 flex-col rounded-md border border-line p-4" style={delay(420)}>
+ <div className="flex items-center justify-between">
+ <div>
+ <p className="text-xs font-semibold text-ink">Audience growth</p>
+ <p className="mt-0.5 font-mono text-[10px] text-ink-muted">Subscribers and followers, weekly</p>
+ </div>
+ <span className="flex gap-3 text-[10px] text-ink-muted">
+ <span className="flex items-center gap-1">
+ <span className="size-2 rounded-full bg-accent" />
+ YouTube
+ </span>
+ <span className="flex items-center gap-1">
+ <span className="size-2 rounded-full bg-afterglow" />
+ Instagram
+ </span>
+ </span>
+ </div>
+ <AreaChart
+ series={[
+ { values: YOUTUBE_WEEKS, tone: 'accent' },
+ { values: INSTAGRAM_WEEKS.map(v => v * 2.2), tone: 'afterglow' },
+ ]}
+ play
+ labels={MONTHS}
+ delay={600}
+ className="mt-3 min-h-28 flex-1"
+ />
+ </div>
+
+ <div className="hidden min-h-0 flex-col gap-3 lg:flex">
+ <div className="rise-in flex flex-col rounded-md border border-line p-3" style={delay(520)}>
+ <p className="text-xs font-semibold text-ink">Top accounts</p>
+ <ul className="mt-2 flex flex-col gap-2.5">
+ {ACCOUNTS.map((account, i) => (
+ <li key={account.name} className="flex flex-col gap-1">
+ <div className="flex items-center gap-2.5">
+ <span className="w-3 font-mono text-[11px] text-ink-muted">{i + 1}</span>
+ <PlatformMark platform={account.platform} className="size-4" />
+ <span className="min-w-0 flex-1 truncate text-xs text-ink">{account.name}</span>
+ <span className="font-mono text-xs text-ink tabular-nums">
+ {formatNumber(account.audience, 'compact')}
+ </span>
+ </div>
+ <span className="ml-5.5 h-1 overflow-hidden rounded-full bg-surface-sunken">
+ <span
+ className={cn('grow-x block h-full rounded-full', i === 0 ? 'bg-accent' : 'bg-line-strong')}
+ style={{ width: `${(account.audience / top) * 100}%`, ...delay(800 + i * 110) }}
+ />
+ </span>
+ </li>
+ ))}
+ </ul>
+ </div>
+ <div className="rise-in flex flex-1 flex-col rounded-md border border-line p-3" style={delay(640)}>
+ <p className="text-xs font-semibold text-ink">Next scheduled</p>
+ <div className="mt-2.5 flex items-center gap-2.5">
+ <span className="grid size-9 shrink-0 place-items-center rounded-md bg-accent-soft text-accent-text">
+ <Videocamera className="size-4" />
+ </span>
+ <div className="min-w-0 flex-1">
+ <p className="truncate text-xs font-medium text-ink">Lemon orzo Reel</p>
+ <p className="mt-0.5 flex items-center gap-1 text-[10px] text-ink-muted">
+ <CalendarMark className="size-3" />
+ Thursday, 18:00
+ </p>
+ </div>
+ <span className="flex items-center gap-1 rounded-full bg-afterglow-soft px-2 py-0.5 text-[10px] font-semibold text-afterglow-text">
+ <ClockCircle className="size-3" />
+ Pending
+ </span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </Window>
+ </div>
+ );
+}
diff --git a/site/src/components/mockups/ScheduleCard.tsx b/site/src/components/mockups/ScheduleCard.tsx
new file mode 100644
index 0000000..2457bee
--- /dev/null
+++ b/site/src/components/mockups/ScheduleCard.tsx
@@ -0,0 +1,309 @@
+import { useRef } from 'react';
+import { AnimatePresence, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { CalendarMark, CheckCircle, ClockCircle, RefreshCircle, Upload, Videocamera } from '@/components/icons';
+import { PanelCard, PlatformMark } from './kit';
+import { Cursor } from './Cursor';
+import { Typed } from './Typed';
+
+// how long each moment holds, in seconds, and what happens in it
+const STEPS = [0.6, 0.8, 1.5, 0.8, 3.2, 0.8, 0.7, 0.8, 0.6, 0.8, 1.9, 1.3, 3.4];
+const PHASE = {
+ atUpload: 1,
+ upload: 2,
+ atCaption: 3,
+ caption: 4,
+ atDate: 5,
+ openDate: 6,
+ atSlot: 7,
+ pickSlot: 8,
+ atSchedule: 9,
+ schedule: 10,
+ publishing: 11,
+ published: 12,
+} as const;
+const CLICKS: number[] = [PHASE.upload, PHASE.caption, PHASE.openDate, PHASE.pickSlot, PHASE.schedule];
+
+const TARGETS: Record<number, string> = {
+ [PHASE.atUpload]: 'upload',
+ [PHASE.upload]: 'upload',
+ [PHASE.atCaption]: 'caption',
+ [PHASE.caption]: 'caption',
+ [PHASE.atDate]: 'date',
+ [PHASE.openDate]: 'date',
+ [PHASE.atSlot]: 'slot',
+ [PHASE.pickSlot]: 'slot',
+ [PHASE.atSchedule]: 'schedule',
+ [PHASE.schedule]: 'schedule',
+};
+
+const CAPTION = 'One-pan lemon orzo in 20 minutes. Recipe in the comments.\n\n#recipes #onepan #weeknightdinner';
+
+// hashtags in the brand red, the rest as typed
+function withTags(typed: string) {
+ return typed.split(/(#\w*)/).map((part, i) =>
+ part.startsWith('#') ? (
+ <span key={i} className="text-accent-text">
+ {part}
+ </span>
+ ) : (
+ part
+ ),
+ );
+}
+const SLOTS = ['Today, 21:00', 'Thursday, 18:00', 'Friday, 12:30'];
+const PICKED = 1;
+
+// enter and leave curves measured from the Activepieces menus
+const ENTER = [0.16, 1, 0.3, 1] as const;
+const LEAVE = [0.4, 0, 0.9, 0.4] as const;
+const SWAP = {
+ initial: { opacity: 0, y: 4 },
+ animate: { opacity: 1, y: 0 },
+ exit: { opacity: 0, y: -4 },
+ transition: { duration: 0.26, ease: ENTER },
+};
+
+type Status = 'Draft' | 'Pending' | 'Publishing' | 'Published';
+
+const STATUS_STYLE: Record<Status, string> = {
+ Draft: 'bg-surface-sunken text-ink-muted',
+ Pending: 'bg-afterglow-soft text-afterglow-text',
+ Publishing: 'bg-info-soft text-info',
+ Published: 'bg-success-soft text-success',
+};
+
+function statusAt(phase: number): Status {
+ if (phase >= PHASE.published) return 'Published';
+ if (phase >= PHASE.publishing) return 'Publishing';
+ if (phase >= PHASE.schedule) return 'Pending';
+ return 'Draft';
+}
+
+function StatusBadge({ status }: { status: Status }) {
+ const Icon = status === 'Published' ? CheckCircle : status === 'Publishing' ? RefreshCircle : ClockCircle;
+ return (
+ <AnimatePresence mode="popLayout" initial={false}>
+ <motion.span
+ key={status}
+ className={cn(
+ 'inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-semibold',
+ STATUS_STYLE[status],
+ )}
+ initial={{ opacity: 0, scale: 0.7 }}
+ animate={{ opacity: 1, scale: 1 }}
+ exit={{ opacity: 0, scale: 0.7 }}
+ transition={{ duration: 0.24, ease: ENTER }}
+ >
+ <Icon className={cn('size-4', status === 'Publishing' && 'animate-spin')} />
+ {status}
+ </motion.span>
+ </AnimatePresence>
+ );
+}
+
+// a Reel set up for later, clicked through by a cursor: the video, the caption, the time, Schedule post,
+// then the server publishing it at that time
+export function ScheduleCard() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop, reduce } = useAutoplay(ref, STEPS);
+ const uploaded = phase >= PHASE.upload;
+ const dateOpen = phase === PHASE.openDate || phase === PHASE.atSlot;
+ const datePicked = phase >= PHASE.pickSlot;
+ const ready = datePicked;
+ const status = statusAt(phase);
+ const target = reduce ? null : (TARGETS[phase] ?? null);
+ const clicks = loop * CLICKS.length + CLICKS.filter(p => phase >= p).length;
+ const toast = phase === PHASE.schedule || phase === PHASE.publishing;
+
+ return (
+ <div
+ ref={ref}
+ role="img"
+ aria-label="Scheduling an Instagram Reel in Twiligent: the video uploads, the caption is written, Thursday at 18:00 is picked, Schedule post is clicked, and the server publishes the post at that time."
+ className="relative w-full max-w-[34rem]"
+ >
+ <PanelCard className="flex h-[28rem] flex-col p-5">
+ <div className="flex items-center justify-between gap-3">
+ <div className="flex min-w-0 items-center gap-2.5">
+ <PlatformMark platform="instagram" className="size-5 shrink-0" />
+ <p className="truncate text-sm font-semibold text-ink">@northwind.kitchen</p>
+ </div>
+ <div className="flex gap-0.5 rounded-full bg-surface-sunken p-0.5 text-[11px] font-medium">
+ {['Photo', 'Reel', 'Story'].map(kind => (
+ <span
+ key={kind}
+ className={cn(
+ 'rounded-full px-2.5 py-1',
+ kind === 'Reel' ? 'bg-surface-raised text-ink shadow-sm' : 'text-ink-muted',
+ )}
+ >
+ {kind}
+ </span>
+ ))}
+ </div>
+ </div>
+
+ <div
+ data-cursor="upload"
+ className={cn(
+ 'mt-4 flex h-[4.25rem] items-center gap-3 rounded-md border p-3 transition-colors duration-300',
+ uploaded ? 'border-line' : 'border-dashed border-line-strong',
+ )}
+ >
+ <AnimatePresence mode="wait" initial={false}>
+ {uploaded ? (
+ <motion.div key="file" className="flex min-w-0 flex-1 items-center gap-3" {...SWAP}>
+ <span className="grid size-10 shrink-0 place-items-center rounded-md bg-fold text-on-accent">
+ <Videocamera className="size-4" />
+ </span>
+ <div className="min-w-0 flex-1">
+ <div className="flex items-center justify-between gap-2">
+ <p className="truncate font-mono text-xs text-ink">lemon-orzo-reel.mp4</p>
+ <span className="font-mono text-[10px] text-ink-muted">48 MB</span>
+ </div>
+ <span className="mt-2 block h-1.5 overflow-hidden rounded-full bg-surface-sunken">
+ <motion.span
+ className="block h-full rounded-full bg-accent"
+ initial={{ width: reduce ? '100%' : '0%' }}
+ animate={{ width: '100%' }}
+ transition={{ duration: 1.1, ease: ENTER, delay: 0.1 }}
+ />
+ </span>
+ </div>
+ </motion.div>
+ ) : (
+ <motion.div key="empty" className="flex min-w-0 flex-1 items-center gap-3" {...SWAP}>
+ <span className="grid size-10 shrink-0 place-items-center rounded-md bg-surface-sunken text-ink-muted">
+ <Upload className="size-5" />
+ </span>
+ <div>
+ <p className="text-[13px] font-medium text-ink">Choose a video</p>
+ <p className="text-[11px] text-ink-muted">MP4 or MOV, up to 300MB</p>
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
+
+ <div
+ data-cursor="caption"
+ className={cn(
+ 'mt-3 flex min-h-0 flex-1 flex-col rounded-md border p-3 transition-colors duration-300',
+ phase >= PHASE.caption ? 'border-ink-muted/60' : 'border-line',
+ )}
+ >
+ <p className="text-[13px] leading-5 whitespace-pre-line text-ink">
+ {phase >= PHASE.caption ? (
+ <Typed key={loop} text={CAPTION} active speed={34} render={withTags} />
+ ) : (
+ <span className="text-ink-muted">Write a caption</span>
+ )}
+ </p>
+ <p className="mt-auto self-end font-mono text-[10px] text-ink-muted">
+ {phase >= PHASE.caption ? CAPTION.length : 0} / 2,200
+ </p>
+ </div>
+
+ <div className="relative mt-3">
+ <AnimatePresence>
+ {dateOpen && (
+ <motion.ul
+ className="absolute right-0 bottom-full left-0 z-20 mb-2 flex flex-col gap-0.5 rounded-md border border-line bg-surface-raised p-1.5 shadow-lg"
+ initial={{ opacity: 0, y: 10, scale: 0.95 }}
+ animate={{ opacity: 1, y: 0, scale: 1, transition: { duration: 0.36, ease: ENTER } }}
+ exit={{ opacity: 0, y: 6, scale: 0.97, transition: { duration: 0.2, ease: LEAVE } }}
+ style={{ transformOrigin: 'bottom center' }}
+ >
+ {SLOTS.map((slot, i) => (
+ <li
+ key={slot}
+ data-cursor={i === PICKED ? 'slot' : undefined}
+ className={cn(
+ 'flex items-center justify-between rounded-sm px-2.5 py-2 text-[13px] transition-colors duration-200',
+ i === PICKED && phase === PHASE.atSlot ? 'bg-surface-sunken text-ink' : 'text-ink-muted',
+ )}
+ >
+ {slot}
+ {i === PICKED && <CalendarMark className="size-3.5" />}
+ </li>
+ ))}
+ </motion.ul>
+ )}
+ </AnimatePresence>
+ <div
+ data-cursor="date"
+ className={cn(
+ 'flex items-center gap-2 rounded-md border p-3 text-[13px] transition-colors duration-300',
+ dateOpen ? 'border-ink-muted/60' : 'border-line',
+ )}
+ >
+ <CalendarMark className="size-4 text-ink-muted" />
+ <AnimatePresence mode="wait" initial={false}>
+ <motion.span
+ key={datePicked ? 'picked' : 'empty'}
+ className={datePicked ? 'text-ink' : 'text-ink-muted'}
+ {...SWAP}
+ >
+ {datePicked ? SLOTS[PICKED] : 'Pick a date and time'}
+ </motion.span>
+ </AnimatePresence>
+ </div>
+ </div>
+
+ <div className="mt-4 flex items-center justify-between gap-3">
+ <div className="flex min-w-0 flex-col gap-1">
+ <StatusBadge status={status} />
+ </div>
+ <div className="flex items-center gap-2">
+ <span className="hidden rounded-full px-3 py-2 text-xs font-semibold text-ink-muted sm:inline">
+ Publish now
+ </span>
+ <motion.span
+ data-cursor="schedule"
+ className={cn(
+ 'rounded-full px-4 py-2 text-xs font-semibold transition-colors duration-300',
+ ready ? 'bg-accent text-on-accent' : 'bg-surface-sunken text-ink-muted',
+ )}
+ animate={{ scale: phase === PHASE.schedule ? [1, 0.95, 1] : 1 }}
+ transition={{ duration: 0.26 }}
+ >
+ Schedule post
+ </motion.span>
+ </div>
+ </div>
+ <AnimatePresence mode="wait" initial={false}>
+ <motion.p
+ key={status}
+ className="mt-2 h-4 font-mono text-[10px] text-ink-muted"
+ initial={{ opacity: 0 }}
+ animate={{ opacity: 1 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.2 }}
+ >
+ {status === 'Pending' && 'Publishes Thursday at 18:00, browser open or not'}
+ {status === 'Publishing' && 'Thursday, 18:00: publishing now'}
+ {status === 'Published' && 'Published by the server at 18:04'}
+ </motion.p>
+ </AnimatePresence>
+
+ <AnimatePresence>
+ {toast && (
+ <motion.div
+ className="absolute inset-x-5 top-5 z-20 flex items-center gap-2.5 rounded-md border border-line bg-surface-raised px-3.5 py-3 shadow-lg"
+ initial={{ opacity: 0, y: -12, scale: 0.97 }}
+ animate={{ opacity: 1, y: 0, scale: 1, transition: { duration: 0.36, ease: ENTER } }}
+ exit={{ opacity: 0, y: -8, transition: { duration: 0.2, ease: LEAVE } }}
+ >
+ <CheckCircle className="size-5 shrink-0 text-success" />
+ <p className="text-[13px] font-semibold text-ink">Post scheduled</p>
+ <p className="ml-auto font-mono text-[11px] text-ink-muted">Thursday, 18:00</p>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </PanelCard>
+ <Cursor stage={ref} target={target} clicks={clicks} />
+ </div>
+ );
+}
diff --git a/site/src/components/mockups/Typed.tsx b/site/src/components/mockups/Typed.tsx
new file mode 100644
index 0000000..e44c03e
--- /dev/null
+++ b/site/src/components/mockups/Typed.tsx
@@ -0,0 +1,42 @@
+import { useEffect, useState } from 'react';
+import type { ReactNode } from 'react';
+import { useReducedMotion } from 'motion/react';
+
+export interface TypedProps {
+ text: string;
+ // starts typing; give the component a new key to type from the start again
+ active: boolean;
+ // characters a second, about the pace measured on the Activepieces prompt
+ speed?: number;
+ caret?: boolean;
+ // draws the typed part, for text with highlighted words
+ render?: (typed: string) => ReactNode;
+}
+
+// text typed out a few characters at a time, with a blinking caret while it types
+export function Typed({ text, active, speed = 18, caret = true, render }: TypedProps) {
+ const reduce = useReducedMotion();
+ const [count, setCount] = useState(0);
+
+ useEffect(() => {
+ if (!active || reduce) return;
+ const timer = window.setInterval(() => {
+ setCount(current => {
+ if (current >= text.length) window.clearInterval(timer);
+ return Math.min(text.length, current + 2);
+ });
+ }, 2000 / speed);
+ return () => window.clearInterval(timer);
+ }, [active, reduce, text, speed]);
+
+ const shown = reduce ? text.length : count;
+ const typing = active && !reduce && shown < text.length;
+ return (
+ <>
+ {render ? render(text.slice(0, shown)) : text.slice(0, shown)}
+ {caret && typing && (
+ <span className="caret ml-px inline-block h-[1.05em] w-[1.5px] translate-y-[0.15em] bg-ink" />
+ )}
+ </>
+ );
+}
diff --git a/site/src/components/mockups/bento/BackupSchedulerMock.tsx b/site/src/components/mockups/bento/BackupSchedulerMock.tsx
new file mode 100644
index 0000000..944c507
--- /dev/null
+++ b/site/src/components/mockups/bento/BackupSchedulerMock.tsx
@@ -0,0 +1,68 @@
+import { useRef } from 'react';
+import { AnimatePresence, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { CheckCircle, RefreshCircle } from '@/components/icons';
+import { GitHubIcon } from '@/components/marks';
+import { Frame } from './Frame';
+
+// a run starts, works for a moment, passes; the next starts fifteen minutes later in the picture's time
+const STEPS = [1.4, 1.8];
+const SHOWN = 7;
+const FIRST = 18 * 60;
+const FIRST_RUN = 406;
+const ENTER = [0.16, 1, 0.3, 1] as const;
+
+function clock(run: number): string {
+ const minutes = (FIRST + run * 15) % (24 * 60);
+ return `${String(Math.floor(minutes / 60)).padStart(2, '0')}:${String(minutes % 60).padStart(2, '0')}`;
+}
+
+// the GitHub Actions backup for scheduled posts: a run every 15 minutes, the newest working, the rest passed
+export function BackupSchedulerMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop, reduce } = useAutoplay(ref, STEPS);
+ const newest = reduce ? SHOWN : loop + SHOWN;
+ const working = !reduce && phase === 0;
+ const runs = Array.from({ length: SHOWN }, (_, i) => newest - i);
+
+ return (
+ <Frame
+ ref={ref}
+ label="GitHub Actions runs of the Instagram Scheduled Publisher workflow, one every 15 minutes, each passing."
+ icon={<GitHubIcon className="size-5 text-ink" />}
+ title="Instagram Scheduled Publisher"
+ meta={<span className="font-mono text-[10px] text-ink-muted">every 15 min</span>}
+ >
+ <ul className="flex flex-col">
+ <AnimatePresence initial={false}>
+ {runs.map((run, i) => {
+ const active = i === 0 && working;
+ return (
+ <motion.li
+ key={run}
+ layout
+ initial={{ opacity: 0, y: -12 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.45, ease: ENTER }}
+ className="flex items-center gap-3 border-b border-line px-5 py-3 text-xs"
+ >
+ <span className={cn('flex', active ? 'text-afterglow-text' : 'text-success')}>
+ {active ? <RefreshCircle className="size-4 animate-spin" /> : <CheckCircle className="size-4" />}
+ </span>
+ <div className="min-w-0 flex-1">
+ <p className="text-ink">Scheduled run</p>
+ <p className="font-mono text-[10px] text-ink-muted">
+ #{FIRST_RUN + run} {active ? 'in progress' : 'publish-scheduled.yml'}
+ </p>
+ </div>
+ <span className="font-mono text-ink-muted">{clock(run)}</span>
+ </motion.li>
+ );
+ })}
+ </AnimatePresence>
+ </ul>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/DatabaseMock.tsx b/site/src/components/mockups/bento/DatabaseMock.tsx
new file mode 100644
index 0000000..98f6d88
--- /dev/null
+++ b/site/src/components/mockups/bento/DatabaseMock.tsx
@@ -0,0 +1,95 @@
+import { useRef } from 'react';
+import { AnimatePresence, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { Database, LockKeyhole } from '@/components/icons';
+import { PlatformMark } from '../kit';
+import type { Platform } from '../platforms';
+import { Frame } from './Frame';
+
+interface Row {
+ platform: Platform;
+ name: string;
+ member: string;
+ updated: string;
+}
+
+const ROWS: Row[] = [
+ { platform: 'youtube', name: 'Northwind Kitchen', member: 'Asha', updated: '2 min ago' },
+ { platform: 'instagram', name: '@northwind.kitchen', member: 'Asha', updated: '2 min ago' },
+ { platform: 'reddit', name: 'u/northwind_cooks', member: 'Ben', updated: '9 min ago' },
+ { platform: 'youtube', name: 'Ben Bakes', member: 'Ben', updated: '14 min ago' },
+ { platform: 'instagram', name: '@chloe.plates', member: 'Chloe', updated: '1 h ago' },
+ { platform: 'reddit', name: 'u/chloe_cooks', member: 'Chloe', updated: '1 h ago' },
+];
+const ADDED: Row = { platform: 'youtube', name: 'Northwind Shorts', member: 'Asha', updated: 'just now' };
+
+const STEPS = [2.4, 4];
+const ENTER = [0.16, 1, 0.3, 1] as const;
+
+const MEMBER_TINT: Record<string, string> = {
+ Asha: 'bg-accent-soft text-accent-text',
+ Ben: 'bg-afterglow-soft text-afterglow-text',
+ Chloe: 'bg-info-soft text-info',
+};
+
+// the accounts table in the owner's own Supabase project: every row belongs to one member, and a new account
+// lands at the top as someone connects it
+export function DatabaseMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop } = useAutoplay(ref, STEPS);
+ const rows = phase >= 1 ? [ADDED, ...ROWS] : ROWS;
+
+ return (
+ <Frame
+ ref={ref}
+ label="The accounts table in your own Supabase project, with row level security on: each account belongs to one member, and a newly connected channel appears at the top."
+ icon={<Database className="size-5" />}
+ title="accounts"
+ meta={
+ <span className="flex items-center gap-1 rounded-full bg-success-soft px-2 py-0.5 text-[11px] font-semibold text-success">
+ <LockKeyhole className="size-3.5" />
+ RLS on
+ </span>
+ }
+ >
+ <div className="grid grid-cols-[1fr_4.5rem] gap-3 border-b border-line bg-surface-sunken/50 sm:grid-cols-[1fr_4.5rem_4.5rem] px-5 py-2 font-mono text-[10px] text-ink-muted">
+ <span>name</span>
+ <span>member</span>
+ <span className="hidden text-right sm:block">updated</span>
+ </div>
+ <ul className="flex flex-col">
+ <AnimatePresence initial={false}>
+ {rows.map(row => {
+ const fresh = row === ADDED;
+ return (
+ <motion.li
+ key={`${row.name}-${fresh ? loop : 'base'}`}
+ layout
+ initial={{ opacity: 0, y: -12 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.45, ease: ENTER }}
+ className={cn(
+ 'grid grid-cols-[1fr_4.5rem] items-center gap-3 sm:grid-cols-[1fr_4.5rem_4.5rem] border-b border-line px-5 py-3 transition-colors duration-1000',
+ fresh && phase >= 1 ? 'bg-accent-soft/50' : 'bg-transparent',
+ )}
+ >
+ <span className="flex min-w-0 items-center gap-2.5">
+ <PlatformMark platform={row.platform} className="size-4 shrink-0" />
+ <span className="truncate font-mono text-xs text-ink">{row.name}</span>
+ </span>
+ <span
+ className={cn('w-fit rounded-full px-2 py-0.5 text-[10px] font-semibold', MEMBER_TINT[row.member])}
+ >
+ {row.member}
+ </span>
+ <span className="hidden text-right font-mono text-[10px] text-ink-muted sm:block">{row.updated}</span>
+ </motion.li>
+ );
+ })}
+ </AnimatePresence>
+ </ul>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/EdgeMock.tsx b/site/src/components/mockups/bento/EdgeMock.tsx
new file mode 100644
index 0000000..38bb70e
--- /dev/null
+++ b/site/src/components/mockups/bento/EdgeMock.tsx
@@ -0,0 +1,77 @@
+import { useRef } from 'react';
+import { AnimatePresence, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { Server } from '@/components/icons';
+import { Frame } from './Frame';
+
+// real routes of the Worker, each with a status it answers and a sample time
+const LOG: [string, string, number, number][] = [
+ ['GET', '/api/overview', 200, 38],
+ ['GET', '/api/accounts', 200, 21],
+ ['POST', '/api/accounts/:id/refresh', 200, 412],
+ ['GET', '/api/comparison', 200, 44],
+ ['GET', '/api/scheduled-posts', 200, 19],
+ ['POST', '/api/tracked-content', 201, 286],
+ ['GET', '/api/videos/all', 200, 57],
+ ['GET', '/api/health', 200, 4],
+ ['GET', '/api/accounts/:id/analytics', 200, 96],
+ ['POST', '/api/scheduled-posts', 201, 33],
+ ['GET', '/api/tracked-content', 200, 24],
+ ['GET', '/api/accounts/:id/ig-analytics', 200, 132],
+];
+const SHOWN = 11;
+// one new request about every second, one step per log line
+const STEPS = Array.from({ length: LOG.length }, () => 1.1);
+const ENTER = [0.16, 1, 0.3, 1] as const;
+
+// one Cloudflare Worker serving the app: its request log streaming in, newest first
+export function EdgeMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop, reduce } = useAutoplay(ref, STEPS);
+ const newest = reduce ? SHOWN - 1 : loop * LOG.length + phase + SHOWN - 1;
+ const lines = Array.from({ length: SHOWN }, (_, i) => newest - i);
+
+ return (
+ <Frame
+ ref={ref}
+ label="One Cloudflare Worker serving the app, healthy, with its request log streaming in: overview, accounts, analytics, scheduled posts and tracked content."
+ icon={<Server className="size-5" />}
+ title="Cloudflare Worker"
+ meta={
+ <span className="flex items-center gap-1.5 rounded-full bg-success-soft px-2 py-0.5 text-[11px] font-semibold text-success">
+ <span className="relative flex size-1.5">
+ <span className="absolute inset-0 animate-ping rounded-full bg-success opacity-60 motion-reduce:hidden" />
+ <span className="relative size-1.5 rounded-full bg-success" />
+ </span>
+ Healthy
+ </span>
+ }
+ bodyClassName="bg-surface-sunken/60"
+ >
+ <ul className="flex flex-col px-5 py-2 font-mono text-[11px] leading-none">
+ <AnimatePresence initial={false}>
+ {lines.map((n, i) => {
+ const [method, path, status, ms] = LOG[n % LOG.length];
+ return (
+ <motion.li
+ key={n}
+ layout
+ initial={{ opacity: 0, y: -10 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.4, ease: ENTER }}
+ className={cn('flex items-center gap-3 py-[0.55rem]', i === 0 ? 'text-ink' : 'text-ink-muted')}
+ >
+ <span className="w-7 text-success">{status}</span>
+ <span className={cn('w-8', method === 'POST' ? 'text-afterglow-text' : 'text-info')}>{method}</span>
+ <span className="min-w-0 flex-1 truncate">{path}</span>
+ <span className="tabular-nums">{ms}ms</span>
+ </motion.li>
+ );
+ })}
+ </AnimatePresence>
+ </ul>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/Frame.tsx b/site/src/components/mockups/bento/Frame.tsx
new file mode 100644
index 0000000..d9fd20f
--- /dev/null
+++ b/site/src/components/mockups/bento/Frame.tsx
@@ -0,0 +1,38 @@
+import type { ReactNode, Ref } from 'react';
+import { cn } from '@/lib/cn';
+
+export interface FrameProps {
+ // the whole picture's description; the card reads as one image
+ label: string;
+ ref?: Ref<HTMLDivElement>;
+ icon: ReactNode;
+ title: ReactNode;
+ meta?: ReactNode;
+ bodyClassName?: string;
+ // drawn over the whole frame, such as a cursor measuring its targets against the frame
+ overlay?: ReactNode;
+ children: ReactNode;
+}
+
+// a small app window for a bento card: a title bar, then content that fills the panel and runs off its lower edge
+export function Frame({ label, ref, icon, title, meta, bodyClassName, overlay, children }: FrameProps) {
+ return (
+ <div
+ ref={ref}
+ role="img"
+ aria-label={label}
+ className="relative mx-auto flex min-h-[21rem] w-full max-w-[27rem] flex-1 flex-col overflow-hidden rounded-t-lg border border-b-0 border-line bg-surface-raised shadow-window"
+ >
+ <div className="flex items-center gap-2.5 border-b border-line px-5 py-3.5">
+ <span className="flex shrink-0 text-ink-muted">{icon}</span>
+ <p className="min-w-0 flex-1 truncate text-sm font-semibold text-ink">{title}</p>
+ {meta}
+ </div>
+ {/* laid out on its own so a long list fills the frame and is cut off by it, without making the row taller */}
+ <div className="relative min-h-0 flex-1">
+ <div className={cn('absolute inset-0', bodyClassName)}>{children}</div>
+ </div>
+ {overlay}
+ </div>
+ );
+}
diff --git a/site/src/components/mockups/bento/FreePlansMock.tsx b/site/src/components/mockups/bento/FreePlansMock.tsx
new file mode 100644
index 0000000..e2cbe49
--- /dev/null
+++ b/site/src/components/mockups/bento/FreePlansMock.tsx
@@ -0,0 +1,71 @@
+import { useRef } from 'react';
+import { motion } from 'motion/react';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { Cloud, Database, Gallery, ServerSquare, Widget } from '@/components/icons';
+import type { Icon } from '@/components/icons';
+import { Frame } from './Frame';
+
+interface Service {
+ name: string;
+ use: string;
+ icon: Icon;
+ // a sample share of the free plan in use, for the meter only
+ used: number;
+}
+
+// what each service does for Twiligent, as the self-hosting guide sets them up
+const SERVICES: Service[] = [
+ { name: 'Supabase', use: 'Database and sign-in', icon: Database, used: 18 },
+ { name: 'Cloudflare', use: 'The Worker and the website', icon: Cloud, used: 9 },
+ { name: 'Cloudinary', use: 'Photos and videos to publish', icon: Gallery, used: 24 },
+ { name: 'Upstash Redis', use: 'Cache, optional', icon: ServerSquare, used: 6 },
+];
+
+const STEPS = [0.5, 6];
+const EASE = [0.22, 1, 0.36, 1] as const;
+
+// the services an instance runs on, each on its free plan, with a meter of how little of it is used
+export function FreePlansMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop } = useAutoplay(ref, STEPS);
+ return (
+ <Frame
+ ref={ref}
+ label="Supabase, Cloudflare, Cloudinary and Upstash Redis, each on its free plan, with most of each plan unused."
+ icon={<Widget className="size-5" />}
+ title="Services"
+ meta={<span className="font-mono text-[11px] text-ink-muted">4 free plans</span>}
+ >
+ <ul className="flex flex-col gap-2.5 p-4">
+ {SERVICES.map((service, i) => {
+ const Glyph = service.icon;
+ return (
+ <li key={service.name} className="rounded-md border border-line px-3.5 py-3">
+ <div className="flex items-center gap-3">
+ <span className="grid size-8 shrink-0 place-items-center rounded-md bg-surface-sunken text-ink-muted">
+ <Glyph className="size-4" />
+ </span>
+ <div className="min-w-0 flex-1">
+ <p className="text-[13px] font-semibold text-ink">{service.name}</p>
+ <p className="truncate text-[11px] text-ink-muted">{service.use}</p>
+ </div>
+ <span className="rounded-full bg-success-soft px-2.5 py-0.5 text-[10px] font-semibold text-success">
+ Free plan
+ </span>
+ </div>
+ <span className="mt-2.5 block h-1 overflow-hidden rounded-full bg-surface-sunken">
+ <motion.span
+ key={loop}
+ className="block h-full rounded-full bg-success"
+ initial={{ width: '0%' }}
+ animate={{ width: phase >= 1 ? `${service.used}%` : '0%' }}
+ transition={{ duration: 1.1, ease: EASE, delay: i * 0.12 }}
+ />
+ </span>
+ </li>
+ );
+ })}
+ </ul>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/LeaderboardMock.tsx b/site/src/components/mockups/bento/LeaderboardMock.tsx
new file mode 100644
index 0000000..ef73eda
--- /dev/null
+++ b/site/src/components/mockups/bento/LeaderboardMock.tsx
@@ -0,0 +1,72 @@
+import { useRef } from 'react';
+import { motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { Chart } from '@/components/icons';
+import { PlatformMark } from '../kit';
+import { platformLabel } from '../platforms';
+import { CountUp } from '../CountUp';
+import { ACCOUNTS } from '../sample';
+import { Frame } from './Frame';
+
+const GAINED = ['+1,063', '+322', '+415', '+96'];
+const STEPS = [0.4, 7];
+const EASE = [0.22, 1, 0.36, 1] as const;
+
+// the Overview leaderboard: every account ranked by audience, its count ticking up and its bar growing
+export function LeaderboardMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop } = useAutoplay(ref, STEPS);
+ const top = ACCOUNTS[0].audience;
+ const play = phase >= 1;
+
+ return (
+ <Frame
+ ref={ref}
+ label="The Overview leaderboard ranking four accounts across YouTube, Instagram and Reddit by audience, with each one's gain this week."
+ icon={<Chart className="size-5" />}
+ title="Top accounts"
+ meta={
+ <span className="rounded-full bg-surface-sunken px-2.5 py-1 text-[11px] font-medium text-ink-muted">
+ Audience
+ </span>
+ }
+ >
+ <ul className="flex flex-col">
+ {ACCOUNTS.map((account, i) => (
+ <li key={account.name} className="border-b border-line px-5 py-3.5">
+ <div className="flex items-center gap-3">
+ <span className="w-3 font-mono text-[11px] text-ink-muted">{i + 1}</span>
+ <span className="grid size-8 shrink-0 place-items-center rounded-full bg-surface-sunken">
+ <PlatformMark platform={account.platform} className="size-4" />
+ </span>
+ <div className="min-w-0 flex-1">
+ <p className="truncate text-[13px] font-medium text-ink">{account.name}</p>
+ <p className="text-[10px] text-ink-muted">{platformLabel(account.platform)}</p>
+ </div>
+ <div className="text-right">
+ <CountUp
+ key={loop}
+ value={account.audience}
+ active={play}
+ from={Math.round(account.audience * 0.96)}
+ className="block font-mono text-xs text-ink"
+ />
+ <p className="font-mono text-[10px] text-success">{GAINED[i]}</p>
+ </div>
+ </div>
+ <span className="mt-2.5 ml-6 block h-1 overflow-hidden rounded-full bg-surface-sunken">
+ <motion.span
+ key={loop}
+ className={cn('block h-full rounded-full', i === 0 ? 'bg-accent' : 'bg-line-strong')}
+ initial={{ width: '0%' }}
+ animate={{ width: play ? `${(account.audience / top) * 100}%` : '0%' }}
+ transition={{ duration: 1.1, ease: EASE, delay: 0.1 + i * 0.12 }}
+ />
+ </span>
+ </li>
+ ))}
+ </ul>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/LibraryMock.tsx b/site/src/components/mockups/bento/LibraryMock.tsx
new file mode 100644
index 0000000..cb8c94c
--- /dev/null
+++ b/site/src/components/mockups/bento/LibraryMock.tsx
@@ -0,0 +1,111 @@
+import { useRef } from 'react';
+import { AnimatePresence, LayoutGroup, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { Library, Magnifer, Videocamera } from '@/components/icons';
+import { Cursor } from '../Cursor';
+import { Frame } from './Frame';
+
+type Kind = 'Videos' | 'Shorts' | 'Reels';
+
+interface Item {
+ title: string;
+ kind: Kind;
+ length: string;
+ views: string;
+}
+
+const ITEMS: Item[] = [
+ { title: 'Lemon orzo, start to finish', kind: 'Videos', length: '12:48', views: '41K' },
+ { title: 'Knife skills in 60 seconds', kind: 'Shorts', length: '0:58', views: '64K' },
+ { title: 'Pantry tour', kind: 'Reels', length: '0:35', views: '22K' },
+ { title: 'Crispy rice, one pan', kind: 'Shorts', length: '0:41', views: '38K' },
+ { title: 'Bread every day, 30 days', kind: 'Videos', length: '18:20', views: '118K' },
+ { title: 'Cast iron care', kind: 'Shorts', length: '0:52', views: '29K' },
+ { title: 'Orzo plating', kind: 'Shorts', length: '0:33', views: '17K' },
+ { title: 'Sunday batch cook', kind: 'Videos', length: '24:05', views: '33K' },
+ { title: 'Lemon, three ways', kind: 'Reels', length: '0:29', views: '19K' },
+];
+
+const CHIPS = ['All', 'Videos', 'Shorts', 'Reels'] as const;
+const STEPS = [1.8, 0.8, 0.4, 3.4];
+const PHASE = { atChip: 1, click: 2 } as const;
+const EASE = [0.22, 1, 0.36, 1] as const;
+
+const THUMB: Record<Kind, string> = {
+ Videos: 'bg-fold',
+ Shorts: 'bg-linear-to-b from-afterglow/80 to-ember/80',
+ Reels: 'bg-dusk-panel',
+};
+
+// the video library: every video, Short and Reel in one grid, filtered to Shorts with one click
+export function LibraryMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop, reduce } = useAutoplay(ref, STEPS);
+ const filtered = phase >= PHASE.click;
+ const items = filtered ? ITEMS.filter(item => item.kind === 'Shorts') : ITEMS;
+ const target = !reduce && (phase === PHASE.atChip || phase === PHASE.click) ? 'chip-shorts' : null;
+ const clicks = loop + (phase >= PHASE.click ? 1 : 0);
+
+ return (
+ <Frame
+ ref={ref}
+ label="The library of every video, Short and Reel across the channels, filtered to Shorts with one click."
+ icon={<Library className="size-5" />}
+ title="Library"
+ meta={
+ <span className="flex items-center gap-1.5 rounded-full bg-surface-sunken px-2.5 py-1 text-[11px] text-ink-muted">
+ <Magnifer className="size-3.5" />
+ Search
+ </span>
+ }
+ bodyClassName="px-4 pt-3.5"
+ overlay={<Cursor stage={ref} target={target} clicks={clicks} />}
+ >
+ <LayoutGroup id="library-mock">
+ <div className="flex gap-1.5">
+ {CHIPS.map(chip => {
+ const active = filtered ? chip === 'Shorts' : chip === 'All';
+ return (
+ <span
+ key={chip}
+ data-cursor={chip === 'Shorts' ? 'chip-shorts' : undefined}
+ className={cn(
+ 'rounded-full px-3 py-1 text-[11px] font-medium transition-colors duration-300',
+ active ? 'bg-accent-soft text-accent-text' : 'bg-surface-sunken text-ink-muted',
+ )}
+ >
+ {chip}
+ </span>
+ );
+ })}
+ <span className="ml-auto font-mono text-[10px] leading-6 text-ink-muted">{items.length} items</span>
+ </div>
+ <motion.ul layout className="relative mt-3 grid grid-cols-3 gap-2.5">
+ <AnimatePresence mode="popLayout" initial={false}>
+ {items.map(item => (
+ <motion.li
+ key={item.title}
+ layout
+ initial={{ opacity: 0, scale: 0.9 }}
+ animate={{ opacity: 1, scale: 1 }}
+ exit={{ opacity: 0, scale: 0.9 }}
+ transition={{ duration: 0.4, ease: EASE }}
+ className="flex flex-col gap-1"
+ >
+ <span className={cn('relative grid aspect-[4/5] place-items-center rounded-md', THUMB[item.kind])}>
+ <Videocamera className="size-4 text-on-accent/80" />
+ <span className="absolute bottom-1.5 left-1.5 rounded-sm bg-dusk/70 px-1 font-mono text-[9px] text-paper">
+ {item.length}
+ </span>
+ </span>
+ <span className="truncate text-[11px] text-ink">{item.title}</span>
+ <span className="font-mono text-[10px] text-ink-muted">{item.views} views</span>
+ </motion.li>
+ ))}
+ </AnimatePresence>
+ </motion.ul>
+ </LayoutGroup>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/MembersMock.tsx b/site/src/components/mockups/bento/MembersMock.tsx
new file mode 100644
index 0000000..2735c79
--- /dev/null
+++ b/site/src/components/mockups/bento/MembersMock.tsx
@@ -0,0 +1,101 @@
+import { useRef } from 'react';
+import { motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { Key, LockKeyhole, UsersGroup } from '@/components/icons';
+import { PlatformMark } from '../kit';
+import type { Platform } from '../platforms';
+import { Frame } from './Frame';
+
+interface Person {
+ name: string;
+ email: string;
+ role: 'Administrator' | 'Member';
+ accounts: Platform[];
+}
+
+const PEOPLE: Person[] = [
+ {
+ name: 'Asha',
+ email: '[email protected]',
+ role: 'Administrator',
+ accounts: ['youtube', 'instagram', 'youtube', 'reddit'],
+ },
+ { name: 'Ben', email: '[email protected]', role: 'Member', accounts: ['youtube', 'reddit'] },
+ { name: 'Chloe', email: '[email protected]', role: 'Member', accounts: ['instagram', 'reddit'] },
+];
+
+const STEPS = [0.3, 7];
+const EASE = [0.22, 1, 0.36, 1] as const;
+
+// who is on an instance: one administrator who runs it, members who sign in and connect their own accounts,
+// and the keys everyone shares
+export function MembersMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop } = useAutoplay(ref, STEPS);
+ const shown = phase >= 1;
+
+ return (
+ <Frame
+ ref={ref}
+ label="One administrator and two members on the same instance, each with their own connected accounts, sharing the keys the administrator set up."
+ icon={<UsersGroup className="size-5" />}
+ title="People"
+ meta={<span className="font-mono text-[11px] text-ink-muted">{PEOPLE.length} on this instance</span>}
+ >
+ <ul key={loop} className="flex flex-col">
+ {PEOPLE.map((person, i) => (
+ <motion.li
+ key={person.name}
+ className="flex items-center gap-3 border-b border-line px-5 py-3"
+ initial={{ opacity: 0, x: -10 }}
+ animate={shown ? { opacity: 1, x: 0 } : { opacity: 0, x: -10 }}
+ transition={{ duration: 0.45, ease: EASE, delay: i * 0.12 }}
+ >
+ <span className="grid size-9 shrink-0 place-items-center rounded-full bg-accent-soft text-xs font-semibold text-accent-text">
+ {person.name[0]}
+ </span>
+ <div className="min-w-0 flex-1">
+ <p className="text-[13px] font-medium text-ink">{person.name}</p>
+ <p className="truncate font-mono text-[10px] text-ink-muted">{person.email}</p>
+ </div>
+ <div className="flex flex-col items-end gap-1.5">
+ <span
+ className={cn(
+ 'rounded-full px-2.5 py-0.5 text-[10px] font-semibold',
+ person.role === 'Administrator'
+ ? 'bg-afterglow-soft text-afterglow-text'
+ : 'bg-surface-sunken text-ink-muted',
+ )}
+ >
+ {person.role}
+ </span>
+ <span className="flex gap-1">
+ {person.accounts.map((platform, j) => (
+ <PlatformMark key={j} platform={platform} className="size-3" />
+ ))}
+ </span>
+ </div>
+ </motion.li>
+ ))}
+ </ul>
+ <motion.div
+ key={`shared-${loop}`}
+ className="mx-4 mt-3 rounded-md border border-dashed border-line-strong p-3"
+ initial={{ opacity: 0, y: 8 }}
+ animate={shown ? { opacity: 1, y: 0 } : { opacity: 0, y: 8 }}
+ transition={{ duration: 0.5, ease: EASE, delay: 0.5 }}
+ >
+ <p className="flex items-center gap-1.5 text-[11px] font-semibold text-ink">
+ <Key className="size-3.5 text-afterglow-text" />
+ Shared, set up by the administrator
+ </p>
+ <p className="mt-1 text-[11px] text-ink-muted">YouTube API key, Instagram app, Cloudinary</p>
+ <p className="mt-2 flex items-center gap-1.5 text-[11px] font-semibold text-ink">
+ <LockKeyhole className="size-3.5 text-success" />
+ Each person's accounts stay their own
+ </p>
+ </motion.div>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/SignInMock.tsx b/site/src/components/mockups/bento/SignInMock.tsx
new file mode 100644
index 0000000..1e1c2bd
--- /dev/null
+++ b/site/src/components/mockups/bento/SignInMock.tsx
@@ -0,0 +1,130 @@
+import { useRef } from 'react';
+import { AnimatePresence, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { CheckCircle, Login } from '@/components/icons';
+import { Mark } from '@/components/brand';
+import { Cursor } from '../Cursor';
+import { Typed } from '../Typed';
+import { Frame } from './Frame';
+
+const STEPS = [0.6, 0.7, 1.7, 0.7, 0.5, 1.9, 2.6];
+const PHASE = { atEmail: 1, email: 2, atSend: 3, send: 4, code: 5, done: 6 } as const;
+const CODE = ['4', '8', '1', '9', '2', '7'];
+const EMAIL = '[email protected]';
+const ENTER = [0.16, 1, 0.3, 1] as const;
+const SWAP = {
+ initial: { opacity: 0, y: 6 },
+ animate: { opacity: 1, y: 0 },
+ exit: { opacity: 0, y: -6 },
+ transition: { duration: 0.28, ease: ENTER },
+};
+
+// signing in with an email: the address typed, Send code clicked, the six digits arriving, then signed in
+export function SignInMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop, reduce } = useAutoplay(ref, STEPS);
+ const codeView = phase >= PHASE.send;
+ const target = reduce
+ ? null
+ : phase === PHASE.atEmail || phase === PHASE.email
+ ? 'email'
+ : phase === PHASE.atSend || phase === PHASE.send
+ ? 'send'
+ : null;
+ const clicks = loop * 2 + (phase >= PHASE.email ? 1 : 0) + (phase >= PHASE.send ? 1 : 0);
+
+ return (
+ <Frame
+ ref={ref}
+ label="Signing in to Twiligent: continue with Google, or type an email, get a 6-digit code and enter it."
+ icon={<Login className="size-5" />}
+ title="Sign in"
+ meta={<span className="font-mono text-[11px] text-ink-muted">app.twiligent.ujjwal.fyi</span>}
+ bodyClassName="flex flex-col items-center px-6 pt-5"
+ overlay={<Cursor stage={ref} target={target} clicks={clicks} />}
+ >
+ <Mark className="h-8" />
+ <p className="mt-3 font-display text-base font-semibold text-ink">Sign in to Twiligent</p>
+ <div className="relative mt-4 w-full max-w-[18rem] flex-1">
+ <AnimatePresence mode="wait" initial={false}>
+ {codeView ? (
+ <motion.div key={`code-${loop}`} className="flex flex-col items-center" {...SWAP}>
+ <p className="text-center text-[11px] text-ink-muted">
+ Enter the code sent to <span className="text-ink">{EMAIL}</span>
+ </p>
+ <div className="mt-3 flex w-full justify-between gap-1.5">
+ {CODE.map((digit, i) => {
+ const filled = phase >= PHASE.done || (phase === PHASE.code && !reduce);
+ return (
+ <span
+ key={i}
+ className={cn(
+ 'grid h-11 flex-1 place-items-center rounded-md border font-mono text-base text-ink',
+ phase >= PHASE.done ? 'border-success/60' : 'border-line',
+ )}
+ >
+ {filled && (
+ <motion.span
+ initial={{ opacity: 0, scale: 0.6 }}
+ animate={{ opacity: 1, scale: 1 }}
+ transition={{
+ duration: 0.24,
+ ease: ENTER,
+ delay: phase === PHASE.code ? 0.15 + i * 0.22 : 0,
+ }}
+ >
+ {digit}
+ </motion.span>
+ )}
+ </span>
+ );
+ })}
+ </div>
+ <AnimatePresence>
+ {phase >= PHASE.done && (
+ <motion.p
+ className="mt-4 flex items-center gap-1.5 text-[13px] font-semibold text-success"
+ initial={{ opacity: 0, y: 6 }}
+ animate={{ opacity: 1, y: 0 }}
+ transition={{ duration: 0.3, ease: ENTER }}
+ >
+ <CheckCircle className="size-4" />
+ Signed in
+ </motion.p>
+ )}
+ </AnimatePresence>
+ </motion.div>
+ ) : (
+ <motion.div key={`email-${loop}`} className="flex flex-col" {...SWAP}>
+ <span className="flex h-10 items-center justify-center rounded-full border border-line text-[13px] font-medium text-ink">
+ Continue with Google
+ </span>
+ <p className="my-2.5 text-center text-[10px] font-semibold tracking-widest text-ink-muted uppercase">
+ or
+ </p>
+ <span
+ data-cursor="email"
+ className={cn(
+ 'flex h-10 items-center rounded-md border px-3 text-[13px] transition-colors duration-300',
+ phase >= PHASE.email ? 'border-ink-muted/60 text-ink' : 'border-line text-ink-muted',
+ )}
+ >
+ {phase >= PHASE.email ? <Typed key={loop} text={EMAIL} active speed={22} /> : 'Email'}
+ </span>
+ <span
+ data-cursor="send"
+ className={cn(
+ 'mt-2.5 flex h-10 items-center justify-center rounded-full text-[13px] font-semibold transition-colors duration-300',
+ phase >= PHASE.atSend ? 'bg-accent text-on-accent' : 'bg-surface-sunken text-ink-muted',
+ )}
+ >
+ Send code
+ </span>
+ </motion.div>
+ )}
+ </AnimatePresence>
+ </div>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/TokenMock.tsx b/site/src/components/mockups/bento/TokenMock.tsx
new file mode 100644
index 0000000..5cce7f6
--- /dev/null
+++ b/site/src/components/mockups/bento/TokenMock.tsx
@@ -0,0 +1,137 @@
+import { useRef } from 'react';
+import { AnimatePresence, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { CheckCircle, ClockCircle, RefreshCircle } from '@/components/icons';
+import { PlatformMark } from '../kit';
+import { Frame } from './Frame';
+
+// Instagram access lasts 60 days; every night at 00:00 the Worker renews any that has under 15 days left
+const LIFETIME = 60;
+const BEFORE = 14;
+const STEPS = [2.2, 1.1, 3.6];
+const PHASE = { renewing: 1, renewed: 2 } as const;
+const EASE = [0.22, 1, 0.36, 1] as const;
+const RADIUS = 34;
+const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
+
+const HISTORY = [
+ { when: 'Yesterday, 00:00', text: 'Checked: 15 days left' },
+ { when: '2 days ago, 00:00', text: 'Checked: 16 days left' },
+ { when: '3 days ago, 00:00', text: 'Checked: 17 days left' },
+];
+
+// an Instagram account's access running low, the nightly job renewing it, and the days filling back up
+export function TokenMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase } = useAutoplay(ref, STEPS);
+ const renewed = phase >= PHASE.renewed;
+ const days = renewed ? LIFETIME : BEFORE;
+
+ return (
+ <Frame
+ ref={ref}
+ label="An Instagram account's access with 14 days left, renewed by the nightly job at 00:00 to a full 60 days, with the earlier nightly checks listed below."
+ icon={<PlatformMark platform="instagram" className="size-5" />}
+ title="@northwind.kitchen"
+ meta={<span className="font-mono text-[11px] text-ink-muted">Instagram access</span>}
+ bodyClassName="flex flex-col gap-4 p-5"
+ >
+ <div className="flex items-center gap-5">
+ <div className="relative size-[5.5rem] shrink-0">
+ <svg viewBox="0 0 80 80" className="size-full -rotate-90" aria-hidden="true">
+ <circle cx="40" cy="40" r={RADIUS} className="fill-none stroke-surface-sunken" strokeWidth="7" />
+ <motion.circle
+ cx="40"
+ cy="40"
+ r={RADIUS}
+ className={cn(
+ 'fill-none transition-colors duration-500',
+ renewed ? 'stroke-success' : 'stroke-afterglow',
+ )}
+ strokeWidth="7"
+ strokeLinecap="round"
+ strokeDasharray={CIRCUMFERENCE}
+ initial={false}
+ animate={{ strokeDashoffset: CIRCUMFERENCE * (1 - days / LIFETIME) }}
+ transition={{ duration: renewed ? 1.2 : 0.4, ease: EASE }}
+ />
+ </svg>
+ <div className="absolute inset-0 grid place-items-center text-center">
+ <div>
+ <p className="font-display text-xl leading-none font-semibold text-ink tabular-nums">{days}</p>
+ <p className="mt-0.5 text-[10px] text-ink-muted">days left</p>
+ </div>
+ </div>
+ </div>
+ <div className="min-w-0 flex-1">
+ <AnimatePresence mode="wait" initial={false}>
+ <motion.div
+ key={phase}
+ initial={{ opacity: 0, y: 6 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -6 }}
+ transition={{ duration: 0.26, ease: EASE }}
+ >
+ {phase === 0 && (
+ <>
+ <p className="flex items-center gap-1.5 text-[13px] font-semibold text-afterglow-text">
+ <ClockCircle className="size-4" />
+ Renews tonight
+ </p>
+ <p className="mt-1 text-[11px] leading-4 text-ink-muted">
+ Under 15 days left, so the 00:00 run renews it.
+ </p>
+ </>
+ )}
+ {phase === PHASE.renewing && (
+ <>
+ <p className="flex items-center gap-1.5 text-[13px] font-semibold text-info">
+ <RefreshCircle className="size-4 animate-spin" />
+ Renewing
+ </p>
+ <p className="mt-1 font-mono text-[11px] text-ink-muted">00:00, nightly run</p>
+ </>
+ )}
+ {renewed && (
+ <>
+ <p className="flex items-center gap-1.5 text-[13px] font-semibold text-success">
+ <CheckCircle className="size-4" />
+ Access renewed
+ </p>
+ <p className="mt-1 text-[11px] leading-4 text-ink-muted">Tonight at 00:00, with nothing to do.</p>
+ </>
+ )}
+ </motion.div>
+ </AnimatePresence>
+ </div>
+ </div>
+ <ul className="flex flex-col rounded-md border border-line">
+ <AnimatePresence initial={false}>
+ {renewed && (
+ <motion.li
+ key="tonight"
+ className="flex items-center justify-between gap-3 overflow-hidden border-b border-line bg-success-soft/40 px-3.5 text-[11px]"
+ initial={{ height: 0, opacity: 0 }}
+ animate={{ height: 38, opacity: 1 }}
+ exit={{ height: 0, opacity: 0 }}
+ transition={{ duration: 0.4, ease: EASE }}
+ >
+ <span className="font-mono text-ink-muted">Tonight, 00:00</span>
+ <span className="font-semibold text-success">Renewed: 60 days</span>
+ </motion.li>
+ )}
+ </AnimatePresence>
+ {HISTORY.map(row => (
+ <li
+ key={row.when}
+ className="flex h-[38px] items-center justify-between gap-3 border-b border-line px-3.5 text-[11px] last:border-0"
+ >
+ <span className="font-mono text-ink-muted">{row.when}</span>
+ <span className="text-ink">{row.text}</span>
+ </li>
+ ))}
+ </ul>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/bento/TrackedMock.tsx b/site/src/components/mockups/bento/TrackedMock.tsx
new file mode 100644
index 0000000..d1fe2ba
--- /dev/null
+++ b/site/src/components/mockups/bento/TrackedMock.tsx
@@ -0,0 +1,136 @@
+import { useRef } from 'react';
+import { AnimatePresence, motion } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { useAutoplay } from '@/hooks/useAutoplay';
+import { Bookmark, RefreshCircle } from '@/components/icons';
+import { PlatformMark } from '../kit';
+import type { Platform } from '../platforms';
+import { CountUp } from '../CountUp';
+import { Cursor } from '../Cursor';
+import { Typed } from '../Typed';
+import { Frame } from './Frame';
+
+interface Tracked {
+ platform: Platform;
+ title: string;
+ stat: string;
+}
+
+const ITEMS: Tracked[] = [
+ { platform: 'reddit', title: 'One-pan lemon orzo, 20 minutes', stat: '2,400 upvotes' },
+ { platform: 'youtube', title: 'Bread every day for a month', stat: '118K views' },
+ { platform: 'youtube', title: 'Knife skills in 60 seconds', stat: '64K views' },
+ { platform: 'reddit', title: 'Weeknight dinners that reheat well', stat: '1,100 upvotes' },
+];
+const ADDED: Tracked = { platform: 'reddit', title: 'Cast iron care, the short version', stat: '870 upvotes' };
+const LINK = 'reddit.com/r/Cooking/comments/cast_iron';
+
+const STEPS = [0.8, 0.7, 2.1, 0.7, 1.2, 3.4];
+const PHASE = { atLink: 1, link: 2, atTrack: 3, track: 4, done: 5 } as const;
+const ENTER = [0.16, 1, 0.3, 1] as const;
+
+// tracking a post by its link: the link typed, Track clicked, the post fetched into the Recipes category,
+// and the category's combined numbers going up
+export function TrackedMock() {
+ const ref = useRef<HTMLDivElement>(null);
+ const { phase, loop, reduce } = useAutoplay(ref, STEPS);
+ const added = phase >= PHASE.track;
+ const done = phase >= PHASE.done;
+ const target = reduce
+ ? null
+ : phase === PHASE.atLink || phase === PHASE.link
+ ? 'link'
+ : phase === PHASE.atTrack || phase === PHASE.track
+ ? 'track'
+ : null;
+ const clicks = loop * 2 + (phase >= PHASE.link ? 1 : 0) + (phase >= PHASE.track ? 1 : 0);
+ const rows = added ? [ADDED, ...ITEMS] : ITEMS;
+
+ return (
+ <Frame
+ ref={ref}
+ label="Tracked content: a Reddit post link is pasted and tracked, the post joins the Recipes category, and the category's combined karma and comments go up."
+ icon={<Bookmark className="size-5" />}
+ title="Recipes"
+ meta={<span className="font-mono text-[11px] text-ink-muted">category</span>}
+ overlay={<Cursor stage={ref} target={target} clicks={clicks} />}
+ >
+ <div className="grid grid-cols-3 border-b border-line">
+ {[
+ { label: 'Views', value: 182_000, to: 182_000, style: 'compact' as const },
+ { label: 'Karma', value: 3_500, to: 4_370, style: 'number' as const },
+ { label: 'Comments', value: 412, to: 498, style: 'number' as const },
+ ].map((stat, i) => (
+ <div key={stat.label} className={cn('px-4 py-2.5', i > 0 && 'border-l border-line')}>
+ <p className="text-[10px] text-ink-muted">{stat.label}</p>
+ <CountUp
+ key={loop}
+ value={stat.to}
+ from={stat.value}
+ style={stat.style}
+ active={done}
+ duration={1}
+ className="block font-display text-sm font-semibold text-ink"
+ />
+ </div>
+ ))}
+ </div>
+ <div className="flex gap-2 px-4 py-3">
+ <span
+ data-cursor="link"
+ className={cn(
+ 'flex h-9 min-w-0 flex-1 items-center truncate rounded-md border px-3 font-mono text-[11px] transition-colors duration-300',
+ phase >= PHASE.link && !added ? 'border-ink-muted/60 text-ink' : 'border-line text-ink-muted',
+ )}
+ >
+ {phase >= PHASE.link && !added ? (
+ <Typed key={loop} text={LINK} active speed={30} />
+ ) : (
+ 'Paste a Reddit or YouTube link'
+ )}
+ </span>
+ <span
+ data-cursor="track"
+ className={cn(
+ 'grid h-9 place-items-center rounded-full px-4 text-xs font-semibold transition-colors duration-300',
+ phase >= PHASE.atTrack && !added ? 'bg-accent text-on-accent' : 'bg-surface-sunken text-ink-muted',
+ )}
+ >
+ Track
+ </span>
+ </div>
+ <ul className="flex flex-col border-t border-line">
+ <AnimatePresence initial={false}>
+ {rows.map(item => {
+ const fresh = item === ADDED;
+ return (
+ <motion.li
+ key={`${item.title}-${fresh ? loop : 'base'}`}
+ layout
+ initial={{ opacity: 0, y: -10 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0 }}
+ transition={{ duration: 0.45, ease: ENTER }}
+ className={cn(
+ 'flex items-center gap-3 border-b border-line px-4 py-3 transition-colors duration-1000',
+ fresh && !done ? 'bg-accent-soft/40' : 'bg-transparent',
+ )}
+ >
+ <PlatformMark platform={item.platform} className="size-4 shrink-0" />
+ <span className="min-w-0 flex-1 truncate text-xs text-ink">{item.title}</span>
+ {fresh && !done ? (
+ <span className="flex items-center gap-1 font-mono text-[10px] text-ink-muted">
+ <RefreshCircle className="size-3.5 animate-spin" />
+ Fetching
+ </span>
+ ) : (
+ <span className="font-mono text-[10px] text-ink-muted">{item.stat}</span>
+ )}
+ </motion.li>
+ );
+ })}
+ </AnimatePresence>
+ </ul>
+ </Frame>
+ );
+}
diff --git a/site/src/components/mockups/kit.tsx b/site/src/components/mockups/kit.tsx
new file mode 100644
index 0000000..2e363bf
--- /dev/null
+++ b/site/src/components/mockups/kit.tsx
@@ -0,0 +1,67 @@
+import type { ReactNode } from 'react';
+import { cn } from '@/lib/cn';
+import { LockKeyhole } from '@/components/icons';
+import { InstagramIcon, RedditIcon, YouTubeIcon } from '@/components/marks';
+import type { Platform } from './platforms';
+
+export interface WindowProps {
+ // the address shown in the bar; omitted for an app window without browser chrome
+ url?: string;
+ className?: string;
+ bodyClassName?: string;
+ children: ReactNode;
+}
+
+// a browser window in brand colours: three dots, an address pill, then the page
+export function Window({ url, className, bodyClassName, children }: WindowProps) {
+ return (
+ <div className={cn('overflow-hidden rounded-lg border border-line bg-surface-raised shadow-window', className)}>
+ <div className="flex h-10 items-center gap-3 border-b border-line bg-surface-sunken/60 px-3.5">
+ <span className="flex gap-1.5" aria-hidden="true">
+ <span className="size-2.5 rounded-full bg-line-strong/50" />
+ <span className="size-2.5 rounded-full bg-line-strong/50" />
+ <span className="size-2.5 rounded-full bg-line-strong/50" />
+ </span>
+ {url && (
+ <span className="mx-auto flex h-6 min-w-0 max-w-[60%] items-center gap-1.5 rounded-full bg-surface-raised px-3 font-mono text-[11px] text-ink-muted ring-1 ring-line">
+ <LockKeyhole className="size-3 shrink-0" />
+ <span className="truncate">{url}</span>
+ </span>
+ )}
+ </div>
+ <div className={bodyClassName}>{children}</div>
+ </div>
+ );
+}
+
+// the card a feature panel holds, 544 by 448 at desktop size like the Activepieces panels
+export function PanelCard({ className, children }: { className?: string; children: ReactNode }) {
+ return (
+ <div
+ className={cn(
+ 'relative w-full max-w-[34rem] overflow-hidden rounded-lg border border-line bg-surface-raised shadow-window',
+ className,
+ )}
+ >
+ {children}
+ </div>
+ );
+}
+
+// a grey line standing in for text the picture does not need to spell out
+export function Bar({ className }: { className?: string }) {
+ return <span aria-hidden="true" className={cn('block h-2 rounded-full bg-line', className)} />;
+}
+
+const PLATFORM_STYLE: Record<Platform, { icon: typeof YouTubeIcon; tint: string }> = {
+ youtube: { icon: YouTubeIcon, tint: 'text-youtube' },
+ instagram: { icon: InstagramIcon, tint: 'text-instagram' },
+ reddit: { icon: RedditIcon, tint: 'text-reddit' },
+};
+
+// a platform's own mark in its own colour, the one place colours outside the palette appear, as each platform asks
+export function PlatformMark({ platform, className }: { platform: Platform; className?: string }) {
+ const style = PLATFORM_STYLE[platform];
+ const Icon = style.icon;
+ return <Icon className={cn(style.tint, className)} />;
+}
diff --git a/site/src/components/mockups/platforms.ts b/site/src/components/mockups/platforms.ts
new file mode 100644
index 0000000..6b9cb2c
--- /dev/null
+++ b/site/src/components/mockups/platforms.ts
@@ -0,0 +1,7 @@
+export type Platform = 'youtube' | 'instagram' | 'reddit';
+
+const LABELS: Record<Platform, string> = { youtube: 'YouTube', instagram: 'Instagram', reddit: 'Reddit' };
+
+export function platformLabel(platform: Platform): string {
+ return LABELS[platform];
+}
diff --git a/site/src/components/mockups/sample.ts b/site/src/components/mockups/sample.ts
new file mode 100644
index 0000000..ada3b0b
--- /dev/null
+++ b/site/src/components/mockups/sample.ts
@@ -0,0 +1,26 @@
+import type { Platform } from './platforms';
+
+// the made-up creator every picture shows, so the same accounts and numbers agree from one picture to the next
+
+export interface SampleAccount {
+ platform: Platform;
+ name: string;
+ audience: number;
+}
+
+export const ACCOUNTS: SampleAccount[] = [
+ { platform: 'youtube', name: 'Northwind Kitchen', audience: 84_213 },
+ { platform: 'instagram', name: '@northwind.kitchen', audience: 31_702 },
+ { platform: 'youtube', name: 'Northwind Shorts', audience: 22_940 },
+ { platform: 'reddit', name: 'u/northwind_cooks', audience: 12_410 },
+];
+
+// weekly subscribers of the main channel and followers of the Instagram account, last 12 weeks
+export const YOUTUBE_WEEKS = [
+ 71_800, 72_900, 73_400, 74_950, 76_300, 76_900, 78_400, 79_950, 80_600, 82_100, 83_150, 84_213,
+];
+export const INSTAGRAM_WEEKS = [
+ 27_100, 27_400, 27_950, 28_200, 28_900, 29_350, 29_600, 30_120, 30_640, 31_050, 31_380, 31_702,
+];
+
+export const MONTHS = ['Jul', 'Aug', 'Sep', 'Oct'];
diff --git a/site/src/components/navLinks.ts b/site/src/components/navLinks.ts
new file mode 100644
index 0000000..0ba809e
--- /dev/null
+++ b/site/src/components/navLinks.ts
@@ -0,0 +1,116 @@
+import { Bookmark, Chart, Checklist, Layers, Library, Plane, Server, ShieldCheck, UsersGroup } from './icons';
+import type { Icon } from './icons';
+import { GitHubIcon } from './marks';
+import { GITHUB_URL } from '@/lib/links';
+import type { ComponentType } from 'react';
+
+export interface MenuItem {
+ title: string;
+ description: string;
+ href: string;
+ icon: Icon | ComponentType<{ className?: string }>;
+}
+
+export interface MenuColumn {
+ heading: string;
+ items: MenuItem[];
+}
+
+export interface Menu {
+ id: string;
+ label: string;
+ columns: MenuColumn[];
+}
+
+// wide and short: each menu is two or three columns side by side
+export const MENUS: Menu[] = [
+ {
+ id: 'product',
+ label: 'Product',
+ columns: [
+ {
+ heading: 'See',
+ items: [
+ {
+ title: 'Analytics',
+ description: 'YouTube, Instagram and Reddit side by side',
+ href: '/#analytics',
+ icon: Chart,
+ },
+ {
+ title: 'Libraries',
+ description: 'Every video, reel and post in one list',
+ href: '/docs/use/analytics',
+ icon: Library,
+ },
+ ],
+ },
+ {
+ heading: 'Publish',
+ items: [
+ {
+ title: 'Publishing',
+ description: 'Photos, Reels and Stories, now or later',
+ href: '/#publishing',
+ icon: Plane,
+ },
+ {
+ title: 'Bulk upload',
+ description: 'Many files at once, spaced out',
+ href: '/docs/use/publishing',
+ icon: Layers,
+ },
+ ],
+ },
+ {
+ heading: 'Follow',
+ items: [
+ {
+ title: 'Tracked content',
+ description: 'Any post or video, by its link',
+ href: '/docs/use/tracked-content',
+ icon: Bookmark,
+ },
+ { title: 'Teams', description: 'Members and the administrator', href: '/docs/concepts', icon: UsersGroup },
+ ],
+ },
+ ],
+ },
+ {
+ id: 'self-host',
+ label: 'Run your own',
+ columns: [
+ {
+ heading: 'Start',
+ items: [
+ {
+ title: 'Self-hosting overview',
+ description: 'What you need and what it costs',
+ href: '/docs/self-host',
+ icon: Server,
+ },
+ {
+ title: 'Launch checklist',
+ description: 'Check it before you invite anyone',
+ href: '/docs/self-host/checklist',
+ icon: Checklist,
+ },
+ ],
+ },
+ {
+ heading: 'Open source',
+ items: [
+ { title: 'GitHub', description: 'Read every line', href: GITHUB_URL, icon: GitHubIcon },
+ {
+ title: 'Security',
+ description: 'How keys and data stay private',
+ href: '/docs/reference/security',
+ icon: ShieldCheck,
+ },
+ ],
+ },
+ ],
+ },
+];
+
+export const BAR_LINKS = [{ label: 'Docs', href: '/docs' }];
diff --git a/site/src/components/sections/Faq.tsx b/site/src/components/sections/Faq.tsx
new file mode 100644
index 0000000..23db389
--- /dev/null
+++ b/site/src/components/sections/Faq.tsx
@@ -0,0 +1,102 @@
+import { useId, useState } from 'react';
+import type { ReactNode } from 'react';
+import { Link } from 'react-router';
+import { Add, Close } from '@/components/icons';
+import { cn } from '@/lib/cn';
+
+// the answers are the docs FAQ word for word, so the site and the docs never disagree
+const QUESTIONS: { q: string; a: ReactNode }[] = [
+ {
+ q: 'What does running an instance cost?',
+ a: 'For a small team, nothing. Supabase, Cloudflare, Cloudinary and Upstash free plans cover typical use, and the YouTube and Instagram APIs are free.',
+ },
+ {
+ q: 'How fresh is the data?',
+ a: 'Data is fetched when you open a page or choose Refresh, and cached for a short time when Redis is set up. Instagram tokens are renewed nightly.',
+ },
+ {
+ q: 'Does Twiligent publish to YouTube or Reddit?',
+ a: 'No. Publishing is Instagram only. YouTube and Reddit are analytics only.',
+ },
+ {
+ q: 'Do I need my own Supabase project?',
+ a: "Only if you run your own instance. Members of someone else's instance use theirs.",
+ },
+ {
+ q: "Why can't I connect my Instagram account?",
+ a: (
+ <>
+ It must be a Business or Creator account, and while the instance's Meta app is in development mode it must be
+ added as a tester. See{' '}
+ <Link to="/docs/use/connect-accounts" className="font-medium text-accent-text underline underline-offset-4">
+ Connect your accounts
+ </Link>
+ .
+ </>
+ ),
+ },
+ {
+ q: 'Do I need GitHub to schedule posts?',
+ a: 'No. Members never do. Administrators only need the deployed Worker; the GitHub workflow is an optional backup.',
+ },
+];
+
+function Question({ q, a, open, onToggle }: { q: string; a: ReactNode; open: boolean; onToggle: () => void }) {
+ const id = useId();
+ return (
+ <li className="rounded-lg border border-line bg-surface-raised">
+ <h3>
+ <button
+ type="button"
+ aria-expanded={open}
+ aria-controls={id}
+ onClick={onToggle}
+ className="flex w-full items-center justify-between gap-4 px-6 py-5 text-left text-[17px] font-semibold text-ink"
+ >
+ {q}
+ {open ? (
+ <Close className="size-5 shrink-0 text-ink-muted" />
+ ) : (
+ <Add className="size-5 shrink-0 text-ink-muted" />
+ )}
+ </button>
+ </h3>
+ <div id={id} hidden={!open} className={cn('px-6 pb-5 text-base leading-7 text-ink-muted')}>
+ {a}
+ </div>
+ </li>
+ );
+}
+
+export function Faq() {
+ const [open, setOpen] = useState(0);
+ return (
+ <section
+ id="faq"
+ aria-labelledby="faq-heading"
+ className="mx-auto w-full max-w-3xl scroll-mt-24 px-5 py-24 md:py-32"
+ >
+ <h2 id="faq-heading" className="display text-[36px] leading-[40px] text-ink md:text-[44px] md:leading-[50px]">
+ Questions, answered
+ </h2>
+ <ul className="mt-8 flex flex-col gap-3">
+ {QUESTIONS.map((item, i) => (
+ <Question
+ key={item.q}
+ q={item.q}
+ a={item.a}
+ open={open === i}
+ onToggle={() => setOpen(current => (current === i ? -1 : i))}
+ />
+ ))}
+ </ul>
+ <p className="mt-6 text-[15px] text-ink-muted">
+ More in the{' '}
+ <Link to="/docs/reference/faq" className="font-medium text-accent-text underline underline-offset-4">
+ FAQ
+ </Link>
+ .
+ </p>
+ </section>
+ );
+}
diff --git a/site/src/components/sections/Platforms.tsx b/site/src/components/sections/Platforms.tsx
new file mode 100644
index 0000000..ffff561
--- /dev/null
+++ b/site/src/components/sections/Platforms.tsx
@@ -0,0 +1,139 @@
+import { useRef } from 'react';
+import { motion, useInView } from 'motion/react';
+import { FoldBand } from '@/components/brand';
+import { CheckCircle } from '@/components/icons';
+import { formatNumber } from '@/lib/format';
+import { PlatformMark } from '@/components/mockups/kit';
+import { platformLabel } from '@/components/mockups/platforms';
+import type { Platform } from '@/components/mockups/platforms';
+import { AreaChart } from '@/components/mockups/AreaChart';
+import type { ChartTone } from '@/components/mockups/AreaChart';
+import { INSTAGRAM_WEEKS, YOUTUBE_WEEKS } from '@/components/mockups/sample';
+import { FeatureNotes, SectionHeader } from './blocks';
+
+interface Read {
+ platform: Platform;
+ role: string;
+ items: string[];
+ // one headline number from the sample creator, with its last 12 weeks
+ metric: string;
+ weeks: number[];
+ tone: ChartTone;
+}
+
+const READS: Read[] = [
+ {
+ platform: 'youtube',
+ role: 'Analytics',
+ items: ['Subscribers and views', 'Likes and comments', 'Shorts against long videos', 'Tags and SEO'],
+ metric: 'Subscribers',
+ weeks: YOUTUBE_WEEKS,
+ tone: 'accent',
+ },
+ {
+ platform: 'instagram',
+ role: 'Analytics and publishing',
+ items: [
+ 'Followers and engagement',
+ 'Best day and hour to post',
+ 'Content types and hashtags',
+ 'Photos, Reels and Stories',
+ ],
+ metric: 'Followers',
+ weeks: INSTAGRAM_WEEKS,
+ tone: 'afterglow',
+ },
+ {
+ platform: 'reddit',
+ role: 'Analytics',
+ items: ['Karma', 'Posts', 'Comments', 'Any post, tracked by its link'],
+ metric: 'Karma',
+ weeks: [9_800, 10_050, 10_120, 10_400, 10_760, 10_900, 11_200, 11_380, 11_650, 11_900, 12_180, 12_410],
+ tone: 'accent',
+ },
+];
+
+const EASE = [0.22, 1, 0.36, 1] as const;
+
+function PlatformCard({ read, index }: { read: Read; index: number }) {
+ const ref = useRef<HTMLLIElement>(null);
+ const seen = useInView(ref, { once: true, amount: 0.4 });
+ const latest = read.weeks[read.weeks.length - 1];
+ return (
+ <motion.li
+ ref={ref}
+ className="flex flex-col gap-4 rounded-lg border border-line bg-surface-raised p-6 shadow-window"
+ initial={{ opacity: 0, y: 16 }}
+ animate={seen ? { opacity: 1, y: 0 } : undefined}
+ transition={{ duration: 0.6, ease: EASE, delay: index * 0.1 }}
+ >
+ <div className="flex items-center gap-3">
+ <span className="grid size-11 place-items-center rounded-full bg-surface-sunken">
+ <PlatformMark platform={read.platform} className="size-6" />
+ </span>
+ <div>
+ <h3 className="text-lg font-semibold text-ink">{platformLabel(read.platform)}</h3>
+ <p className="text-sm text-ink-muted">{read.role}</p>
+ </div>
+ </div>
+ <ul className="flex flex-col gap-2.5">
+ {read.items.map(item => (
+ <li key={item} className="flex items-center gap-2.5 text-[15px] text-ink">
+ <CheckCircle className="size-4 shrink-0 text-success" />
+ {item}
+ </li>
+ ))}
+ </ul>
+ <div className="mt-auto rounded-md border border-line bg-surface-sunken/40 p-3.5">
+ <div className="flex items-end justify-between gap-3">
+ <div>
+ <p className="text-[11px] text-ink-muted">{read.metric}, last 12 weeks</p>
+ <p className="mt-0.5 font-display text-lg font-semibold text-ink tabular-nums">{formatNumber(latest)}</p>
+ </div>
+ <span className="font-mono text-[11px] text-success">+{formatNumber(latest - read.weeks[0])}</span>
+ </div>
+ <AreaChart
+ series={[{ values: read.weeks, tone: read.tone }]}
+ play={seen}
+ gridLines={0}
+ delay={250 + index * 120}
+ className="mt-2 h-14"
+ />
+ </div>
+ </motion.li>
+ );
+}
+
+// the integrations wall from Activepieces, told honestly: three platforms, and what Twiligent reads from each
+export function Platforms() {
+ return (
+ <section
+ id="platforms"
+ aria-labelledby="platforms-heading"
+ className="container-page flex scroll-mt-24 flex-col gap-8 py-24 md:gap-12 md:py-32"
+ >
+ <SectionHeader
+ id="platforms-heading"
+ title="Three platforms. One dashboard."
+ lead="YouTube and Reddit for analytics. Instagram for analytics and publishing."
+ />
+ <FoldBand placement="bottom-left" className="rounded-[32px] p-4 sm:p-8 lg:p-12">
+ <ul className="grid gap-4 lg:grid-cols-3">
+ {READS.map((read, i) => (
+ <PlatformCard key={read.platform} read={read} index={i} />
+ ))}
+ </ul>
+ </FoldBand>
+ <FeatureNotes
+ notes={[
+ { title: 'Libraries', text: 'Every video, Short, reel, post and Reddit post, searchable and filterable.' },
+ {
+ title: 'Tracked content',
+ text: 'Follow any Reddit post or YouTube video by its link, and group them into categories.',
+ },
+ { title: 'Open source', text: 'MIT licensed. Read every line on GitHub.' },
+ ]}
+ />
+ </section>
+ );
+}
diff --git a/site/src/components/sections/Story.tsx b/site/src/components/sections/Story.tsx
new file mode 100644
index 0000000..4d6dacf
--- /dev/null
+++ b/site/src/components/sections/Story.tsx
@@ -0,0 +1,529 @@
+import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
+import type { ComponentType, MutableRefObject, ReactNode, RefObject } from 'react';
+import { easeIn, easeOut, motion, useReducedMotion, useScroll, useSpring, useTransform } from 'motion/react';
+import type { MotionValue } from 'motion/react';
+import { cn } from '@/lib/cn';
+import { Logo } from '@/components/brand';
+import { Bookmark, CalendarMark, Chart, Home, Library, Plane, Plug, UsersGroup } from '@/components/icons';
+import type { Icon } from '@/components/icons';
+import { PlatformMark } from '@/components/mockups/kit';
+import {
+ CalendarWindow,
+ FilesWindow,
+ InstagramWindow,
+ NotesWindow,
+ RedditWindow,
+ SheetWindow,
+ YouTubeStudioWindow,
+} from './storyWindows';
+
+// scroll progress is eased toward where the reader is rather than snapped to it, settling in about a third of a second
+const SMOOTH = { stiffness: 140, damping: 30, mass: 0.6, restDelta: 0.0001 };
+
+/* the windows */
+
+interface FlyingWindowSpec {
+ Comp: ComponentType;
+ // where it rests, in percent of the stage
+ at: [number, number];
+ tilt: number;
+ // where it flies in from, in vw and vh, and its tilt on the way
+ from: [number, number, number];
+ start: number;
+ front: boolean;
+}
+
+// the first three sit behind the words and the rest pass over them, so the words read as caught in the middle of the pile
+const WORDS_Z = 34;
+const WINDOWS: FlyingWindowSpec[] = [
+ { Comp: YouTubeStudioWindow, at: [50, 30], tilt: 2, from: [0, -115, 4], start: 0.3, front: false },
+ { Comp: SheetWindow, at: [22, 34], tilt: -4, from: [-115, -31, -8], start: 0.312, front: false },
+ { Comp: InstagramWindow, at: [78, 34], tilt: 3, from: [115, -42, 6], start: 0.33, front: false },
+ { Comp: FilesWindow, at: [21, 71], tilt: 5, from: [-89, 63, 10], start: 0.345, front: true },
+ { Comp: NotesWindow, at: [40, 68], tilt: -2, from: [-26, 100, -4], start: 0.37, front: true },
+ { Comp: CalendarWindow, at: [67, 60], tilt: 6, from: [73, 13, 12], start: 0.35, front: true },
+ { Comp: RedditWindow, at: [80, 72], tilt: -5, from: [73, 58, -10], start: 0.385, front: true },
+];
+const FLY_IN = 0.14;
+const LEAVE = 0.605;
+const LEAVE_GAP = 0.009;
+const LEAVE_FOR = 0.065;
+
+interface FlyingWindowProps {
+ win: FlyingWindowSpec;
+ index: number;
+ progress: MotionValue<number>;
+ size: number;
+}
+
+function FlyingWindow({ win, index, progress, size }: FlyingWindowProps) {
+ const [ax, ay] = win.at;
+ const [fx, fy, fr] = win.from;
+ const a = win.start;
+ const b = a + FLY_IN;
+ const c = LEAVE + index * LEAVE_GAP;
+ const d = c + LEAVE_FOR;
+ const ease = [easeOut, (t: number) => t, easeIn];
+
+ // in from off screen, rest, then drawn into the middle of the screen
+ const x = useTransform(progress, [a, b, c, d], [`${fx}vw`, '0vw', '0vw', `${50 - ax}vw`], { ease });
+ const y = useTransform(progress, [a, b, c, d], [`${fy}vh`, '0vh', '0vh', `${50 - ay}vh`], { ease });
+ const rotate = useTransform(progress, [a, b, c, d], [fr, win.tilt, win.tilt, 0], { ease });
+ const scale = useTransform(progress, [c, d], [size, size * 0.05], { ease: easeIn });
+ const opacity = useTransform(progress, [a, a + 0.004, c, d - 0.01], [0, 1, 1, 0]);
+
+ const { Comp } = win;
+ return (
+ // a point with no size at the resting place, so the window scales and tilts about its own centre
+ <motion.div
+ className="absolute size-0 will-change-transform"
+ style={{
+ left: `${ax}%`,
+ top: `${ay}%`,
+ x,
+ y,
+ rotate,
+ scale,
+ opacity,
+ zIndex: win.front ? WORDS_Z + 1 : WORDS_Z - 1,
+ }}
+ >
+ <div className="absolute top-0 left-0 -translate-x-1/2 -translate-y-1/2">
+ <Comp />
+ </div>
+ </motion.div>
+ );
+}
+
+/* the ring */
+
+type Enter = ['scale', number] | ['blur'];
+
+interface RingNodeSpec {
+ id: string;
+ at: [number, number];
+ tilt: number;
+ show: number;
+ enter: Enter;
+ label?: string;
+ icon?: Icon;
+}
+
+// what Twiligent brings together: the three platforms at the top, then what it does with them around the sides
+const NODES: RingNodeSpec[] = [
+ { id: 'platforms', at: [50, 7.5], tilt: 0, show: 0.685, enter: ['scale', 0.62] },
+ { id: 'overview', at: [12, 17.5], tilt: -2, show: 0.7, enter: ['scale', 0.96], label: 'Overview', icon: Home },
+ { id: 'publishing', at: [88, 17.5], tilt: 2, show: 0.7, enter: ['scale', 0.96], label: 'Publishing', icon: Plane },
+ { id: 'libraries', at: [8.8, 50], tilt: 1.5, show: 0.73, enter: ['blur'], label: 'Libraries', icon: Library },
+ {
+ id: 'scheduling',
+ at: [91.2, 50],
+ tilt: -1.5,
+ show: 0.745,
+ enter: ['scale', 0.96],
+ label: 'Scheduling',
+ icon: CalendarMark,
+ },
+ {
+ id: 'tracked',
+ at: [13, 82.5],
+ tilt: 2,
+ show: 0.77,
+ enter: ['scale', 0.62],
+ label: 'Tracked content',
+ icon: Bookmark,
+ },
+ { id: 'teams', at: [87, 82.5], tilt: -2, show: 0.77, enter: ['scale', 0.96], label: 'Teams', icon: UsersGroup },
+ { id: 'accounts', at: [38.5, 92.5], tilt: -1, show: 0.795, enter: ['blur'], label: 'Accounts', icon: Plug },
+ { id: 'analytics', at: [61.5, 92.5], tilt: 1, show: 0.8, enter: ['scale', 0.86], label: 'Analytics', icon: Chart },
+];
+
+type WireKind = 'top' | 'down' | 'across' | 'straight';
+
+interface WireSpec {
+ from: string;
+ to: string;
+ kind: WireKind;
+ draw: [number, number];
+ accent?: boolean;
+}
+
+// in the order they grow: out from the platforms at the top, down both sides, meeting along the bottom
+const WIRES: WireSpec[] = [
+ { from: 'platforms', to: 'overview', kind: 'top', draw: [0.655, 0.7] },
+ { from: 'platforms', to: 'publishing', kind: 'top', draw: [0.655, 0.7] },
+ { from: 'overview', to: 'libraries', kind: 'down', draw: [0.685, 0.745], accent: true },
+ { from: 'publishing', to: 'scheduling', kind: 'down', draw: [0.685, 0.745], accent: true },
+ { from: 'libraries', to: 'tracked', kind: 'down', draw: [0.72, 0.765] },
+ { from: 'scheduling', to: 'teams', kind: 'down', draw: [0.72, 0.765] },
+ { from: 'tracked', to: 'accounts', kind: 'across', draw: [0.745, 0.8] },
+ { from: 'teams', to: 'analytics', kind: 'across', draw: [0.745, 0.8] },
+ { from: 'accounts', to: 'analytics', kind: 'straight', draw: [0.795, 0.84] },
+];
+
+const GAP = 6;
+const RADIUS = 16;
+
+type Point = [number, number];
+
+interface Box {
+ x: number;
+ y: number;
+ w: number;
+ h: number;
+ cx: number;
+ cy: number;
+}
+
+// a path through right-angled points, each corner rounded
+function rounded(points: Point[]): string {
+ let d = `M ${points[0][0]} ${points[0][1]}`;
+ for (let i = 1; i < points.length - 1; i++) {
+ const [px, py] = points[i - 1];
+ const [cx, cy] = points[i];
+ const [nx, ny] = points[i + 1];
+ const r = Math.min(RADIUS, Math.hypot(cx - px, cy - py) / 2, Math.hypot(nx - cx, ny - cy) / 2);
+ const inX = cx - Math.sign(cx - px) * r;
+ const inY = cy - Math.sign(cy - py) * r;
+ const outX = cx + Math.sign(nx - cx) * r;
+ const outY = cy + Math.sign(ny - cy) * r;
+ d += ` L ${inX} ${inY} Q ${cx} ${cy} ${outX} ${outY}`;
+ }
+ const [lx, ly] = points[points.length - 1];
+ return `${d} L ${lx} ${ly}`;
+}
+
+// the points for one wire, from the measured boxes of the two nodes it joins
+function route(wire: WireSpec, a: Box, b: Box, width: number): Point[] {
+ const toRight = b.cx > a.cx;
+ const side = (box: Box, right: boolean) => (right ? box.x + box.w + GAP : box.x - GAP);
+ if (wire.kind === 'top') {
+ const start: Point = [side(a, toRight), a.cy];
+ const end: Point = [side(b, !toRight), b.cy];
+ const bend = toRight ? width * 0.668 : width * 0.332;
+ return [start, [bend, a.cy], [bend, b.cy], end];
+ }
+ if (wire.kind === 'down') {
+ const start: Point = [a.cx, a.y + a.h + GAP];
+ const end: Point = [b.cx, b.y - GAP];
+ const mid = (start[1] + end[1]) / 2;
+ return [start, [a.cx, mid], [b.cx, mid], end];
+ }
+ if (wire.kind === 'across') {
+ const start: Point = [side(a, toRight), a.cy];
+ const end: Point = [side(b, !toRight), b.cy];
+ const mid = (start[0] + end[0]) / 2;
+ return [start, [mid, a.cy], [mid, b.cy], end];
+ }
+ return [
+ [side(a, toRight), a.cy],
+ [side(b, !toRight), b.cy],
+ ];
+}
+
+interface WireLayout extends WireSpec {
+ d: string;
+ ends: [Point, Point];
+}
+
+interface RingLayout {
+ width: number;
+ height: number;
+ wires: WireLayout[];
+}
+
+function useRing(
+ boxRef: RefObject<HTMLDivElement | null>,
+ nodeRefs: MutableRefObject<Record<string, HTMLDivElement | null>>,
+): RingLayout | null {
+ const [layout, setLayout] = useState<RingLayout | null>(null);
+ const measure = useCallback(() => {
+ const box = boxRef.current;
+ if (!box) return;
+ const boxes: Record<string, Box> = {};
+ for (const node of NODES) {
+ const el = nodeRefs.current[node.id];
+ if (!el) return;
+ // offsets, not bounding boxes: nodes are scaled and tilted while they enter, and wires must meet where they rest
+ const w = el.offsetWidth;
+ const h = el.offsetHeight;
+ const cx = (node.at[0] / 100) * box.offsetWidth;
+ const cy = (node.at[1] / 100) * box.offsetHeight;
+ boxes[node.id] = { x: cx - w / 2, y: cy - h / 2, w, h, cx, cy };
+ }
+ setLayout({
+ width: box.offsetWidth,
+ height: box.offsetHeight,
+ wires: WIRES.map(wire => {
+ const points = route(wire, boxes[wire.from], boxes[wire.to], box.offsetWidth);
+ return { ...wire, d: rounded(points), ends: [points[0], points[points.length - 1]] };
+ }),
+ });
+ }, [boxRef, nodeRefs]);
+
+ useLayoutEffect(() => {
+ measure();
+ const observer = new ResizeObserver(measure);
+ if (boxRef.current) observer.observe(boxRef.current);
+ // the headline font can change a node's width once it loads
+ document.fonts?.ready.then(measure);
+ return () => observer.disconnect();
+ }, [boxRef, measure]);
+
+ return layout;
+}
+
+function Wire({ wire, progress }: { wire: WireLayout; progress: MotionValue<number> }) {
+ const [a, b] = wire.draw;
+ const length = useTransform(progress, [a, b], [0, 1]);
+ // a round cap draws a dot even at no length, so the wire stays hidden until it starts to grow
+ const shown = useTransform(progress, [a, a + 0.001], [0, 1]);
+ const startDot = useTransform(progress, [a, a + 0.005], [0, 1]);
+ const endDot = useTransform(progress, [b - 0.005, b], [0, 1]);
+ return (
+ <>
+ <motion.path
+ d={wire.d}
+ fill="none"
+ strokeWidth="1.5"
+ strokeLinecap="round"
+ className={wire.accent ? 'stroke-accent' : 'stroke-line-strong'}
+ style={{ pathLength: length, opacity: shown }}
+ />
+ <motion.circle
+ cx={wire.ends[0][0]}
+ cy={wire.ends[0][1]}
+ r="3"
+ className="fill-ink"
+ style={{ opacity: startDot }}
+ />
+ <motion.circle cx={wire.ends[1][0]} cy={wire.ends[1][1]} r="3" className="fill-ink" style={{ opacity: endDot }} />
+ </>
+ );
+}
+
+function NodeCard({ node }: { node: RingNodeSpec }) {
+ if (node.id === 'platforms') {
+ return (
+ <div className="flex">
+ {(['youtube', 'instagram', 'reddit'] as const).map((platform, i) => (
+ <span
+ key={platform}
+ className={cn(
+ 'flex size-12 items-center justify-center rounded-full border border-line bg-surface-raised shadow-sm',
+ i > 0 && '-ml-1.5',
+ )}
+ >
+ <PlatformMark platform={platform} className="size-5" />
+ </span>
+ ))}
+ </div>
+ );
+ }
+ const Icon = node.icon;
+ return (
+ <div className="flex items-center gap-2.5 rounded-md border border-line bg-surface-raised px-4 py-3 whitespace-nowrap shadow-md">
+ {Icon && <Icon className="size-5 shrink-0 text-accent-text" />}
+ <span className="text-[17px] leading-none text-ink">{node.label}</span>
+ </div>
+ );
+}
+
+function RingNode({
+ node,
+ progress,
+ nodeRef,
+}: {
+ node: RingNodeSpec;
+ progress: MotionValue<number>;
+ nodeRef: (el: HTMLDivElement | null) => void;
+}) {
+ const during = [node.show, node.show + 0.035];
+ const blur = node.enter[0] === 'blur';
+ const opacity = useTransform(progress, during, [0, 1]);
+ const scale = useTransform(progress, during, [node.enter[0] === 'scale' ? node.enter[1] : 1, 1], { ease: easeOut });
+ const y = useTransform(progress, during, [blur ? 20 : 0, 0], { ease: easeOut });
+ const filter = useTransform(progress, during, [blur ? 'blur(4px)' : 'blur(0px)', 'blur(0px)']);
+ return (
+ <motion.div
+ className="absolute size-0"
+ style={{ left: `${node.at[0]}%`, top: `${node.at[1]}%`, opacity, scale, y, filter, rotate: node.tilt }}
+ >
+ <div ref={nodeRef} className="absolute top-0 left-0 -translate-x-1/2 -translate-y-1/2">
+ <NodeCard node={node} />
+ </div>
+ </motion.div>
+ );
+}
+
+function Ring({ progress }: { progress: MotionValue<number> }) {
+ const boxRef = useRef<HTMLDivElement>(null);
+ const nodeRefs = useRef<Record<string, HTMLDivElement | null>>({});
+ const layout = useRing(boxRef, nodeRefs);
+ return (
+ <div ref={boxRef} aria-hidden="true" className="absolute inset-x-0 top-[14%] bottom-[4.5%] z-[2] hidden lg:block">
+ {layout && (
+ <svg viewBox={`0 0 ${layout.width} ${layout.height}`} className="absolute inset-0 size-full overflow-visible">
+ {layout.wires.map(wire => (
+ <Wire key={`${wire.from}-${wire.to}`} wire={wire} progress={progress} />
+ ))}
+ </svg>
+ )}
+ {NODES.map(node => (
+ <RingNode
+ key={node.id}
+ node={node}
+ progress={progress}
+ nodeRef={el => {
+ nodeRefs.current[node.id] = el;
+ }}
+ />
+ ))}
+ </div>
+ );
+}
+
+/* the words */
+
+const STATEMENT =
+ 'display mx-auto max-w-[20ch] text-center text-[40px] leading-[44px] text-ink md:text-[64px] md:leading-[68px] xl:text-[76px] xl:leading-[80px]';
+
+function Resolution() {
+ return (
+ <div className="mx-auto text-center">
+ <Logo className="mx-auto h-11 md:h-14" />
+ <p className="display mx-auto mt-7 max-w-[14ch] text-[40px] leading-[44px] text-ink md:text-[60px] md:leading-[64px]">
+ Twiligent puts them in <span className="text-accent-text">one view.</span>
+ </p>
+ </div>
+ );
+}
+
+function NodeChip({ node }: { node: RingNodeSpec }) {
+ const Icon = node.icon;
+ return (
+ <div className="flex items-center gap-2.5 rounded-md border border-line bg-surface-raised px-3 py-2.5">
+ {Icon && <Icon className="size-4 shrink-0 text-accent-text" />}
+ <span className="text-[15px] leading-tight text-ink">{node.label}</span>
+ </div>
+ );
+}
+
+const CHIPS = NODES.filter(node => node.label);
+
+function ChipGrid({ className }: { className?: string }) {
+ return (
+ <ul className={cn('mx-auto grid w-full max-w-md grid-cols-2 gap-2', className)}>
+ {CHIPS.map(node => (
+ <li key={node.id}>
+ <NodeChip node={node} />
+ </li>
+ ))}
+ </ul>
+ );
+}
+
+// the same three moments as plain sections, for readers who ask for less motion
+function StillStory() {
+ return (
+ <div className="container-page space-y-24 py-24 md:py-32">
+ <h2 id="story-heading" className={STATEMENT}>
+ You post in three places.
+ </h2>
+ <p className={STATEMENT}>Each one keeps its numbers somewhere else.</p>
+ <div>
+ <Resolution />
+ <ChipGrid className="mt-12 max-w-2xl sm:grid-cols-4" />
+ </div>
+ </div>
+ );
+}
+
+// windows are drawn at laptop size and scale with the screen, never below a size that still reads as a window
+function useWindowScale(): number {
+ const [scale, setScale] = useState(1);
+ useEffect(() => {
+ const update = () => setScale(Math.min(1.12, Math.max(0.5, window.innerWidth / 1440)));
+ update();
+ window.addEventListener('resize', update);
+ return () => window.removeEventListener('resize', update);
+ }, []);
+ return scale;
+}
+
+interface BeatProps {
+ opacity: MotionValue<number>;
+ filter: MotionValue<string>;
+ y?: MotionValue<number>;
+ z: number;
+ children: ReactNode;
+}
+
+function Beat({ opacity, filter, y, z, children }: BeatProps) {
+ return (
+ <motion.div
+ className="pointer-events-none absolute inset-0 flex items-center justify-center px-5"
+ style={{ opacity, filter, y, zIndex: z }}
+ >
+ {children}
+ </motion.div>
+ );
+}
+
+function MovingStory() {
+ const sectionRef = useRef<HTMLDivElement>(null);
+ const size = useWindowScale();
+ const { scrollYProgress } = useScroll({ target: sectionRef, offset: ['start start', 'end end'] });
+ // the spring also keeps every value on one clock, so opacity and blur do not run on the browser's own scroll timeline
+ const progress = useSpring(scrollYProgress, SMOOTH);
+
+ const oneOpacity = useTransform(progress, [0.22, 0.3], [1, 0]);
+ const oneBlur = useTransform(progress, [0.22, 0.3], ['blur(0px)', 'blur(5px)']);
+ const twoOpacity = useTransform(progress, [0.24, 0.32, 0.56, 0.6], [0, 1, 1, 0]);
+ const twoBlur = useTransform(progress, [0.24, 0.32, 0.56, 0.6], ['blur(5px)', 'blur(0px)', 'blur(0px)', 'blur(5px)']);
+ const endOpacity = useTransform(progress, [0.62, 0.66], [0, 1]);
+ const endBlur = useTransform(progress, [0.62, 0.66], ['blur(5px)', 'blur(0px)']);
+ const endY = useTransform(progress, [0.62, 0.66], [14, 0], { ease: easeOut });
+
+ return (
+ <div ref={sectionRef} className="relative h-[420vh]">
+ <div className="sticky top-0 h-svh overflow-hidden">
+ <Ring progress={progress} />
+ <div aria-hidden="true">
+ {WINDOWS.map((win, i) => (
+ <FlyingWindow key={i} win={win} index={i} progress={progress} size={size} />
+ ))}
+ </div>
+ {/* a glow of the page colour over the ring and under every window, so no wire runs through a line of text */}
+ <div
+ aria-hidden="true"
+ className="pointer-events-none absolute inset-0 z-[3] bg-[radial-gradient(40%_21%_at_50%_50%,var(--surface)_58%,color-mix(in_oklab,var(--surface)_78%,transparent)_73%,color-mix(in_oklab,var(--surface)_26%,transparent)_88%,transparent_100%)]"
+ />
+ <Beat opacity={oneOpacity} filter={oneBlur} z={WORDS_Z}>
+ <h2 id="story-heading" className={STATEMENT}>
+ You post in three places.
+ </h2>
+ </Beat>
+ <Beat opacity={twoOpacity} filter={twoBlur} z={WORDS_Z}>
+ <p className={STATEMENT}>Each one keeps its numbers somewhere else.</p>
+ </Beat>
+ <Beat opacity={endOpacity} filter={endBlur} y={endY} z={WORDS_Z}>
+ <div>
+ <Resolution />
+ {/* the ring needs a wide screen; smaller screens list the same places beneath the words */}
+ <ChipGrid className="mt-8 lg:hidden" />
+ </div>
+ </Beat>
+ </div>
+ </div>
+ );
+}
+
+export function Story() {
+ const reduce = useReducedMotion();
+ return (
+ <section id="story" aria-labelledby="story-heading" className="relative bg-surface">
+ {reduce ? <StillStory /> : <MovingStory />}
+ </section>
+ );
+}
diff --git a/site/src/components/sections/blocks.tsx b/site/src/components/sections/blocks.tsx
new file mode 100644
index 0000000..0e8f898
--- /dev/null
+++ b/site/src/components/sections/blocks.tsx
@@ -0,0 +1,158 @@
+import type { ReactNode } from 'react';
+import { cn } from '@/lib/cn';
+import { FoldBand } from '@/components/brand';
+import type { RibbonPlacement } from '@/components/brand';
+import { Pill } from '@/components/Pill';
+
+export interface SectionHeaderProps {
+ id: string;
+ title: string;
+ lead?: string;
+ children?: ReactNode;
+}
+
+// the Activepieces section opening: the headline on the left, one supporting line on the right
+export function SectionHeader({ id, title, lead, children }: SectionHeaderProps) {
+ return (
+ <div className="flex flex-col gap-5 md:flex-row md:items-end md:justify-between md:gap-12">
+ <h2 id={id} className="display max-w-[16ch] text-[36px] leading-[40px] text-ink md:text-[44px] md:leading-[50px]">
+ {title}
+ </h2>
+ {(lead || children) && (
+ <div className="flex max-w-md flex-col gap-4">
+ {lead && <p className="text-lg leading-7 text-ink-muted">{lead}</p>}
+ {children}
+ </div>
+ )}
+ </div>
+ );
+}
+
+export interface FeatureNote {
+ title: string;
+ text: string;
+}
+
+// three short notes under a feature panel, split by hairlines
+export function FeatureNotes({ notes }: { notes: FeatureNote[] }) {
+ return (
+ <div className="grid gap-6 md:grid-cols-3 md:gap-0">
+ {notes.map((note, i) => (
+ <div
+ key={note.title}
+ className={cn(
+ 'flex flex-col gap-2',
+ i > 0 && 'md:border-l md:border-line md:pl-6',
+ i < notes.length - 1 && 'md:pr-6',
+ )}
+ >
+ <h3 className="text-lg font-semibold text-ink">{note.title}</h3>
+ <p className="text-base leading-6 text-ink-muted">{note.text}</p>
+ </div>
+ ))}
+ </div>
+ );
+}
+
+export interface FeatureSectionProps {
+ id: string;
+ title: string;
+ lead: string;
+ notes: FeatureNote[];
+ placement?: RibbonPlacement;
+ tone?: 'fold' | 'dusk';
+ children: ReactNode;
+}
+
+// a headline, a wide brand panel holding one animated mockup, and three notes beneath
+export function FeatureSection({
+ id,
+ title,
+ lead,
+ notes,
+ placement = 'bottom-right',
+ tone = 'fold',
+ children,
+}: FeatureSectionProps) {
+ return (
+ <section
+ id={id}
+ aria-labelledby={`${id}-heading`}
+ className="container-page flex scroll-mt-24 flex-col gap-8 py-24 md:gap-12 md:py-32"
+ >
+ <SectionHeader id={`${id}-heading`} title={title} lead={lead} />
+ <FoldBand
+ tone={tone}
+ placement={placement}
+ className="flex min-h-[28rem] items-center justify-center rounded-[32px] px-4 py-10 sm:px-8 md:min-h-[34rem]"
+ >
+ {children}
+ </FoldBand>
+ <FeatureNotes notes={notes} />
+ </section>
+ );
+}
+
+export interface CtaBandProps {
+ title: string;
+ text: string;
+ primary: { label: string; href: string };
+ secondary: { label: string; href: string };
+}
+
+// the bordered call-to-action band between sections; buttons stay beside the text on wide screens and stack on phones
+export function CtaBand({ title, text, primary, secondary }: CtaBandProps) {
+ return (
+ <section className="container-page py-12 md:py-16">
+ <div className="flex flex-col gap-6 rounded-xl border border-line bg-surface-raised p-8 md:p-10 lg:flex-row lg:items-center lg:justify-between">
+ <div className="max-w-2xl">
+ <h2 className="display text-[26px] leading-8 text-ink md:text-[30px] md:leading-9">{title}</h2>
+ <p className="mt-3 text-base leading-7 text-ink-muted md:text-[17px]">{text}</p>
+ </div>
+ <div className="flex flex-col gap-3 sm:flex-row lg:shrink-0 lg:flex-nowrap">
+ <Pill href={primary.href} className="w-full sm:w-auto">
+ {primary.label}
+ </Pill>
+ <Pill href={secondary.href} variant="soft" className="w-full sm:w-auto">
+ {secondary.label}
+ </Pill>
+ </div>
+ </div>
+ </section>
+ );
+}
+
+export interface BentoCardProps {
+ title: string;
+ text: string;
+ placement?: RibbonPlacement;
+ tone?: 'fold' | 'dusk';
+ className?: string;
+ children: ReactNode;
+}
+
+// a grid card: a name and one line, then a brand panel with a small mockup cropped by its lower edge
+export function BentoCard({
+ title,
+ text,
+ placement = 'bottom-right',
+ tone = 'dusk',
+ className,
+ children,
+}: BentoCardProps) {
+ return (
+ <article className={cn('flex flex-col overflow-hidden rounded-xl border border-line bg-surface-raised', className)}>
+ <div className="px-6 pt-6 pb-5">
+ <h3 className="text-xl font-semibold text-ink">{title}</h3>
+ <p className="mt-1.5 text-[15px] leading-6 text-ink-muted">{text}</p>
+ </div>
+ <FoldBand
+ tone={tone}
+ placement={placement}
+ className="relative flex min-h-[19rem] flex-1 flex-col px-6 pt-6 sm:px-9 sm:pt-8"
+ >
+ {children}
+ </FoldBand>
+ </article>
+ );
+}
diff --git a/site/src/components/sections/storyWindows.tsx b/site/src/components/sections/storyWindows.tsx
new file mode 100644
index 0000000..f61cc04
--- /dev/null
+++ b/site/src/components/sections/storyWindows.tsx
@@ -0,0 +1,243 @@
+import { cn } from '@/lib/cn';
+import { CalendarMark, DocumentText, Gallery, Videocamera } from '@/components/icons';
+import { Bar, PlatformMark, Window } from '@/components/mockups/kit';
+
+// the scattered places a creator's numbers live today, one window each; sample data for the picture only
+
+const BOX = 'w-[40rem]';
+
+export function YouTubeStudioWindow() {
+ const bars = [38, 52, 47, 60, 66, 58, 74, 81, 77, 90];
+ return (
+ <Window url="studio.youtube.com" className={BOX} bodyClassName="p-5">
+ <div className="flex items-center gap-2">
+ <PlatformMark platform="youtube" className="size-5" />
+ <p className="font-display text-base font-semibold text-ink">Channel analytics</p>
+ </div>
+ <div className="mt-4 grid grid-cols-3 gap-3">
+ {[
+ ['Subscribers', '84,213'],
+ ['Views', '1.2M'],
+ ['Watch time', '41.8K h'],
+ ].map(([label, value]) => (
+ <div key={label} className="rounded-md border border-line p-3">
+ <p className="text-[11px] text-ink-muted">{label}</p>
+ <p className="mt-1 font-display text-lg font-semibold text-ink">{value}</p>
+ </div>
+ ))}
+ </div>
+ <div className="mt-4 flex h-36 items-end gap-2 rounded-md border border-line p-3">
+ {bars.map((h, i) => (
+ <span
+ key={i}
+ className={cn('flex-1 rounded-t-sm', i === bars.length - 1 ? 'bg-accent/70' : 'bg-line-strong/40')}
+ style={{ height: `${h}%` }}
+ />
+ ))}
+ </div>
+ <div className="mt-4 space-y-2.5">
+ <Bar className="w-3/4" />
+ <Bar className="w-1/2" />
+ </div>
+ </Window>
+ );
+}
+
+export function InstagramWindow() {
+ return (
+ <Window url="instagram.com/northwind.kitchen" className={BOX} bodyClassName="p-5">
+ <div className="flex items-center gap-4">
+ <span className="size-14 rounded-full bg-fold" />
+ <div className="flex gap-6 text-center">
+ {[
+ ['Posts', '312'],
+ ['Followers', '31.7K'],
+ ['Following', '208'],
+ ].map(([label, value]) => (
+ <div key={label}>
+ <p className="font-display text-base font-semibold text-ink">{value}</p>
+ <p className="text-[11px] text-ink-muted">{label}</p>
+ </div>
+ ))}
+ </div>
+ <PlatformMark platform="instagram" className="ml-auto size-5" />
+ </div>
+ <div className="mt-5 grid grid-cols-6 gap-1.5">
+ {Array.from({ length: 12 }, (_, i) => (
+ <span
+ key={i}
+ className={cn(
+ 'aspect-square rounded-sm',
+ i % 3 === 0 ? 'bg-accent/25' : i % 3 === 1 ? 'bg-afterglow/30' : 'bg-surface-sunken',
+ )}
+ />
+ ))}
+ </div>
+ </Window>
+ );
+}
+
+export function RedditWindow() {
+ return (
+ <Window url="reddit.com/user/northwind_cooks" className={BOX} bodyClassName="p-5">
+ <div className="flex items-center gap-3">
+ <PlatformMark platform="reddit" className="size-6" />
+ <p className="font-display text-base font-semibold text-ink">u/northwind_cooks</p>
+ <span className="ml-auto rounded-full bg-surface-sunken px-2.5 py-1 font-mono text-[11px] text-ink">
+ 12,410 karma
+ </span>
+ </div>
+ <ul className="mt-4 flex flex-col gap-2.5">
+ {[
+ 'One-pan lemon orzo, 20 minutes',
+ 'I baked bread every day for a month',
+ 'Cast iron care, the short version',
+ ].map((title, i) => (
+ <li key={title} className="flex items-center gap-3 rounded-md border border-line p-3">
+ <span className="flex w-10 flex-col items-center font-mono text-[11px] text-ink">
+ {[2400, 1100, 870][i]}
+ <span className="text-ink-muted">up</span>
+ </span>
+ <span className="min-w-0 flex-1">
+ <span className="block truncate text-[13px] font-medium text-ink">{title}</span>
+ <Bar className="mt-2 w-1/3" />
+ </span>
+ </li>
+ ))}
+ </ul>
+ </Window>
+ );
+}
+
+export function SheetWindow() {
+ const rows = [
+ ['Week 1', '81,960', '30,120', '11,880'],
+ ['Week 2', '82,700', '30,640', '12,010'],
+ ['Week 3', '83,310', '31,050', '12,190'],
+ ['Week 4', '84,213', '31,702', '12,410'],
+ ];
+ return (
+ <Window url="sheets: weekly numbers" className={BOX} bodyClassName="p-0">
+ <table className="w-full text-left font-mono text-[12px]">
+ <thead className="bg-surface-sunken text-ink-muted">
+ <tr>
+ {['', 'YouTube', 'Instagram', 'Reddit'].map(h => (
+ <th key={h} className="border-r border-b border-line px-3 py-2 font-medium last:border-r-0">
+ {h}
+ </th>
+ ))}
+ </tr>
+ </thead>
+ <tbody>
+ {rows.map(row => (
+ <tr key={row[0]}>
+ {row.map((cell, i) => (
+ <td
+ key={i}
+ className={cn(
+ 'border-r border-b border-line px-3 py-2.5 last:border-r-0',
+ i === 0 ? 'text-ink-muted' : 'text-ink',
+ )}
+ >
+ {cell}
+ </td>
+ ))}
+ </tr>
+ ))}
+ {Array.from({ length: 4 }, (_, i) => (
+ <tr key={i}>
+ {Array.from({ length: 4 }, (_, j) => (
+ <td key={j} className="h-9 border-r border-b border-line last:border-r-0" />
+ ))}
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </Window>
+ );
+}
+
+export function CalendarWindow() {
+ const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'];
+ return (
+ <Window url="calendar: posting plan" className={BOX} bodyClassName="p-5">
+ <div className="flex items-center gap-2">
+ <CalendarMark className="size-5 text-ink-muted" />
+ <p className="font-display text-base font-semibold text-ink">This week</p>
+ </div>
+ <div className="mt-4 grid grid-cols-5 gap-2">
+ {days.map((day, i) => (
+ <div key={day} className="flex h-40 flex-col gap-1.5 rounded-md border border-line p-2">
+ <span className="text-[11px] font-medium text-ink-muted">{day}</span>
+ {i % 2 === 0 && (
+ <span className="rounded-sm bg-accent-soft px-1.5 py-1 text-[10px] font-medium text-accent-text">
+ Reel 18:00
+ </span>
+ )}
+ {i === 1 && (
+ <span className="rounded-sm bg-afterglow-soft px-1.5 py-1 text-[10px] font-medium text-afterglow-text">
+ Story 12:30
+ </span>
+ )}
+ {i === 3 && (
+ <span className="rounded-sm bg-surface-sunken px-1.5 py-1 text-[10px] font-medium text-ink">
+ Video 16:00
+ </span>
+ )}
+ </div>
+ ))}
+ </div>
+ </Window>
+ );
+}
+
+export function FilesWindow() {
+ const files = [
+ 'lemon-orzo-reel.mp4',
+ 'bread-day-30.mp4',
+ 'cast-iron-story.jpg',
+ 'pantry-tour.mp4',
+ 'knife-skills-reel.mp4',
+ ];
+ return (
+ <Window url="files: reels to post" className={BOX} bodyClassName="p-3">
+ <ul className="flex flex-col">
+ {files.map((file, i) => (
+ <li
+ key={file}
+ className={cn('flex items-center gap-3 rounded-md px-3 py-2.5', i === 1 && 'bg-surface-sunken')}
+ >
+ {file.endsWith('.jpg') ? (
+ <Gallery className="size-5 text-ink-muted" />
+ ) : (
+ <Videocamera className="size-5 text-ink-muted" />
+ )}
+ <span className="flex-1 font-mono text-[12px] text-ink">{file}</span>
+ <span className="font-mono text-[11px] text-ink-muted">{[48, 61, 2, 37, 55][i]} MB</span>
+ </li>
+ ))}
+ </ul>
+ </Window>
+ );
+}
+
+export function NotesWindow() {
+ return (
+ <Window url="notes: what is working" className={BOX} bodyClassName="p-5">
+ <div className="flex items-center gap-2">
+ <DocumentText className="size-5 text-ink-muted" />
+ <p className="font-display text-base font-semibold text-ink">What is working?</p>
+ </div>
+ <ul className="mt-4 flex list-disc flex-col gap-2 pl-5 text-[13px] text-ink">
+ <li>Reels after 6 pm do better? Check again</li>
+ <li>Shorts views up, long videos flat</li>
+ <li>Which Reddit post brought the new subscribers?</li>
+ </ul>
+ <div className="mt-4 space-y-2.5">
+ <Bar className="w-2/3" />
+ <Bar className="w-1/2" />
+ <Bar className="w-3/5" />
+ </div>
+ </Window>
+ );
+}
diff --git a/site/src/docs/DocPage.tsx b/site/src/docs/DocPage.tsx
new file mode 100644
index 0000000..114603c
--- /dev/null
+++ b/site/src/docs/DocPage.tsx
@@ -0,0 +1,153 @@
+import { useEffect, useState } from 'react';
+import type { ComponentType } from 'react';
+import { Link, useLocation } from 'react-router';
+import { MDXProvider } from '@mdx-js/react';
+import { usePageMeta } from '@/lib/seo';
+import { DOCS_EDIT_URL, ISSUES_URL } from '@/lib/links';
+import { AltArrowLeft, AltArrowRight, DangerTriangleLine, Pen } from '@/components/icons';
+import { MDX_COMPONENTS } from './mdxComponents';
+import { docEntry, docNeighbours, slugFromPath } from './nav';
+import { Toc } from './Toc';
+
+interface DocModule {
+ default: ComponentType;
+ meta: { title: string; description: string };
+}
+
+// every page under content/docs, loaded when it is opened
+const PAGES = import.meta.glob<DocModule>('/content/docs/**/*.mdx');
+
+function fileFor(slug: string): string | undefined {
+ const candidates = slug
+ ? [`/content/docs/${slug}.mdx`, `/content/docs/${slug}/index.mdx`]
+ : ['/content/docs/index.mdx'];
+ return candidates.find(path => path in PAGES);
+}
+
+export default function DocPage() {
+ const { pathname } = useLocation();
+ const slug = slugFromPath(pathname);
+ const file = fileFor(slug);
+ const entry = docEntry(slug);
+ const [loaded, setLoaded] = useState<{ file: string; module: DocModule } | null>(null);
+ const [article, setArticle] = useState<HTMLElement | null>(null);
+
+ useEffect(() => {
+ if (!file) return;
+ let current = true;
+ PAGES[file]().then(module => current && setLoaded({ file, module }));
+ return () => {
+ current = false;
+ };
+ }, [file]);
+
+ const module = loaded && loaded.file === file ? loaded.module : null;
+ usePageMeta({
+ title: module?.meta.title ?? entry?.title ?? 'Page not found',
+ description: module?.meta.description ?? 'Twiligent documentation.',
+ path: pathname,
+ });
+
+ if (!file) {
+ return (
+ <article id="doc-content" className="min-w-0 flex-1 py-12">
+ <p className="eyebrow text-accent-text">Error 404</p>
+ <h1 className="display mt-3 text-[36px] leading-[42px] text-ink">This docs page is not here.</h1>
+ <p className="mt-4 text-lg text-ink-muted">
+ The link may be old. Use the search above, or{' '}
+ <Link to="/docs" className="font-medium text-accent-text underline underline-offset-4">
+ start from the docs home
+ </Link>
+ .
+ </p>
+ </article>
+ );
+ }
+
+ const { prev, next } = docNeighbours(slug);
+ const editPath = file.replace('/content/docs', '');
+ const Content = module?.default;
+ return (
+ <>
+ <article id="doc-content" ref={setArticle} className="min-w-0 flex-1 py-10 lg:max-w-[46rem]">
+ {entry && <p className="text-sm font-semibold text-accent-text">{entry.group.label}</p>}
+ <h1 className="display mt-2 text-[32px] leading-[40px] text-ink md:text-[36px] md:leading-[44px]">
+ {module?.meta.title ?? entry?.title}
+ </h1>
+ {/* until the page arrives, its space is held so nothing below it jumps */}
+ {module ? (
+ <p className="mt-3 text-lg leading-7 text-ink-muted">{module.meta.description}</p>
+ ) : (
+ <div className="mt-3 h-7" aria-hidden="true" />
+ )}
+ <div className="mt-8" aria-busy={!Content}>
+ {Content ? (
+ <MDXProvider components={MDX_COMPONENTS}>
+ <Content />
+ </MDXProvider>
+ ) : (
+ <div className="flex min-h-[100svh] flex-col gap-3" aria-hidden="true">
+ {[0, 1, 2, 3].map(i => (
+ <div
+ key={i}
+ className="h-4 animate-pulse rounded bg-surface-sunken"
+ style={{ width: `${92 - i * 14}%` }}
+ />
+ ))}
+ </div>
+ )}
+ </div>
+ {Content && (
+ <>
+ <div className="mt-14 flex flex-wrap gap-2 border-t border-line pt-6">
+ <a
+ href={`${DOCS_EDIT_URL}${editPath}`}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="inline-flex items-center gap-2 rounded-full border border-line px-3.5 py-1.5 text-sm text-ink-muted hover:border-line-strong hover:text-ink"
+ >
+ <Pen className="size-4" />
+ Suggest edits
+ </a>
+ <a
+ href={`${ISSUES_URL}?title=${encodeURIComponent(`Docs: ${entry?.title ?? slug}`)}`}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="inline-flex items-center gap-2 rounded-full border border-line px-3.5 py-1.5 text-sm text-ink-muted hover:border-line-strong hover:text-ink"
+ >
+ <DangerTriangleLine className="size-4" />
+ Raise issue
+ </a>
+ </div>
+
+ <nav aria-label="Previous and next page" className="mt-8 flex justify-between gap-4">
+ {prev ? (
+ <Link
+ to={prev.path}
+ className="flex items-center gap-1.5 text-[15px] font-semibold text-ink hover:text-accent-text"
+ >
+ <AltArrowLeft className="size-4" />
+ {prev.title}
+ </Link>
+ ) : (
+ <span />
+ )}
+ {next && (
+ <Link
+ to={next.path}
+ className="flex items-center gap-1.5 text-right text-[15px] font-semibold text-ink hover:text-accent-text"
+ >
+ {next.title}
+ <AltArrowRight className="size-4" />
+ </Link>
+ )}
+ </nav>
+ </>
+ )}
+ </article>
+ <aside className="sticky top-28 hidden h-[calc(100svh-7rem)] w-60 shrink-0 overflow-y-auto py-10 xl:block">
+ <Toc article={article} pageKey={`${file}:${module ? 'ready' : 'loading'}`} />
+ </aside>
+ </>
+ );
+}
diff --git a/site/src/docs/DocsLayout.tsx b/site/src/docs/DocsLayout.tsx
new file mode 100644
index 0000000..2089dc9
--- /dev/null
+++ b/site/src/docs/DocsLayout.tsx
@@ -0,0 +1,168 @@
+import { useEffect, useState } from 'react';
+import { Link, Outlet, useLocation } from 'react-router';
+import { cn } from '@/lib/cn';
+import { GITHUB_URL, SIGN_UP_URL } from '@/lib/links';
+import { AltArrowRight, CloseCircle, HamburgerMenu } from '@/components/icons';
+import { GitHubIcon } from '@/components/marks';
+import { Logo } from '@/components/brand';
+import { Pill } from '@/components/Pill';
+import { ThemeToggle } from '@/components/ThemeToggle';
+import { ScrollManager } from '@/components/ScrollManager';
+import { DOC_TABS, docEntry, slugFromPath } from './nav';
+import { DocsSidebar } from './DocsSidebar';
+import { Search } from './Search';
+
+// the docs frame from the Activepieces docs: a top bar with search, a row of tabs, the sidebar, the page and its outline
+export default function DocsLayout() {
+ const { pathname } = useLocation();
+ const entry = docEntry(slugFromPath(pathname));
+ const tab = entry?.tab ?? DOC_TABS[0];
+ const [drawer, setDrawer] = useState(false);
+
+ // the phone drawer closes on Escape like any dialog
+ useEffect(() => {
+ if (!drawer) return;
+ const onKey = (event: KeyboardEvent) => event.key === 'Escape' && setDrawer(false);
+ document.addEventListener('keydown', onKey);
+ return () => document.removeEventListener('keydown', onKey);
+ }, [drawer]);
+
+ return (
+ <div className="min-h-svh bg-surface">
+ <ScrollManager />
+ <a
+ href="#doc-content"
+ className="sr-only focus:not-sr-only focus:fixed focus:top-3 focus:left-3 focus:z-[60] focus:rounded-full focus:bg-surface-raised focus:px-4 focus:py-2"
+ >
+ Skip to content
+ </a>
+ <header className="sticky top-0 z-40 border-b border-line bg-surface/95 backdrop-blur-md">
+ <div className="mx-auto flex h-16 max-w-[1440px] items-center gap-4 px-4 md:px-8">
+ <Link to="/docs" aria-label="Twiligent docs home" className="flex shrink-0 items-center gap-2">
+ <Logo className="h-6" />
+ <span className="rounded-full bg-surface-sunken px-2 py-0.5 text-xs font-semibold text-ink-muted">
+ Docs
+ </span>
+ </Link>
+ <Search className="mx-auto hidden w-full max-w-md md:block" />
+ <div className="ml-auto flex items-center gap-1 md:ml-0">
+ <a
+ href={GITHUB_URL}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="hidden items-center gap-2 rounded-full px-3 py-2 text-sm font-medium text-ink-muted hover:text-ink lg:flex"
+ >
+ <GitHubIcon className="size-4" />
+ GitHub
+ </a>
+ <Link
+ to="/"
+ className="hidden rounded-full px-3 py-2 text-sm font-medium text-ink-muted hover:text-ink lg:block"
+ >
+ Twiligent home
+ </Link>
+ <span className="ml-1 hidden sm:inline-flex">
+ <Pill href={SIGN_UP_URL} size="sm" className="pr-3">
+ Get started
+ <AltArrowRight className="size-4" />
+ </Pill>
+ </span>
+ <ThemeToggle />
+ </div>
+ </div>
+ <nav
+ aria-label="Docs sections"
+ className="mx-auto hidden h-12 max-w-[1440px] items-end gap-6 px-4 md:flex md:px-8"
+ >
+ {DOC_TABS.map(t => {
+ const first = t.groups[0].pages[0];
+ return (
+ <Link
+ key={t.id}
+ to={first.slug ? `/docs/${first.slug}` : '/docs'}
+ aria-current={t.id === tab.id ? 'true' : undefined}
+ className={cn(
+ 'border-b-2 pb-3 text-[15px] font-medium transition-colors',
+ t.id === tab.id ? 'border-accent text-ink' : 'border-transparent text-ink-muted hover:text-ink',
+ )}
+ >
+ {t.label}
+ </Link>
+ );
+ })}
+ </nav>
+ <div className="flex h-12 items-center gap-3 border-t border-line px-4 md:hidden">
+ <button
+ type="button"
+ onClick={() => setDrawer(true)}
+ aria-label="Open the docs menu"
+ aria-expanded={drawer}
+ className="flex size-9 items-center justify-center rounded-md text-ink hover:bg-surface-sunken"
+ >
+ <HamburgerMenu className="size-5" />
+ </button>
+ <p className="flex min-w-0 items-center gap-1.5 truncate text-sm">
+ <span className="text-ink-muted">{entry?.group.label ?? tab.label}</span>
+ <AltArrowRight className="size-3.5 shrink-0 text-ink-muted" />
+ <span className="truncate font-medium text-ink">{entry?.title ?? 'Docs'}</span>
+ </p>
+ </div>
+ </header>
+
+ {drawer && (
+ <div className="fixed inset-0 z-50 md:hidden" role="dialog" aria-modal="true" aria-label="Docs menu">
+ <button
+ type="button"
+ aria-label="Close the docs menu"
+ className="absolute inset-0 bg-dusk/60"
+ onClick={() => setDrawer(false)}
+ />
+ <div className="relative flex h-full w-[min(20rem,85vw)] flex-col gap-6 overflow-y-auto bg-surface px-3 py-4 shadow-lg">
+ <div className="flex items-center justify-between px-3">
+ <Logo className="h-6" />
+ <button
+ type="button"
+ onClick={() => setDrawer(false)}
+ aria-label="Close the docs menu"
+ className="flex size-9 items-center justify-center rounded-md text-ink hover:bg-surface-sunken"
+ >
+ <CloseCircle className="size-6" />
+ </button>
+ </div>
+ <Search className="px-3" />
+ <nav aria-label="Docs sections" className="flex flex-wrap gap-2 px-3">
+ {DOC_TABS.map(t => {
+ const first = t.groups[0].pages[0];
+ return (
+ <Link
+ key={t.id}
+ to={first.slug ? `/docs/${first.slug}` : '/docs'}
+ onClick={() => setDrawer(false)}
+ className={cn(
+ 'rounded-full px-3 py-1 text-sm',
+ t.id === tab.id
+ ? 'bg-accent-soft font-medium text-accent-text'
+ : 'bg-surface-sunken text-ink-muted',
+ )}
+ >
+ {t.label}
+ </Link>
+ );
+ })}
+ </nav>
+ <DocsSidebar tab={tab} current={entry} onNavigate={() => setDrawer(false)} />
+ </div>
+ </div>
+ )}
+
+ <div className="mx-auto flex max-w-[1440px] gap-10 px-4 md:px-8">
+ <aside className="sticky top-28 hidden h-[calc(100svh-7rem)] w-64 shrink-0 overflow-y-auto py-8 pr-2 md:block">
+ <DocsSidebar tab={tab} current={entry} />
+ </aside>
+ <main className="flex min-w-0 flex-1 gap-10">
+ <Outlet />
+ </main>
+ </div>
+ </div>
+ );
+}
diff --git a/site/src/docs/DocsSidebar.tsx b/site/src/docs/DocsSidebar.tsx
new file mode 100644
index 0000000..7bbb7a7
--- /dev/null
+++ b/site/src/docs/DocsSidebar.tsx
@@ -0,0 +1,46 @@
+import { Link } from 'react-router';
+import { cn } from '@/lib/cn';
+import type { DocEntry, DocTab } from './nav';
+
+export interface DocsSidebarProps {
+ tab: DocTab;
+ current: DocEntry | undefined;
+ onNavigate?: () => void;
+}
+
+// the groups and pages of the open tab, as in the Activepieces docs: a label per group and an icon per page
+export function DocsSidebar({ tab, current, onNavigate }: DocsSidebarProps) {
+ return (
+ <nav aria-label={`${tab.label} pages`} className="flex flex-col gap-7">
+ {tab.groups.map(group => (
+ <div key={group.label}>
+ <p className="px-3 pb-2 text-sm font-semibold text-ink">{group.label}</p>
+ <ul className="flex flex-col gap-0.5">
+ {group.pages.map(page => {
+ const Icon = page.icon;
+ const active = current?.slug === page.slug;
+ return (
+ <li key={page.slug}>
+ <Link
+ to={page.slug ? `/docs/${page.slug}` : '/docs'}
+ onClick={onNavigate}
+ aria-current={active ? 'page' : undefined}
+ className={cn(
+ 'flex items-center gap-3 rounded-md px-3 py-1.5 text-[15px] transition-colors',
+ active
+ ? 'bg-accent-soft font-medium text-accent-text'
+ : 'text-ink-muted hover:bg-surface-sunken hover:text-ink',
+ )}
+ >
+ <Icon className="size-[18px] shrink-0" />
+ {page.title}
+ </Link>
+ </li>
+ );
+ })}
+ </ul>
+ </div>
+ ))}
+ </nav>
+ );
+}
diff --git a/site/src/docs/Search.tsx b/site/src/docs/Search.tsx
new file mode 100644
index 0000000..62a12d2
--- /dev/null
+++ b/site/src/docs/Search.tsx
@@ -0,0 +1,166 @@
+import { useEffect, useRef, useState } from 'react';
+import { useNavigate } from 'react-router';
+import MiniSearch from 'minisearch';
+import { cn } from '@/lib/cn';
+import { AltArrowRight, Hashtag, Magnifer } from '@/components/icons';
+import { SEARCH_OPTIONS } from './searchShared';
+import type { SearchDocument } from './searchShared';
+
+type Result = Pick<SearchDocument, 'href' | 'title' | 'page'> & { id: string };
+
+let index: MiniSearch<SearchDocument> | null = null;
+
+// the index is built at build time and loaded the first time someone searches
+async function loadIndex(): Promise<MiniSearch<SearchDocument>> {
+ if (!index) {
+ const { default: json } = await import('virtual:docs-search');
+ index = MiniSearch.loadJSON<SearchDocument>(json, SEARCH_OPTIONS);
+ }
+ return index;
+}
+
+const IS_MAC = typeof navigator !== 'undefined' && /Mac|iPhone|iPad/.test(navigator.platform);
+
+export interface SearchProps {
+ className?: string;
+}
+
+// the search box in the docs top bar; Ctrl K or Cmd K opens it, and results drop down beneath it as on the Activepieces docs
+export function Search({ className }: SearchProps) {
+ const navigate = useNavigate();
+ const input = useRef<HTMLInputElement>(null);
+ const [open, setOpen] = useState(false);
+ const [query, setQuery] = useState('');
+ const [results, setResults] = useState<Result[]>([]);
+ const [selected, setSelected] = useState(0);
+
+ useEffect(() => {
+ const onKey = (event: KeyboardEvent) => {
+ if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'k') {
+ event.preventDefault();
+ setOpen(true);
+ input.current?.focus();
+ }
+ };
+ document.addEventListener('keydown', onKey);
+ return () => document.removeEventListener('keydown', onKey);
+ }, []);
+
+ useEffect(() => {
+ if (!query.trim()) return;
+ let current = true;
+ loadIndex().then(search => {
+ if (!current) return;
+ setResults(
+ search
+ .search(query)
+ .slice(0, 8)
+ .map(r => ({ id: String(r.id), href: r.href as string, title: r.title as string, page: r.page as string })),
+ );
+ setSelected(0);
+ });
+ return () => {
+ current = false;
+ };
+ }, [query]);
+
+ function go(result: Result | undefined) {
+ if (!result) return;
+ setOpen(false);
+ setQuery('');
+ input.current?.blur();
+ navigate(result.href);
+ }
+
+ function onKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {
+ if (event.key === 'ArrowDown') {
+ event.preventDefault();
+ setSelected(s => Math.min(s + 1, visible.length - 1));
+ } else if (event.key === 'ArrowUp') {
+ event.preventDefault();
+ setSelected(s => Math.max(s - 1, 0));
+ } else if (event.key === 'Enter') {
+ go(visible[selected]);
+ } else if (event.key === 'Escape') {
+ setOpen(false);
+ input.current?.blur();
+ }
+ }
+
+ // an empty box shows nothing, whatever the last search found
+ const showResults = open && query.trim().length > 0;
+ const visible = showResults ? results : [];
+ return (
+ <div
+ className={cn('relative', className)}
+ onBlur={event => !event.currentTarget.contains(event.relatedTarget) && setOpen(false)}
+ >
+ <label className="flex h-9 items-center gap-2 rounded-md border border-line bg-surface-raised px-3 text-sm text-ink-muted transition-colors focus-within:border-line-strong">
+ <Magnifer className="size-4 shrink-0" />
+ <span className="sr-only">Search the docs</span>
+ <input
+ ref={input}
+ type="search"
+ role="combobox"
+ aria-expanded={showResults}
+ aria-controls="docs-search-results"
+ aria-activedescendant={visible[selected] ? `result-${selected}` : undefined}
+ value={query}
+ onChange={event => {
+ setQuery(event.target.value);
+ setOpen(true);
+ }}
+ onFocus={() => setOpen(true)}
+ onKeyDown={onKeyDown}
+ placeholder="Search..."
+ className="min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink-muted [&::-webkit-search-cancel-button]:hidden"
+ />
+ <kbd className="hidden shrink-0 font-sans text-xs font-semibold text-ink-muted sm:inline">
+ {IS_MAC ? 'Cmd K' : 'Ctrl K'}
+ </kbd>
+ </label>
+ {showResults && (
+ <div className="absolute inset-x-0 top-11 z-50 overflow-hidden rounded-lg border border-line bg-surface-raised shadow-lg">
+ {visible.length === 0 ? (
+ <p className="px-4 py-6 text-center text-sm text-ink-muted">
+ No pages match "{query}". Try a shorter word.
+ </p>
+ ) : (
+ <ul id="docs-search-results" role="listbox" className="max-h-[60vh] overflow-y-auto p-1.5">
+ {visible.map((result, i) => (
+ <li key={result.id} id={`result-${i}`} role="option" aria-selected={i === selected}>
+ <button
+ type="button"
+ onMouseEnter={() => setSelected(i)}
+ onClick={() => go(result)}
+ className={cn(
+ 'flex w-full items-start gap-3 rounded-md px-3 py-2.5 text-left',
+ i === selected && 'bg-surface-sunken',
+ )}
+ >
+ <Hashtag className="mt-0.5 size-4 shrink-0 text-ink-muted" />
+ <span className="flex min-w-0 flex-col">
+ <span className="truncate text-sm font-semibold text-ink">{result.title}</span>
+ {result.title !== result.page && (
+ <span className="flex items-center gap-1 truncate text-xs text-ink-muted">
+ {result.page}
+ <AltArrowRight className="size-3" />
+ {result.title}
+ </span>
+ )}
+ </span>
+ </button>
+ </li>
+ ))}
+ </ul>
+ )}
+ <p className="flex items-center gap-4 border-t border-line px-4 py-2 text-xs text-ink-muted">
+ <span>Up and down to select</span>
+ <span>Enter to open</span>
+ <span className="ml-auto">Esc to close</span>
+ </p>
+ </div>
+ )}
+ </div>
+ );
+}
diff --git a/site/src/docs/Toc.tsx b/site/src/docs/Toc.tsx
new file mode 100644
index 0000000..84cb9fc
--- /dev/null
+++ b/site/src/docs/Toc.tsx
@@ -0,0 +1,65 @@
+import { useEffect, useState } from 'react';
+import { cn } from '@/lib/cn';
+import { List } from '@/components/icons';
+
+interface TocItem {
+ id: string;
+ text: string;
+ level: number;
+}
+
+export interface TocProps {
+ // the rendered article, read once its MDX has loaded
+ article: HTMLElement | null;
+ // changes with each page, so the list is read again
+ pageKey: string;
+}
+
+// "On this page": the h2 and h3 headings, with the one being read lit as the reader scrolls
+export function Toc({ article, pageKey }: TocProps) {
+ const [items, setItems] = useState<TocItem[]>([]);
+ const [active, setActive] = useState('');
+
+ useEffect(() => {
+ if (!article) return;
+ const headings = [...article.querySelectorAll<HTMLElement>('[data-toc]')];
+ // eslint-disable-next-line react-hooks/set-state-in-effect -- the list comes from the DOM the MDX rendered
+ setItems(headings.map(h => ({ id: h.id, text: h.textContent?.trim() ?? '', level: Number(h.dataset.toc) })));
+ const observer = new IntersectionObserver(
+ entries => {
+ const visible = entries
+ .filter(e => e.isIntersecting)
+ .sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top);
+ if (visible[0]) setActive(visible[0].target.id);
+ },
+ { rootMargin: '-96px 0px -66% 0px' },
+ );
+ headings.forEach(h => observer.observe(h));
+ return () => observer.disconnect();
+ }, [article, pageKey]);
+
+ if (items.length === 0) return null;
+ return (
+ <nav aria-label="On this page" className="flex flex-col gap-3">
+ <p className="flex items-center gap-2 text-sm font-semibold text-ink">
+ <List className="size-4" />
+ On this page
+ </p>
+ <ul className="flex flex-col gap-2.5 text-sm">
+ {items.map(item => (
+ <li key={item.id} className={cn(item.level === 3 && 'pl-4')}>
+ <a
+ href={`#${item.id}`}
+ className={cn(
+ 'transition-colors',
+ active === item.id ? 'font-medium text-accent-text' : 'text-ink-muted hover:text-ink',
+ )}
+ >
+ {item.text}
+ </a>
+ </li>
+ ))}
+ </ul>
+ </nav>
+ );
+}
diff --git a/site/src/docs/mdx.tsx b/site/src/docs/mdx.tsx
new file mode 100644
index 0000000..e73eeff
--- /dev/null
+++ b/site/src/docs/mdx.tsx
@@ -0,0 +1,245 @@
+import { Children, isValidElement, useRef, useState } from 'react';
+import type { ComponentPropsWithoutRef, ReactNode } from 'react';
+import { Link } from 'react-router';
+import {
+ ArrowRight,
+ CheckCircle,
+ Copy,
+ DangerTriangle,
+ InfoCircle,
+ Lightbulb,
+ LinkMinimalistic,
+ ShieldWarning,
+} from '@/components/icons';
+import type { Icon } from '@/components/icons';
+import { cn } from '@/lib/cn';
+import { RibbonCrop } from '@/components/brand';
+import { slugify } from './searchShared';
+
+// the plain text inside a heading, for its anchor id
+function textOf(node: ReactNode): string {
+ if (typeof node === 'string' || typeof node === 'number') return String(node);
+ if (Array.isArray(node)) return node.map(textOf).join('');
+ if (isValidElement<{ children?: ReactNode }>(node)) return textOf(node.props.children);
+ return '';
+}
+
+export function Heading({ level, children }: { level: 2 | 3; children?: ReactNode }) {
+ const id = slugify(textOf(children));
+ const Tag = level === 2 ? 'h2' : 'h3';
+ return (
+ <Tag
+ id={id}
+ data-toc={level}
+ className={cn(
+ 'group display scroll-mt-32 text-ink',
+ level === 2 ? 'mt-12 mb-4 text-2xl leading-8' : 'mt-8 mb-3 text-[19px] leading-[26px]',
+ )}
+ >
+ {children}
+ <a
+ href={`#${id}`}
+ className="ml-2 inline-flex align-middle text-ink-muted opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100"
+ aria-label={`Link to ${textOf(children)}`}
+ >
+ <LinkMinimalistic className="size-4" />
+ </a>
+ </Tag>
+ );
+}
+
+export function DocLink({ href = '', children, ...props }: ComponentPropsWithoutRef<'a'>) {
+ const cls =
+ 'font-medium text-accent-text underline decoration-accent-text/40 underline-offset-4 transition-colors hover:decoration-accent-text';
+ if (href.startsWith('/') && !href.startsWith('//'))
+ return (
+ <Link to={href} className={cls}>
+ {children}
+ </Link>
+ );
+ if (href.startsWith('#'))
+ return (
+ <a href={href} className={cls} {...props}>
+ {children}
+ </a>
+ );
+ return (
+ <a href={href} target="_blank" rel="noopener noreferrer" className={cls} {...props}>
+ {children}
+ </a>
+ );
+}
+
+// shiki's highlighted block with a copy button in its corner
+export function CodeBlock(props: ComponentPropsWithoutRef<'pre'>) {
+ const ref = useRef<HTMLPreElement>(null);
+ const [copied, setCopied] = useState(false);
+ async function copy() {
+ try {
+ await navigator.clipboard.writeText(ref.current?.textContent ?? '');
+ setCopied(true);
+ setTimeout(() => setCopied(false), 1500);
+ } catch {
+ setCopied(false);
+ }
+ }
+ return (
+ <div className="group relative my-6">
+ <pre
+ ref={ref}
+ {...props}
+ className={cn(
+ props.className,
+ 'overflow-x-auto rounded-lg border border-line bg-surface-sunken! py-4 pr-14 pl-4 font-mono text-[13.5px] leading-[22px]',
+ )}
+ />
+ <button
+ type="button"
+ onClick={copy}
+ aria-label={copied ? 'Copied' : 'Copy code'}
+ className="absolute top-2.5 right-2.5 inline-flex size-8 items-center justify-center rounded-md border border-line bg-surface-raised text-ink-muted transition-colors hover:text-ink"
+ >
+ {copied ? <CheckCircle className="size-4 text-success" /> : <Copy className="size-4" />}
+ </button>
+ </div>
+ );
+}
+
+export function InlineCode(props: ComponentPropsWithoutRef<'code'>) {
+ // inside a highlighted block shiki styles the code itself
+ if (typeof props.className === 'string' || Children.toArray(props.children).some(child => typeof child !== 'string'))
+ return <code {...props} />;
+ return (
+ <code
+ className="rounded-sm border border-line bg-surface-sunken px-1.5 py-0.5 font-mono text-[0.85em] text-ink"
+ {...props}
+ />
+ );
+}
+
+export type CalloutType = 'note' | 'tip' | 'warning' | 'danger';
+
+const CALLOUTS: Record<CalloutType, { icon: Icon; box: string; tint: string; label: string }> = {
+ note: { icon: InfoCircle, box: 'border-info/30 bg-info-soft', tint: 'text-info', label: 'Note' },
+ tip: { icon: Lightbulb, box: 'border-success/30 bg-success-soft', tint: 'text-success', label: 'Tip' },
+ warning: {
+ icon: DangerTriangle,
+ box: 'border-afterglow-text/30 bg-afterglow-soft',
+ tint: 'text-afterglow-text',
+ label: 'Warning',
+ },
+ danger: {
+ icon: ShieldWarning,
+ box: 'border-accent-text/30 bg-accent-soft',
+ tint: 'text-accent-text',
+ label: 'Important',
+ },
+};
+
+export interface CalloutProps {
+ type?: CalloutType;
+ title?: ReactNode;
+ children?: ReactNode;
+}
+
+export function Callout({ type = 'note', title, children }: CalloutProps) {
+ const callout = CALLOUTS[type];
+ const Icon = callout.icon;
+ return (
+ <div role="note" className={cn('my-6 flex gap-3 rounded-lg border px-4 py-3.5', callout.box)}>
+ <Icon className={cn('mt-1 size-4 shrink-0', callout.tint)} aria-hidden="true" />
+ <div className="flex min-w-0 flex-col gap-1.5 text-[15px] leading-6 text-ink [&_p]:m-0 [&_strong]:font-semibold">
+ <span className="sr-only">{callout.label}: </span>
+ {title && <p className="font-semibold">{title}</p>}
+ {children}
+ </div>
+ </div>
+ );
+}
+
+export function Steps({ children }: { children?: ReactNode }) {
+ return <ol className="my-8 flex flex-col [counter-reset:step]">{children}</ol>;
+}
+
+export interface StepProps {
+ title: string;
+ children?: ReactNode;
+}
+
+export function Step({ title, children }: StepProps) {
+ return (
+ <li className="relative flex gap-4 pb-8 [counter-increment:step] before:absolute before:top-10 before:bottom-1 before:left-4 before:w-px before:bg-line last:pb-0 last:before:hidden">
+ <span
+ aria-hidden="true"
+ className="flex size-8 shrink-0 items-center justify-center rounded-full border border-line bg-surface-raised font-mono text-sm font-medium text-ink before:content-[counter(step)]"
+ />
+ <div className="flex min-w-0 flex-1 flex-col pt-1">
+ <h2 id={slugify(title)} data-toc="2" className="display scroll-mt-32 text-[17px] leading-7 text-ink">
+ {title}
+ </h2>
+ <div className="text-base leading-7 text-ink-muted [&>*:first-child]:mt-2 [&_p]:my-3 [&_strong]:font-semibold [&_strong]:text-ink">
+ {children}
+ </div>
+ </div>
+ </li>
+ );
+}
+
+export function Cards({ children }: { children?: ReactNode }) {
+ return <div className="my-8 grid grid-cols-1 gap-4 md:grid-cols-3">{children}</div>;
+}
+
+export interface CardProps {
+ href: string;
+ title: string;
+ // which corner the ribbon crop bleeds off, so neighbouring cards differ
+ art?: 0 | 1 | 2;
+ children?: ReactNode;
+}
+
+const CARD_ART = ['bottom-right', 'top-left', 'bottom-left'] as const;
+
+export function Card({ href, title, art = 0, children }: CardProps) {
+ return (
+ <Link
+ to={href}
+ className="group flex flex-col overflow-hidden rounded-lg border border-line bg-surface-raised transition-colors hover:border-line-strong"
+ >
+ <div className={cn('relative h-28 overflow-hidden', art === 1 ? 'bg-dusk-panel' : 'bg-fold')}>
+ <RibbonCrop placement={CARD_ART[art]} size="w-[70%]" />
+ </div>
+ <div className="flex flex-1 flex-col gap-1.5 p-5">
+ <p className="display flex items-center gap-1.5 text-lg text-ink">
+ {title}
+ <ArrowRight
+ className="size-4 text-ink-muted transition-transform group-hover:translate-x-0.5"
+ aria-hidden="true"
+ />
+ </p>
+ <div className="text-[15px] leading-6 text-ink-muted [&_p]:m-0">{children}</div>
+ </div>
+ </Link>
+ );
+}
+
+export type BadgeTone = 'neutral' | 'required' | 'optional' | 'secret';
+
+const BADGES: Record<BadgeTone, string> = {
+ neutral: 'bg-surface-sunken text-ink-muted',
+ required: 'bg-accent-soft text-accent-text',
+ optional: 'bg-info-soft text-info',
+ secret: 'bg-afterglow-soft text-afterglow-text',
+};
+
+export function Badge({ tone = 'neutral', children }: { tone?: BadgeTone; children?: ReactNode }) {
+ return (
+ <span
+ className={cn(
+ 'inline-flex h-5 items-center rounded-full px-2 text-xs font-semibold whitespace-nowrap',
+ BADGES[tone],
+ )}
+ >
+ {children}
+ </span>
+ );
+}
diff --git a/site/src/docs/mdxComponents.tsx b/site/src/docs/mdxComponents.tsx
new file mode 100644
index 0000000..a22e811
--- /dev/null
+++ b/site/src/docs/mdxComponents.tsx
@@ -0,0 +1,43 @@
+import type { MDXComponents } from 'mdx/types';
+import { Badge, Callout, Card, Cards, CodeBlock, DocLink, Heading, InlineCode, Step, Steps } from './mdx';
+
+// every MDX page renders through these, so the content files stay plain Markdown with a few named components
+export const MDX_COMPONENTS: MDXComponents = {
+ h2: ({ children }) => <Heading level={2}>{children}</Heading>,
+ h3: ({ children }) => <Heading level={3}>{children}</Heading>,
+ p: props => (
+ <p className="my-4 text-base leading-7 text-ink-muted [&_strong]:font-semibold [&_strong]:text-ink" {...props} />
+ ),
+ ul: props => (
+ <ul
+ className="my-4 flex list-disc flex-col gap-2 pl-6 text-base leading-7 text-ink-muted marker:text-line-strong"
+ {...props}
+ />
+ ),
+ ol: props => (
+ <ol
+ className="my-4 flex list-decimal flex-col gap-2 pl-6 text-base leading-7 text-ink-muted marker:text-ink-muted"
+ {...props}
+ />
+ ),
+ strong: props => <strong className="font-semibold text-ink" {...props} />,
+ a: DocLink,
+ pre: CodeBlock,
+ code: InlineCode,
+ hr: () => <hr className="my-10 border-line" />,
+ table: props => (
+ <div className="my-6 overflow-x-auto rounded-lg border border-line">
+ <table className="w-full min-w-[34rem] text-left text-sm leading-6" {...props} />
+ </div>
+ ),
+ thead: props => <thead className="border-b border-line bg-surface-sunken" {...props} />,
+ th: props => <th className="px-4 py-2.5 font-semibold text-ink" {...props} />,
+ tr: props => <tr className="border-b border-line align-top last:border-0" {...props} />,
+ td: props => <td className="px-4 py-3 text-ink-muted [&_strong]:font-semibold [&_strong]:text-ink" {...props} />,
+ Callout,
+ Steps,
+ Step,
+ Cards,
+ Card,
+ Badge,
+};
diff --git a/site/src/docs/nav.ts b/site/src/docs/nav.ts
new file mode 100644
index 0000000..eaffd13
--- /dev/null
+++ b/site/src/docs/nav.ts
@@ -0,0 +1,157 @@
+import type { ComponentType } from 'react';
+import {
+ Book,
+ Bookmark,
+ Calendar,
+ Chart,
+ ChatDots,
+ Checklist,
+ Cloud,
+ CloudUpload,
+ CodeFile,
+ Database,
+ Gallery,
+ Key,
+ Letter,
+ Login,
+ Plane,
+ Plug,
+ QuestionCircle,
+ Server,
+ ServerSquare,
+ ShieldCheck,
+ UsersGroup,
+} from '@/components/icons';
+import { GitHubIcon, InstagramIcon, YouTubeIcon } from '@/components/marks';
+
+// the docs tabs, sidebar groups and pages; each page is content/docs/<slug>.mdx, and '' is index.mdx
+
+export interface DocPage {
+ slug: string;
+ title: string;
+ icon: ComponentType<{ className?: string }>;
+}
+
+export interface DocGroup {
+ label: string;
+ pages: DocPage[];
+}
+
+export interface DocTab {
+ id: string;
+ label: string;
+ groups: DocGroup[];
+}
+
+export const DOC_TABS: DocTab[] = [
+ {
+ id: 'overview',
+ label: 'Overview',
+ groups: [
+ {
+ label: 'Overview',
+ pages: [
+ { slug: '', title: 'Introduction', icon: Book },
+ { slug: 'concepts', title: 'Members and administrators', icon: UsersGroup },
+ ],
+ },
+ ],
+ },
+ {
+ id: 'use',
+ label: 'Using Twiligent',
+ groups: [
+ {
+ label: 'Get started',
+ pages: [
+ { slug: 'use/getting-started', title: 'Sign in and first steps', icon: Login },
+ { slug: 'use/connect-accounts', title: 'Connect your accounts', icon: Plug },
+ ],
+ },
+ {
+ label: 'Work with Twiligent',
+ pages: [
+ { slug: 'use/analytics', title: 'Read your analytics', icon: Chart },
+ { slug: 'use/publishing', title: 'Publish and schedule', icon: Plane },
+ { slug: 'use/tracked-content', title: 'Track content', icon: Bookmark },
+ ],
+ },
+ {
+ label: 'Help',
+ pages: [{ slug: 'use/troubleshooting', title: 'Troubleshooting', icon: QuestionCircle }],
+ },
+ ],
+ },
+ {
+ id: 'self-host',
+ label: 'Run your own',
+ groups: [
+ {
+ label: 'Plan',
+ pages: [{ slug: 'self-host', title: 'Self-hosting overview', icon: Server }],
+ },
+ {
+ label: 'Set up services',
+ pages: [
+ { slug: 'self-host/supabase', title: 'Supabase', icon: Database },
+ { slug: 'self-host/google-sign-in', title: 'Sign in with Google (optional)', icon: Key },
+ { slug: 'self-host/email-codes', title: 'Email verification codes (optional)', icon: Letter },
+ { slug: 'self-host/youtube', title: 'YouTube API key', icon: YouTubeIcon },
+ { slug: 'self-host/instagram', title: 'Instagram app', icon: InstagramIcon },
+ { slug: 'self-host/cloudinary', title: 'Cloudinary', icon: Gallery },
+ { slug: 'self-host/redis', title: 'Upstash Redis (optional)', icon: ServerSquare },
+ ],
+ },
+ {
+ label: 'Deploy',
+ pages: [
+ { slug: 'self-host/deploy-backend', title: 'Deploy the backend', icon: Cloud },
+ { slug: 'self-host/deploy-frontend', title: 'Deploy the frontend', icon: CloudUpload },
+ { slug: 'self-host/github', title: 'GitHub automation', icon: GitHubIcon },
+ { slug: 'self-host/checklist', title: 'Launch checklist', icon: Checklist },
+ ],
+ },
+ ],
+ },
+ {
+ id: 'reference',
+ label: 'Reference',
+ groups: [
+ {
+ label: 'Reference',
+ pages: [
+ { slug: 'reference/environment', title: 'Environment variables', icon: CodeFile },
+ { slug: 'reference/scheduling', title: 'How scheduling works', icon: Calendar },
+ { slug: 'reference/security', title: 'Security', icon: ShieldCheck },
+ { slug: 'reference/faq', title: 'FAQ', icon: ChatDots },
+ ],
+ },
+ ],
+ },
+];
+
+export interface DocEntry extends DocPage {
+ tab: DocTab;
+ group: DocGroup;
+ path: string;
+}
+
+const DOC_ENTRIES: DocEntry[] = DOC_TABS.flatMap(tab =>
+ tab.groups.flatMap(group =>
+ group.pages.map(page => ({ ...page, tab, group, path: page.slug ? `/docs/${page.slug}` : '/docs' })),
+ ),
+);
+
+export function docEntry(slug: string): DocEntry | undefined {
+ return DOC_ENTRIES.find(entry => entry.slug === slug);
+}
+
+export function docNeighbours(slug: string): { prev: DocEntry | null; next: DocEntry | null } {
+ const index = DOC_ENTRIES.findIndex(entry => entry.slug === slug);
+ return { prev: DOC_ENTRIES[index - 1] ?? null, next: DOC_ENTRIES[index + 1] ?? null };
+}
+
+// the slug of a docs URL: /docs/self-host/redis -> self-host/redis, /docs -> ''
+export function slugFromPath(pathname: string): string {
+ return pathname.replace(/^\/docs\/?/, '').replace(/\/$/, '');
+}
diff --git a/site/src/docs/searchShared.ts b/site/src/docs/searchShared.ts
new file mode 100644
index 0000000..3e93501
--- /dev/null
+++ b/site/src/docs/searchShared.ts
@@ -0,0 +1,27 @@
+// shared by the build plugin that writes the index and the browser code that reads it, so both agree
+
+export interface SearchDocument {
+ id: string;
+ // the page path, with the heading anchor for a section: docs/self-host/redis#create-a-database
+ href: string;
+ // the heading, or the page title for the part above the first heading
+ title: string;
+ page: string;
+ text: string;
+}
+
+export const SEARCH_OPTIONS = {
+ fields: ['title', 'page', 'text'],
+ storeFields: ['href', 'title', 'page'],
+ searchOptions: { boost: { title: 3, page: 1.5 }, prefix: true, fuzzy: 0.2 },
+};
+
+// heading text to an anchor id: lowercase words joined by hyphens
+export function slugify(text: string): string {
+ return text
+ .toLowerCase()
+ .replace(/[^a-z0-9\s-]/g, '')
+ .trim()
+ .replace(/\s+/g, '-')
+ .replace(/-+/g, '-');
+}
diff --git a/site/src/docs/virtual.d.ts b/site/src/docs/virtual.d.ts
new file mode 100644
index 0000000..8694d0a
--- /dev/null
+++ b/site/src/docs/virtual.d.ts
@@ -0,0 +1,5 @@
+// written by build/docsPlugin.ts: the serialised MiniSearch index of every docs section
+declare module 'virtual:docs-search' {
+ const json: string;
+ export default json;
+}
diff --git a/site/src/hooks/useAutoplay.ts b/site/src/hooks/useAutoplay.ts
new file mode 100644
index 0000000..5a7d6ee
--- /dev/null
+++ b/site/src/hooks/useAutoplay.ts
@@ -0,0 +1,32 @@
+import { useEffect, useState } from 'react';
+import type { RefObject } from 'react';
+import { useInView, useReducedMotion } from 'motion/react';
+
+export interface Autoplay {
+ phase: number;
+ // counts finished loops, so a part that must start fresh each time can take it as its key
+ loop: number;
+ playing: boolean;
+ reduce: boolean;
+}
+
+// steps a mockup through its phases while it is on screen: durations[n] is how long phase n holds, in seconds;
+// the last phase holds, then the story loops; under reduced motion the mockup shows its last phase and stays there
+export function useAutoplay(ref: RefObject<Element | null>, durations: number[]): Autoplay {
+ const reduce = useReducedMotion() ?? false;
+ const inView = useInView(ref, { amount: 0.35 });
+ const last = durations.length - 1;
+ const [state, setState] = useState({ phase: 0, loop: 0 });
+ const playing = !reduce && inView;
+
+ useEffect(() => {
+ if (!playing) return;
+ const timer = window.setTimeout(
+ () => setState(s => (s.phase >= last ? { phase: 0, loop: s.loop + 1 } : { phase: s.phase + 1, loop: s.loop })),
+ durations[state.phase] * 1000,
+ );
+ return () => window.clearTimeout(timer);
+ }, [playing, state.phase, last, durations]);
+
+ return { phase: reduce ? last : state.phase, loop: state.loop, playing, reduce };
+}
diff --git a/site/src/hooks/useElementSize.ts b/site/src/hooks/useElementSize.ts
new file mode 100644
index 0000000..d566f40
--- /dev/null
+++ b/site/src/hooks/useElementSize.ts
@@ -0,0 +1,23 @@
+import { useEffect, useState } from 'react';
+import type { RefObject } from 'react';
+
+export interface Size {
+ width: number;
+ height: number;
+}
+
+// an element's content size, kept current as it resizes; zero until the first measurement
+export function useElementSize(ref: RefObject<Element | null>): Size {
+ const [size, setSize] = useState<Size>({ width: 0, height: 0 });
+ useEffect(() => {
+ const el = ref.current;
+ if (!el) return;
+ const observer = new ResizeObserver(([entry]) => {
+ const { width, height } = entry.contentRect;
+ setSize(current => (current.width === width && current.height === height ? current : { width, height }));
+ });
+ observer.observe(el);
+ return () => observer.disconnect();
+ }, [ref]);
+ return size;
+}
diff --git a/site/src/hooks/usePrefersReducedMotion.ts b/site/src/hooks/usePrefersReducedMotion.ts
new file mode 100644
index 0000000..7d7e049
--- /dev/null
+++ b/site/src/hooks/usePrefersReducedMotion.ts
@@ -0,0 +1,18 @@
+import { useSyncExternalStore } from 'react';
+
+const QUERY = '(prefers-reduced-motion: reduce)';
+
+function subscribe(onChange: () => void): () => void {
+ const media = window.matchMedia(QUERY);
+ media.addEventListener('change', onChange);
+ return () => media.removeEventListener('change', onChange);
+}
+
+// the reader's reduced-motion setting, without loading the animation library into the first bundle
+export function usePrefersReducedMotion(): boolean {
+ return useSyncExternalStore(
+ subscribe,
+ () => window.matchMedia(QUERY).matches,
+ () => false,
+ );
+}
diff --git a/site/src/index.css b/site/src/index.css
new file mode 100644
index 0000000..9f97768
--- /dev/null
+++ b/site/src/index.css
@@ -0,0 +1,404 @@
+@import 'tailwindcss';
+
+/* the brand faces, self-hosted; all three families are SIL Open Font License 1.1 */
+@font-face {
+ font-family: 'Sora';
+ src: url('/fonts/sora-latin-600-normal.woff2') format('woff2');
+ font-weight: 600;
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Sora';
+ src: url('/fonts/sora-latin-700-normal.woff2') format('woff2');
+ font-weight: 700;
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Manrope';
+ src: url('/fonts/manrope-latin-400-normal.woff2') format('woff2');
+ font-weight: 400;
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Manrope';
+ src: url('/fonts/manrope-latin-500-normal.woff2') format('woff2');
+ font-weight: 500;
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Manrope';
+ src: url('/fonts/manrope-latin-600-normal.woff2') format('woff2');
+ font-weight: 600;
+ font-display: swap;
+}
+@font-face {
+ font-family: 'Manrope';
+ src: url('/fonts/manrope-latin-700-normal.woff2') format('woff2');
+ font-weight: 700;
+ font-display: swap;
+}
+@font-face {
+ font-family: 'JetBrains Mono';
+ src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
+ font-weight: 400;
+ font-display: swap;
+}
+@font-face {
+ font-family: 'JetBrains Mono';
+ src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
+ font-weight: 500;
+ font-display: swap;
+}
+
+@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
+
+/* the ribbon's palette under its brand names; see docs/brand-notes.md */
+@theme {
+ --color-twiligent-red: #c11f2f;
+ --color-ember: #9a1423;
+ --color-oxblood: #5e0b14;
+ --color-dusk: #140e10;
+ --color-paper: #f7f3ef;
+ --color-afterglow: #e8a33d;
+
+ /* the platforms' own colours, only for their marks */
+ --color-youtube: #ff0000;
+ --color-instagram: #e1306c;
+ --color-reddit: #ff4500;
+
+ --font-display: 'Sora', 'Manrope', system-ui, sans-serif;
+ --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
+ --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
+
+ --radius-sm: 6px;
+ --radius-md: 10px;
+ --radius-lg: 16px;
+ --radius-xl: 24px;
+ --radius-panel: 32px;
+
+ --ease-fold: cubic-bezier(0.2, 0.8, 0.2, 1);
+ --ease-panel: cubic-bezier(0.22, 1, 0.36, 1);
+}
+
+:root,
+:root[data-theme='light'] {
+ --surface: var(--color-paper);
+ --surface-raised: #ffffff;
+ --surface-sunken: #efe8e3;
+ --line: #e2d8d3;
+ --line-strong: #8c7e83;
+ --dusk-panel: var(--color-dusk);
+ --ink: var(--color-dusk);
+ --ink-muted: #5f5357;
+ --ink-inverse: #ffffff;
+ --accent: var(--color-twiligent-red);
+ --accent-hover: var(--color-ember);
+ --on-accent: #ffffff;
+ --accent-text: #b01c2b;
+ --accent-soft: #fbe7e8;
+ --afterglow-text: #7f4c00;
+ --afterglow-soft: #fcefd9;
+ --success: #1e7349;
+ --success-soft: #e2f3e9;
+ --info: #2c5a99;
+ --info-soft: #e5edf8;
+ --focus-ring: #c11f2f;
+ --shadow-sm: 0 1px 2px #140e100f, 0 1px 3px #140e1014;
+ --shadow-md: 0 4px 12px #140e1014, 0 1px 3px #140e100f;
+ --shadow-lg: 0 16px 40px #140e101f;
+ --shadow-window: 0 1px 2px #140e100f, 0 24px 48px -24px #140e1040;
+ color-scheme: light;
+}
+
+:root[data-theme='dark'] {
+ --surface: var(--color-dusk);
+ --surface-raised: #1f1719;
+ --surface-sunken: #0c0809;
+ --line: #3a2f33;
+ --line-strong: #86777c;
+ --dusk-panel: #2a1d21;
+ --ink: #f5efeb;
+ --ink-muted: #b8abaf;
+ --ink-inverse: var(--color-dusk);
+ --accent: var(--color-twiligent-red);
+ --accent-hover: #d93444;
+ --on-accent: #ffffff;
+ --accent-text: #ff7a82;
+ --accent-soft: #3a1419;
+ --afterglow-text: #f2b65e;
+ --afterglow-soft: #3a2a12;
+ --success: #5fcb95;
+ --success-soft: #12301f;
+ --info: #8db3ec;
+ --info-soft: #16243a;
+ --focus-ring: #ff7a82;
+ --shadow-sm: 0 1px 2px #00000066;
+ --shadow-md: 0 4px 16px #00000080;
+ --shadow-lg: 0 16px 48px #000000a6;
+ --shadow-window: 0 1px 0 #ffffff0a inset, 0 30px 60px -30px #000000cc;
+ color-scheme: dark;
+}
+
+/* semantic names the components use, mapped onto the theme variables */
+@theme inline {
+ --color-surface: var(--surface);
+ --color-surface-raised: var(--surface-raised);
+ --color-surface-sunken: var(--surface-sunken);
+ --color-line: var(--line);
+ --color-line-strong: var(--line-strong);
+ --color-dusk-panel: var(--dusk-panel);
+ --color-ink: var(--ink);
+ --color-ink-muted: var(--ink-muted);
+ --color-ink-inverse: var(--ink-inverse);
+ --color-accent: var(--accent);
+ --color-accent-hover: var(--accent-hover);
+ --color-on-accent: var(--on-accent);
+ --color-accent-text: var(--accent-text);
+ --color-accent-soft: var(--accent-soft);
+ --color-afterglow-text: var(--afterglow-text);
+ --color-afterglow-soft: var(--afterglow-soft);
+ --color-success: var(--success);
+ --color-success-soft: var(--success-soft);
+ --color-info: var(--info);
+ --color-info-soft: var(--info-soft);
+ --color-danger: var(--accent-text);
+ --color-ring: var(--focus-ring);
+ --color-background: var(--surface);
+ --color-foreground: var(--ink);
+ --color-card: var(--surface-raised);
+ --color-muted: var(--surface-sunken);
+ --color-muted-foreground: var(--ink-muted);
+ --color-border: var(--line);
+ --color-primary: var(--accent);
+ --color-primary-foreground: var(--on-accent);
+ --color-destructive: var(--accent-text);
+ --shadow-sm: var(--shadow-sm);
+ --shadow-md: var(--shadow-md);
+ --shadow-lg: var(--shadow-lg);
+ --shadow-window: var(--shadow-window);
+}
+
+@layer base {
+ html {
+ background-color: var(--surface);
+ -webkit-text-size-adjust: 100%;
+ }
+ body {
+ margin: 0;
+ background-color: var(--surface);
+ color: var(--ink);
+ font-family: var(--font-sans);
+ -webkit-font-smoothing: antialiased;
+ }
+ * {
+ border-color: var(--line);
+ }
+ :focus-visible {
+ outline: 2px solid var(--focus-ring);
+ outline-offset: 2px;
+ }
+ ::selection {
+ background: var(--accent-soft);
+ }
+}
+
+/* headlines: Sora SemiBold, sentence case, the brand's tight tracking */
+@utility display {
+ font-family: var(--font-display);
+ font-weight: 600;
+ letter-spacing: -0.025em;
+ text-wrap: balance;
+}
+
+/* the one uppercase style */
+@utility eyebrow {
+ font-family: var(--font-sans);
+ font-size: 12px;
+ line-height: 16px;
+ font-weight: 700;
+ letter-spacing: 0.12em;
+ text-transform: uppercase;
+}
+
+/* the only gradient: the ribbon turning into shadow; covers and hero bands only */
+@utility bg-fold {
+ background-image: linear-gradient(120deg, #c11f2f 0%, #c11f2f 35%, #9a1423 70%, #5e0b14 100%);
+}
+
+/* the page column, 1280px wide with the Activepieces gutters */
+@utility container-page {
+ width: 100%;
+ max-width: 1280px;
+ margin-inline: auto;
+ padding-inline: 1.25rem;
+ @media (width >= 48rem) {
+ padding-inline: 1.5rem;
+ }
+ @media (width >= 64rem) {
+ padding-inline: 2rem;
+ }
+}
+
+/* the brand's entrance: a short slide along the ribbon's 60 degree diagonal while fading in */
+@keyframes fold-in {
+ from {
+ opacity: 0;
+ transform: translate(-6px, 10px);
+ }
+ to {
+ opacity: 1;
+ transform: none;
+ }
+}
+.fold-in {
+ animation: fold-in 220ms var(--ease-fold) both;
+}
+
+/* a menu's contents settling into the navbar panel */
+@keyframes nav-panel-in {
+ from {
+ opacity: 0;
+ transform: translateY(-6px);
+ }
+ to {
+ opacity: 1;
+ transform: none;
+ }
+}
+.nav-panel-in {
+ animation: nav-panel-in 280ms var(--ease-panel) both;
+}
+
+/* the product pictures: a chart line draws, its fill rises in under it, then the latest point pops in;
+ a parent with chart-play starts them, and --delay staggers one picture's parts */
+@keyframes chart-draw {
+ to {
+ stroke-dashoffset: 0;
+ }
+}
+@keyframes chart-fill {
+ from {
+ opacity: 0;
+ transform: translateY(10px);
+ }
+ to {
+ opacity: 1;
+ transform: none;
+ }
+}
+@keyframes pop-in {
+ from {
+ opacity: 0;
+ transform: scale(0.4);
+ }
+ to {
+ opacity: 1;
+ transform: none;
+ }
+}
+@keyframes rise-in {
+ from {
+ opacity: 0;
+ transform: translateY(8px);
+ }
+ to {
+ opacity: 1;
+ transform: none;
+ }
+}
+@keyframes ping-soft {
+ from {
+ opacity: 0.5;
+ transform: scale(1);
+ }
+ to {
+ opacity: 0;
+ transform: scale(2.8);
+ }
+}
+@keyframes grow-x {
+ from {
+ transform: scaleX(0);
+ }
+}
+.grow-x {
+ transform-origin: left;
+ animation: grow-x 1s var(--ease-panel) var(--delay, 0ms) both;
+}
+@keyframes caret-blink {
+ 50% {
+ opacity: 0;
+ }
+}
+.chart-line {
+ stroke-dasharray: 1;
+ stroke-dashoffset: 1;
+}
+.chart-fill,
+.chart-dot {
+ opacity: 0;
+}
+.chart-dot {
+ transform-box: fill-box;
+ transform-origin: center;
+}
+.chart-play .chart-line {
+ animation: chart-draw 1.6s var(--ease-panel) var(--delay, 0ms) forwards;
+}
+.chart-play .chart-fill {
+ animation: chart-fill 1s var(--ease-panel) calc(var(--delay, 0ms) + 300ms) forwards;
+}
+.chart-play .chart-dot {
+ animation: pop-in 420ms var(--ease-panel) calc(var(--delay, 0ms) + 1350ms) forwards;
+}
+.rise-in {
+ animation: rise-in 640ms var(--ease-panel) var(--delay, 0ms) both;
+}
+.ping-soft {
+ transform-box: fill-box;
+ transform-origin: center;
+ animation: ping-soft 2.2s var(--ease-panel) infinite;
+}
+.caret {
+ animation: caret-blink 1s step-end infinite;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .fold-in {
+ animation: fade-in 220ms linear both;
+ }
+ .nav-panel-in,
+ .rise-in,
+ .grow-x,
+ .ping-soft,
+ .caret {
+ animation: none;
+ }
+ .chart-play .chart-line {
+ animation: none;
+ stroke-dashoffset: 0;
+ }
+ .chart-play .chart-fill,
+ .chart-play .chart-dot {
+ animation: none;
+ opacity: 1;
+ }
+}
+@keyframes fade-in {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}
+
+/* shiki writes both themes as variables; the page theme picks one */
+.shiki,
+.shiki span {
+ color: var(--shiki-light);
+}
+[data-theme='dark'] .shiki,
+[data-theme='dark'] .shiki span {
+ color: var(--shiki-dark);
+}
diff --git a/site/src/lib/chart.ts b/site/src/lib/chart.ts
new file mode 100644
index 0000000..776d365
--- /dev/null
+++ b/site/src/lib/chart.ts
@@ -0,0 +1,73 @@
+export type Point = [number, number];
+
+export interface ChartBox {
+ width: number;
+ height: number;
+ // room kept above the highest point and below the lowest, in pixels
+ top: number;
+ bottom: number;
+}
+
+// the lowest and highest value across every series, widened by a share of the span so lines never touch the edges
+export function seriesRange(series: number[][], pad = 0.08): [number, number] {
+ const values = series.flat();
+ const min = Math.min(...values);
+ const max = Math.max(...values);
+ const span = max - min || 1;
+ return [min - span * pad, max + span * pad];
+}
+
+export function chartPoints(values: number[], box: ChartBox, [min, max]: [number, number]): Point[] {
+ const step = values.length > 1 ? box.width / (values.length - 1) : 0;
+ const usable = box.height - box.top - box.bottom;
+ return values.map((value, i) => [i * step, box.top + usable - ((value - min) / (max - min)) * usable]);
+}
+
+// tangents for a monotone cubic (Fritsch and Carlson), so the curve is smooth but never swings past a data point
+function tangents(points: Point[]): number[] {
+ const n = points.length;
+ const slopes = points.slice(1).map(([x, y], i) => (y - points[i][1]) / (x - points[i][0]));
+ const result = points.map((_, i) => {
+ if (i === 0) return slopes[0];
+ if (i === n - 1) return slopes[n - 2];
+ return slopes[i - 1] * slopes[i] <= 0 ? 0 : (slopes[i - 1] + slopes[i]) / 2;
+ });
+ slopes.forEach((slope, i) => {
+ if (slope === 0) {
+ result[i] = 0;
+ result[i + 1] = 0;
+ return;
+ }
+ const a = result[i] / slope;
+ const b = result[i + 1] / slope;
+ const length = a * a + b * b;
+ if (length > 9) {
+ const scale = 3 / Math.sqrt(length);
+ result[i] = scale * a * slope;
+ result[i + 1] = scale * b * slope;
+ }
+ });
+ return result;
+}
+
+const round = (value: number): number => Math.round(value * 100) / 100;
+
+export function smoothPath(points: Point[]): string {
+ if (points.length === 0) return '';
+ const [first, ...rest] = points;
+ if (rest.length === 0) return `M ${round(first[0])} ${round(first[1])}`;
+ const t = tangents(points);
+ const segments = rest.map(([x, y], i) => {
+ const [px, py] = points[i];
+ const third = (x - px) / 3;
+ return `C ${round(px + third)} ${round(py + t[i] * third)} ${round(x - third)} ${round(y - t[i + 1] * third)} ${round(x)} ${round(y)}`;
+ });
+ return `M ${round(first[0])} ${round(first[1])} ${segments.join(' ')}`;
+}
+
+// the same curve closed down to the baseline, for the soft fill under a line
+export function areaPath(points: Point[], baseline: number): string {
+ if (points.length < 2) return '';
+ const last = points[points.length - 1];
+ return `${smoothPath(points)} L ${round(last[0])} ${round(baseline)} L ${round(points[0][0])} ${round(baseline)} Z`;
+}
diff --git a/site/src/lib/cn.ts b/site/src/lib/cn.ts
new file mode 100644
index 0000000..45a97c8
--- /dev/null
+++ b/site/src/lib/cn.ts
@@ -0,0 +1,4 @@
+// joins class names, skipping the ones a condition switched off
+export function cn(...classes: (string | false | null | undefined)[]): string {
+ return classes.filter(Boolean).join(' ');
+}
diff --git a/site/src/lib/format.ts b/site/src/lib/format.ts
new file mode 100644
index 0000000..5cc9775
--- /dev/null
+++ b/site/src/lib/format.ts
@@ -0,0 +1,15 @@
+export type NumberStyle = 'number' | 'compact' | 'percent';
+
+const whole = new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 });
+
+// numbers as the app shows them: 84,213 in full, 84.2K or 1.9M when short, 5.2% for a rate
+export function formatNumber(value: number, style: NumberStyle = 'number'): string {
+ if (style === 'percent') return `${value.toFixed(1)}%`;
+ if (style === 'number') return whole.format(value);
+ const abs = Math.abs(value);
+ // one decimal, dropped when it is zero: 18.4K but 182K
+ const short = (n: number) => n.toFixed(1).replace(/\.0$/, '');
+ if (abs >= 1_000_000) return `${short(value / 1_000_000)}M`;
+ if (abs >= 1_000) return `${short(value / 1_000)}K`;
+ return whole.format(value);
+}
diff --git a/site/src/lib/links.ts b/site/src/lib/links.ts
new file mode 100644
index 0000000..8bb0829
--- /dev/null
+++ b/site/src/lib/links.ts
@@ -0,0 +1,10 @@
+// where the site sends people; the app runs on its own address
+const APP_URL = 'https://app.twiligent.ujjwal.fyi';
+export const SIGN_IN_URL = `${APP_URL}/login`;
+export const SIGN_UP_URL = `${APP_URL}/login?mode=signup`;
+export const GITHUB_URL = 'https://github.com/spacesdrive/twiligent';
+export const DOCS_EDIT_URL = `${GITHUB_URL}/edit/main/site/content/docs`;
+export const ISSUES_URL = `${GITHUB_URL}/issues/new`;
+export const CHANGELOG_URL = `${GITHUB_URL}/blob/main/CHANGELOG.md`;
+export const LICENSE_URL = `${GITHUB_URL}/blob/main/LICENSE`;
+export const PRIVACY_URL = 'https://blog.ujjwal.fyi/privacy/';
diff --git a/site/src/lib/seo.ts b/site/src/lib/seo.ts
new file mode 100644
index 0000000..edb98e0
--- /dev/null
+++ b/site/src/lib/seo.ts
@@ -0,0 +1,53 @@
+import { useEffect } from 'react';
+
+const SITE_URL = 'https://twiligent.ujjwal.fyi';
+const SITE_NAME = 'Twiligent';
+const SHARE_IMAGE = `${SITE_URL}/brand/twiligent-og.png`;
+
+export interface PageMeta {
+ title: string;
+ description: string;
+ // the path without the domain, such as /docs/self-host
+ path: string;
+}
+
+function setMeta(attribute: 'name' | 'property', key: string, content: string) {
+ let tag = document.head.querySelector<HTMLMetaElement>(`meta[${attribute}="${key}"]`);
+ if (!tag) {
+ tag = document.createElement('meta');
+ tag.setAttribute(attribute, key);
+ document.head.appendChild(tag);
+ }
+ tag.content = content;
+}
+
+function setCanonical(href: string) {
+ let link = document.head.querySelector<HTMLLinkElement>('link[rel="canonical"]');
+ if (!link) {
+ link = document.createElement('link');
+ link.rel = 'canonical';
+ document.head.appendChild(link);
+ }
+ link.href = href;
+}
+
+// title, description, canonical URL and the Open Graph and Twitter tags for the page on screen
+export function usePageMeta({ title, description, path }: PageMeta): void {
+ useEffect(() => {
+ const fullTitle = title === SITE_NAME ? title : `${title} | ${SITE_NAME}`;
+ const url = `${SITE_URL}${path}`;
+ document.title = fullTitle;
+ setMeta('name', 'description', description);
+ setCanonical(url);
+ setMeta('property', 'og:type', 'website');
+ setMeta('property', 'og:site_name', SITE_NAME);
+ setMeta('property', 'og:title', fullTitle);
+ setMeta('property', 'og:description', description);
+ setMeta('property', 'og:url', url);
+ setMeta('property', 'og:image', SHARE_IMAGE);
+ setMeta('name', 'twitter:card', 'summary_large_image');
+ setMeta('name', 'twitter:title', fullTitle);
+ setMeta('name', 'twitter:description', description);
+ setMeta('name', 'twitter:image', SHARE_IMAGE);
+ }, [title, description, path]);
+}
diff --git a/site/src/lib/theme.ts b/site/src/lib/theme.ts
new file mode 100644
index 0000000..5716888
--- /dev/null
+++ b/site/src/lib/theme.ts
@@ -0,0 +1,31 @@
+import { useCallback, useSyncExternalStore } from 'react';
+
+export type Theme = 'light' | 'dark';
+
+const STORAGE_KEY = 'twiligent-theme';
+const listeners = new Set<() => void>();
+
+function current(): Theme {
+ return document.documentElement.dataset.theme === 'light' ? 'light' : 'dark';
+}
+
+function subscribe(listener: () => void): () => void {
+ listeners.add(listener);
+ return () => listeners.delete(listener);
+}
+
+// index.html sets the first theme before paint; this keeps React in step with it and saves a choice
+export function useTheme(): [Theme, () => void] {
+ const theme = useSyncExternalStore(subscribe, current, () => 'dark' as Theme);
+ const toggle = useCallback(() => {
+ const next: Theme = current() === 'dark' ? 'light' : 'dark';
+ document.documentElement.dataset.theme = next;
+ try {
+ localStorage.setItem(STORAGE_KEY, next);
+ } catch {
+ // private windows can refuse storage; the theme still changes for this visit
+ }
+ listeners.forEach(listener => listener());
+ }, []);
+ return [theme, toggle];
+}
diff --git a/site/src/main.tsx b/site/src/main.tsx
new file mode 100644
index 0000000..2901c13
--- /dev/null
+++ b/site/src/main.tsx
@@ -0,0 +1,14 @@
+import { StrictMode } from 'react';
+import { createRoot } from 'react-dom/client';
+import { RouterProvider } from 'react-router/dom';
+import { router } from './router';
+import './index.css';
+
+const root = document.getElementById('root');
+if (!root) throw new Error('index.html has no #root element');
+
+createRoot(root).render(
+ <StrictMode>
+ <RouterProvider router={router} />
+ </StrictMode>,
+);
diff --git a/site/src/pages/Home.tsx b/site/src/pages/Home.tsx
new file mode 100644
index 0000000..1b6612a
--- /dev/null
+++ b/site/src/pages/Home.tsx
@@ -0,0 +1,80 @@
+import { lazy, Suspense } from 'react';
+import { usePageMeta } from '@/lib/seo';
+import { SIGN_UP_URL } from '@/lib/links';
+import { AltArrowRight } from '@/components/icons';
+import { FoldBand } from '@/components/brand';
+import { Pill } from '@/components/Pill';
+import { OverviewWindow } from '@/components/mockups/OverviewWindow';
+import { PlatformMark } from '@/components/mockups/kit';
+import { platformLabel } from '@/components/mockups/platforms';
+import type { Platform } from '@/components/mockups/platforms';
+
+// everything below the hero loads after it, so the first screen paints from the smallest bundle
+const HomeBelow = lazy(() => import('./HomeBelow'));
+
+const PLATFORMS: Platform[] = ['youtube', 'instagram', 'reddit'];
+
+function Hero() {
+ return (
+ <section aria-labelledby="hero-heading" className="relative overflow-hidden pt-32 md:pt-40">
+ <div className="container-page flex flex-col items-center text-center">
+ <p className="eyebrow fold-in text-accent-text">YouTube, Instagram and Reddit, in one dashboard</p>
+ <h1
+ id="hero-heading"
+ className="display fold-in mt-5 max-w-[17ch] text-[40px] leading-[44px] tracking-[-0.03em] text-ink sm:text-[52px] sm:leading-[56px] lg:text-[64px] lg:leading-[68px]"
+ >
+ Every channel, folded into one clear picture.
+ </h1>
+ <p className="fold-in mt-6 max-w-[40rem] text-lg leading-7 text-balance text-ink-muted">
+ Twiligent puts your YouTube, Instagram and Reddit numbers side by side, publishes and schedules your Instagram
+ posts, and runs on accounts you own.
+ </p>
+ <div className="fold-in mt-9 flex w-full flex-col items-center justify-center gap-3 sm:w-auto sm:flex-row">
+ <Pill href={SIGN_UP_URL} size="lg" className="w-full sm:w-auto">
+ Get started
+ <AltArrowRight className="size-5 transition-transform group-hover:translate-x-0.5" />
+ </Pill>
+ <Pill href="/docs/self-host" variant="soft" size="lg" className="w-full sm:w-auto">
+ Run your own
+ </Pill>
+ </div>
+ <p className="mt-5 text-sm text-ink-muted">Free and open source under the MIT licence.</p>
+ <div className="mt-10 flex flex-wrap items-center justify-center gap-x-8 gap-y-3">
+ <span className="eyebrow text-ink-muted">Works with</span>
+ {PLATFORMS.map(platform => (
+ <span key={platform} className="flex items-center gap-2 text-[15px] font-semibold text-ink">
+ <PlatformMark platform={platform} className="size-5" />
+ {platformLabel(platform)}
+ </span>
+ ))}
+ </div>
+ </div>
+
+ <div className="container-page mt-14 md:mt-16">
+ <FoldBand
+ placement="top-right"
+ className="h-[24rem] rounded-t-[32px] px-3 pt-6 [mask-image:linear-gradient(to_bottom,black_78%,transparent)] sm:px-8 sm:pt-10 md:h-[34rem] lg:px-14 lg:pt-14"
+ >
+ <OverviewWindow className="mx-auto max-w-[68rem]" />
+ </FoldBand>
+ </div>
+ </section>
+ );
+}
+
+export default function Home() {
+ usePageMeta({
+ title: 'Twiligent',
+ description:
+ 'Twiligent puts your YouTube, Instagram and Reddit numbers side by side, publishes and schedules your Instagram posts, and runs on accounts you own.',
+ path: '/',
+ });
+ return (
+ <>
+ <Hero />
+ <Suspense fallback={<div className="min-h-[100svh]" />}>
+ <HomeBelow />
+ </Suspense>
+ </>
+ );
+}
diff --git a/site/src/pages/HomeBelow.tsx b/site/src/pages/HomeBelow.tsx
new file mode 100644
index 0000000..c6c9de2
--- /dev/null
+++ b/site/src/pages/HomeBelow.tsx
@@ -0,0 +1,168 @@
+import { MotionConfig } from 'motion/react';
+import { GITHUB_URL, SIGN_UP_URL } from '@/lib/links';
+import { Story } from '@/components/sections/Story';
+import { BentoCard, CtaBand, FeatureSection, SectionHeader } from '@/components/sections/blocks';
+import { Platforms } from '@/components/sections/Platforms';
+import { Faq } from '@/components/sections/Faq';
+import { AnalyticsCard } from '@/components/mockups/AnalyticsCard';
+import { ScheduleCard } from '@/components/mockups/ScheduleCard';
+import { BackupSchedulerMock } from '@/components/mockups/bento/BackupSchedulerMock';
+import { DatabaseMock } from '@/components/mockups/bento/DatabaseMock';
+import { EdgeMock } from '@/components/mockups/bento/EdgeMock';
+import { FreePlansMock } from '@/components/mockups/bento/FreePlansMock';
+import { LeaderboardMock } from '@/components/mockups/bento/LeaderboardMock';
+import { LibraryMock } from '@/components/mockups/bento/LibraryMock';
+import { MembersMock } from '@/components/mockups/bento/MembersMock';
+import { SignInMock } from '@/components/mockups/bento/SignInMock';
+import { TokenMock } from '@/components/mockups/bento/TokenMock';
+import { TrackedMock } from '@/components/mockups/bento/TrackedMock';
+
+// the home page below the hero, in the order of the Activepieces home page
+export default function HomeBelow() {
+ return (
+ // every animation below follows the reader's reduced motion setting
+ <MotionConfig reducedMotion="user">
+ <Story />
+
+ <CtaBand
+ title="See every account in one place."
+ text="Sign in with Google or email, add a channel link or connect Instagram. The Overview fills in within a minute or two."
+ primary={{ label: 'Get started', href: SIGN_UP_URL }}
+ secondary={{ label: 'Read the docs', href: '/docs' }}
+ />
+
+ <FeatureSection
+ id="analytics"
+ title="Every number, side by side."
+ lead="Subscribers, followers, karma, views, likes and comments across YouTube, Instagram and Reddit, with a detail page for each account."
+ notes={[
+ {
+ title: 'YouTube in depth',
+ text: 'Videos and Shorts, engagement, publishing patterns, growth, tags and SEO.',
+ },
+ {
+ title: 'Instagram in depth',
+ text: 'Engagement, the best day and hour to post, consistency, content types and hashtags.',
+ },
+ { title: 'Reddit too', text: 'Karma, posts and comments for every profile you add.' },
+ ]}
+ >
+ <AnalyticsCard />
+ </FeatureSection>
+
+ <FeatureSection
+ id="publishing"
+ title="Post now, or at the hour you pick."
+ lead="Publish photos, Reels and Stories to Instagram, schedule them for later, or upload many files at once."
+ placement="bottom-left"
+ tone="dusk"
+ notes={[
+ {
+ title: 'Scheduled on the server',
+ text: 'The server publishes within 15 minutes of the time you pick, even with your browser closed.',
+ },
+ { title: 'Bulk upload', text: 'Add many files, give each its own caption or share one, and space them out.' },
+ { title: 'Status you can read', text: 'Every post shows Pending, Published or Failed, with the reason.' },
+ ]}
+ >
+ <ScheduleCard />
+ </FeatureSection>
+
+ <section
+ id="own"
+ aria-labelledby="own-heading"
+ className="container-page flex scroll-mt-24 flex-col gap-8 py-24 md:gap-12 md:py-32"
+ >
+ <SectionHeader id="own-heading" title="Runs on accounts you own." />
+ <div className="grid gap-5 md:grid-cols-2">
+ <BentoCard
+ title="Your own database"
+ text="Everything lives in your Supabase project, and each member's data is kept apart."
+ tone="fold"
+ >
+ <DatabaseMock />
+ </BentoCard>
+ <BentoCard
+ title="At the edge"
+ text="One Cloudflare Worker serves the app. There is no server to patch."
+ placement="bottom-left"
+ >
+ <EdgeMock />
+ </BentoCard>
+ </div>
+ <div className="grid gap-5 md:grid-cols-[5fr_8fr]">
+ <BentoCard
+ title="Mostly free plans"
+ text="Supabase, Cloudflare, Cloudinary and Upstash free plans are enough to start."
+ placement="bottom-left"
+ >
+ <FreePlansMock />
+ </BentoCard>
+ <BentoCard
+ title="Sign in your way"
+ text="Google, or email with a 6-digit code."
+ tone="fold"
+ placement="bottom-right"
+ >
+ <SignInMock />
+ </BentoCard>
+ </div>
+ <div className="grid gap-5 md:grid-cols-[8fr_5fr]">
+ <BentoCard
+ title="Access that stays fresh"
+ text="Instagram access renews by itself every day."
+ tone="fold"
+ placement="bottom-left"
+ >
+ <TokenMock />
+ </BentoCard>
+ <BentoCard
+ title="A backup scheduler"
+ text="GitHub Actions can publish due posts as a second scheduler."
+ placement="bottom-right"
+ >
+ <BackupSchedulerMock />
+ </BentoCard>
+ </div>
+ </section>
+
+ <CtaBand
+ title="Run your own copy."
+ text="Set up Supabase, the platform keys and Cloudflare step by step, mostly on free plans."
+ primary={{ label: 'Read the self-hosting guide', href: '/docs/self-host' }}
+ secondary={{ label: 'View on GitHub', href: GITHUB_URL }}
+ />
+
+ <Platforms />
+
+ <section
+ id="team"
+ aria-labelledby="team-heading"
+ className="container-page flex scroll-mt-24 flex-col gap-8 py-24 md:gap-12 md:py-32"
+ >
+ <SectionHeader id="team-heading" title="Made for the team behind the channels." />
+ <div className="grid gap-5 md:grid-cols-2">
+ <BentoCard title="Overview" text="Totals, comparisons and leaderboards across every account." tone="fold">
+ <LeaderboardMock />
+ </BentoCard>
+ <BentoCard title="Libraries" text="Search and filter every video, reel and post." placement="bottom-left">
+ <LibraryMock />
+ </BentoCard>
+ <BentoCard title="Tracked content" text="Watch the posts that matter, side by side." placement="bottom-left">
+ <TrackedMock />
+ </BentoCard>
+ <BentoCard
+ title="Members and administrators"
+ text="One person runs the instance. Everyone else signs in and connects their own accounts."
+ tone="fold"
+ placement="bottom-right"
+ >
+ <MembersMock />
+ </BentoCard>
+ </div>
+ </section>
+
+ <Faq />
+ </MotionConfig>
+ );
+}
diff --git a/site/src/pages/NotFound.tsx b/site/src/pages/NotFound.tsx
new file mode 100644
index 0000000..771449e
--- /dev/null
+++ b/site/src/pages/NotFound.tsx
@@ -0,0 +1,36 @@
+import { usePageMeta } from '@/lib/seo';
+import { FoldBand } from '@/components/brand';
+import { Pill } from '@/components/Pill';
+
+export default function NotFound() {
+ usePageMeta({
+ title: 'Page not found',
+ description: 'This page does not exist on the Twiligent site.',
+ path: '/404',
+ });
+ return (
+ <section className="container-page pt-32 md:pt-40">
+ <FoldBand
+ tone="dusk"
+ placement="bottom-right"
+ className="flex flex-col items-start gap-5 rounded-xl px-8 py-16 md:px-14 md:py-24"
+ >
+ <p className="eyebrow text-white/70">Error 404</p>
+ <h1 className="display max-w-[14ch] text-[40px] leading-[46px] text-white md:text-[56px] md:leading-[62px]">
+ This page is not here.
+ </h1>
+ <p className="max-w-lg text-lg leading-7 text-white/80">
+ The link may be old, or the address may have a typo. Start from the home page, or look in the docs.
+ </p>
+ <div className="mt-2 flex flex-col gap-3 sm:flex-row">
+ <Pill href="/" variant="white" size="lg">
+ Go to the home page
+ </Pill>
+ <Pill href="/docs" variant="dusk" size="lg" className="ring-1 ring-white/30">
+ Open the docs
+ </Pill>
+ </div>
+ </FoldBand>
+ </section>
+ );
+}
diff --git a/site/src/router.tsx b/site/src/router.tsx
new file mode 100644
index 0000000..07d93b3
--- /dev/null
+++ b/site/src/router.tsx
@@ -0,0 +1,19 @@
+import { createBrowserRouter } from 'react-router';
+import { MarketingLayout } from './components/MarketingLayout';
+import Home from './pages/Home';
+
+// the home page ships with the first load; everything else loads when visited
+export const router = createBrowserRouter([
+ {
+ element: <MarketingLayout />,
+ children: [
+ { index: true, element: <Home /> },
+ { path: '*', lazy: async () => ({ Component: (await import('./pages/NotFound')).default }) },
+ ],
+ },
+ {
+ path: 'docs',
+ lazy: async () => ({ Component: (await import('./docs/DocsLayout')).default }),
+ children: [{ path: '*', lazy: async () => ({ Component: (await import('./docs/DocPage')).default }) }],
+ },
+]);
diff --git a/site/tests/docs/content.test.ts b/site/tests/docs/content.test.ts
new file mode 100644
index 0000000..4a77376
--- /dev/null
+++ b/site/tests/docs/content.test.ts
@@ -0,0 +1,60 @@
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import { readdirSync, readFileSync, statSync } from 'node:fs';
+import { join, relative, sep } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const site = fileURLToPath(new URL('../../', import.meta.url));
+const contentDir = join(site, 'content', 'docs');
+
+function mdxFiles(dir: string): string[] {
+ return readdirSync(dir).flatMap(name => {
+ const path = join(dir, name);
+ if (statSync(path).isDirectory()) return mdxFiles(path);
+ return name.endsWith('.mdx') ? [path] : [];
+ });
+}
+
+const pages = new Map(
+ mdxFiles(contentDir).map(path => {
+ const slug = relative(contentDir, path)
+ .split(sep)
+ .join('/')
+ .replace(/\.mdx$/, '')
+ .replace(/(^|\/)index$/, '');
+ return [slug, readFileSync(path, 'utf8')] as const;
+ }),
+);
+
+// nav.ts imports the generated JSX icons, which Node cannot load, so its slugs are read from the source
+const navSlugs = [...readFileSync(join(site, 'src', 'docs', 'nav.ts'), 'utf8').matchAll(/slug: '([^']*)'/g)].map(
+ match => match[1],
+);
+
+test('every page in the navigation has a content file, and every content file is in the navigation', () => {
+ assert.deepEqual([...pages.keys()].sort(), [...navSlugs].sort());
+});
+
+test('navigation slugs are unique', () => {
+ assert.equal(new Set(navSlugs).size, navSlugs.length);
+});
+
+test('every page declares a title and a description', () => {
+ for (const [slug, source] of pages) {
+ assert.match(source, /^export const meta = \{ title: '.+', description: '.+' \}/, `${slug || 'index'}.mdx`);
+ }
+});
+
+test('every link to another docs page points at a page that exists', () => {
+ for (const [slug, source] of pages) {
+ for (const match of source.matchAll(/(?:\]\(|href=")\/docs\/?([^)"#\s]*)/g)) {
+ assert.ok(pages.has(match[1].replace(/\/$/, '')), `${slug || 'index'}.mdx links to /docs/${match[1]}`);
+ }
+ }
+});
+
+test('pages use no em or en dashes', () => {
+ for (const [slug, source] of pages) {
+ assert.doesNotMatch(source, /[\u2013\u2014]/, `${slug || 'index'}.mdx`);
+ }
+});
diff --git a/site/tests/docs/searchShared.test.ts b/site/tests/docs/searchShared.test.ts
new file mode 100644
index 0000000..11202c8
--- /dev/null
+++ b/site/tests/docs/searchShared.test.ts
@@ -0,0 +1,11 @@
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import { slugify } from '../../src/docs/searchShared.ts';
+
+test('slugify makes heading ids', () => {
+ assert.equal(slugify('Why row level security, with no policies?'), 'why-row-level-security-with-no-policies');
+});
+
+test('slugify joins repeated spaces and hyphens into one hyphen', () => {
+ assert.equal(slugify(' Step 2 - deploy '), 'step-2-deploy');
+});
diff --git a/site/tests/lib/chart.test.ts b/site/tests/lib/chart.test.ts
new file mode 100644
index 0000000..82a453f
--- /dev/null
+++ b/site/tests/lib/chart.test.ts
@@ -0,0 +1,78 @@
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import { areaPath, chartPoints, seriesRange, smoothPath } from '../../src/lib/chart.ts';
+import type { Point } from '../../src/lib/chart.ts';
+
+const box = { width: 300, height: 100, top: 10, bottom: 10 };
+
+// every number in a path, in order
+const numbers = (path: string): number[] => path.match(/-?\d+(\.\d+)?/g)?.map(Number) ?? [];
+
+test('the range is widened on both sides so lines never touch the edges', () => {
+ assert.deepEqual(
+ seriesRange(
+ [
+ [10, 20],
+ [15, 30],
+ ],
+ 0.1,
+ ),
+ [8, 32],
+ );
+});
+
+test('a flat series still gets a range to draw in', () => {
+ const [min, max] = seriesRange([[5, 5, 5]]);
+ assert.ok(max > min);
+});
+
+test('points spread across the width and the highest value sits at the top margin', () => {
+ const points = chartPoints([0, 50, 100], box, [0, 100]);
+ assert.deepEqual(points, [
+ [0, 90],
+ [150, 50],
+ [300, 10],
+ ]);
+});
+
+test('the smooth path passes through every point', () => {
+ const points: Point[] = [
+ [0, 80],
+ [100, 40],
+ [200, 60],
+ [300, 20],
+ ];
+ const values = numbers(smoothPath(points));
+ // after the move, each curve ends on the next point
+ for (let i = 1; i < points.length; i++) {
+ const end = values.slice(2 + (i - 1) * 6 + 4, 2 + (i - 1) * 6 + 6);
+ assert.deepEqual(end, points[i]);
+ }
+});
+
+test('the curve never swings past its data: each control point stays between its segment ends', () => {
+ const points = chartPoints([10, 11, 30, 31, 32, 80, 40, 41], box, [0, 100]);
+ const values = numbers(smoothPath(points));
+ for (let i = 1; i < points.length; i++) {
+ const [, c1y, , c2y] = values.slice(2 + (i - 1) * 6, 2 + (i - 1) * 6 + 4);
+ const low = Math.min(points[i - 1][1], points[i][1]) - 0.01;
+ const high = Math.max(points[i - 1][1], points[i][1]) + 0.01;
+ assert.ok(c1y >= low && c1y <= high && c2y >= low && c2y <= high, `segment ${i} overshoots`);
+ }
+});
+
+test('a single point draws a move only, and no area', () => {
+ assert.equal(smoothPath([[4, 5]]), 'M 4 5');
+ assert.equal(areaPath([[4, 5]], 100), '');
+});
+
+test('the area closes down to the baseline', () => {
+ const path = areaPath(
+ [
+ [0, 10],
+ [100, 20],
+ ],
+ 90,
+ );
+ assert.match(path, / L 100 90 L 0 90 Z$/);
+});
diff --git a/site/tests/lib/format.test.ts b/site/tests/lib/format.test.ts
new file mode 100644
index 0000000..cd84013
--- /dev/null
+++ b/site/tests/lib/format.test.ts
@@ -0,0 +1,22 @@
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import { formatNumber } from '../../src/lib/format.ts';
+
+test('full numbers get thousands separators and no decimals', () => {
+ assert.equal(formatNumber(84213.4), '84,213');
+});
+
+test('short numbers use K and M with one decimal', () => {
+ assert.equal(formatNumber(18400, 'compact'), '18.4K');
+ assert.equal(formatNumber(1_900_000, 'compact'), '1.9M');
+ assert.equal(formatNumber(640, 'compact'), '640');
+});
+
+test('a short number drops a decimal of zero', () => {
+ assert.equal(formatNumber(182_000, 'compact'), '182K');
+ assert.equal(formatNumber(2_000_000, 'compact'), '2M');
+});
+
+test('rates keep one decimal and a percent sign', () => {
+ assert.equal(formatNumber(5.23, 'percent'), '5.2%');
+});