diff --git a/apps/landing/.env.example b/apps/landing/.env.example index e2b2900..7896951 100644 --- a/apps/landing/.env.example +++ b/apps/landing/.env.example @@ -2,5 +2,5 @@ # e.g. http://localhost:3000. NEXT_PUBLIC_APP_URL= -# Demo video URL (default /demo/demo.mp4, which is gitignored) +# Demo video URL, optional (default: the committed files in public/demo/) NEXT_PUBLIC_DEMO_VIDEO_URL= diff --git a/apps/landing/.gitignore b/apps/landing/.gitignore index 6f7b109..cf24c50 100644 --- a/apps/landing/.gitignore +++ b/apps/landing/.gitignore @@ -4,5 +4,10 @@ next-env.d.ts *.tsbuildinfo .env -# the demo video is large: host it (NEXT_PUBLIC_DEMO_VIDEO_URL) or add it on purpose -public/demo/ +# The demo film is committed on purpose (#334): demo-1080.webm, demo-720.webm, demo-720.mp4 and +# demo-poster.webp. Anything else dropped in public/demo/ (old drafts, big masters) stays local. +public/demo/* +!public/demo/demo-1080.webm +!public/demo/demo-720.webm +!public/demo/demo-720.mp4 +!public/demo/demo-poster.webp diff --git a/apps/landing/CLAUDE.md b/apps/landing/CLAUDE.md index eb8a881..f2dbb91 100644 --- a/apps/landing/CLAUDE.md +++ b/apps/landing/CLAUDE.md @@ -23,7 +23,7 @@ bun run typecheck bun run build ``` -Env (`.env.example`): `NEXT_PUBLIC_APP_URL`, the web app's URL for "Open app" and the Mind cards; `NEXT_PUBLIC_DEMO_VIDEO_URL`, the demo video (default `/demo/demo.mp4`). Default `https://app.hellonear.xyz` (#125); the landing itself will be `https://hellonear.xyz`. +Env (`.env.example`): `NEXT_PUBLIC_APP_URL`, the web app's URL for "Open app" and the Mind cards; `NEXT_PUBLIC_DEMO_VIDEO_URL`, optional, serves the demo video from elsewhere (default: the files in `public/demo/`). Default `https://app.hellonear.xyz` (#125); the landing itself will be `https://hellonear.xyz`. Assets: the favicon set comes from `design/logo/favicon/` (`app/favicon.ico`, `app/icon.svg`, `app/apple-icon.png`). Tokens in `app/globals.css` are copied from `design/landing.pen`. `public/draco/` is three.js's Draco decoder (for the GLB). @@ -73,7 +73,7 @@ Every payment asks you first, unless you set a rule (`components/ApprovalsScroll Watch your Mind think (`components/MindGraph.tsx`, `SeeInside` in `Sections.tsx`): a full-width night section (`NIGHT_BG` in `components/night.ts`; no stars), continuing the night the approvals scroll ends in. A world of Minds drawn like Obsidian's graph view: Penny's graph in the middle (the nodes of Ancung's app live view, PR #154) and 46 other Minds packed around it (64 before 11 Nov; Nabil asked for a little less crowd, so each also has about 40% fewer small bubbles) (gravity pulls every Mind to the middle, so the graphs sit close together in one disc), each a hub with a few skills and many small bubbles (seeded, so the page is the same every time; a few are big dandelions). Drawn like Ancung's app live view as of 11 Nov (apps/fe `graph/components/MindGraph.tsx`): every Mind is its profile picture in a circle with a light ring (the three character images, in turn); the other nodes take the app's colours by kind (`--node-*`, dark theme): skills lime, tools blue, wallets amber, memories teal, and apps as dark bubbles with their own logos (Gmail, Calendar, Meet, Sheets, Notion and the rest, from `components/AppLogos.tsx`, turned into images for the canvas); lines are quiet grey. Penny's graph has its skills, tools, apps (Calendar, Meet, Gmail, Sheets, Notion), wallet and memory; the other Minds' small bubbles are memories and tool calls on the Mind, and tools, now and then an app or a wallet, on its skills. Penny's run lights its path blue (amber while it waits on the owner), with moving dots and a pulsing ring. Under the cursor, as in the app: a magnet leans bubbles within 120 px toward it (drawn only, the layout never sees it) and a lime torch lights the lines within 90 px. The bubble under the cursor or picked shows its links in white; nothing else dims (as in the app; Nabil, 11 Nov). Penny's labels are always shown, so each of Penny's bubbles with its label is kept apart as a box (as in the app's `sim.ts`). Zoom goes from 40% (the whole world fits; the app stops at 35%) to 300%. Labels fade in with zoom (Minds first, then skills; Penny's early). Physics is one world for every node, written here (Ancung's force layout is all-pairs and too slow for ~3,000 nodes): springs along the links, a soft push between neighbours (stronger between different Minds) and collisions, found on a grid; every Mind is pulled gently to the middle. Dragging a bubble warms it up, so its graph follows and other Minds' bubbles get pushed aside, like Obsidian. A click on a bubble opens a small card beside it (dark glass, follows the bubble): what it is (Mind, skill, tool or memory, and whose) and one line on what it does (`ABOUT`); a click on the background, the same bubble, × or Esc closes it. Drag the background to pan; pinch on a trackpad or Ctrl/⌘ + scroll to zoom (plain scroll still scrolls the page; touch scrolls the page), or the − / + / Reset buttons. Under the graph the night goes on a little (96 to 128 px), and the next section overlaps it: the demo sits on a light sheet with big rounded top corners (40 px, 72 px on desktop), pulled up 64 / 96 px over the night (`Demo.tsx`). Penny plays a scripted run of paying the internet bill while in view, in a loop. Off-screen nodes are not drawn; quiet lines and bubbles are drawn in one path each. Reduced motion: still. -Two minutes with a Mind (`components/Demo.tsx`): the heading slides up word by word and the three steps rise in when the section comes into view. The video plays on its own, muted and looping; a click opens it full screen from the start with sound and controls, and leaving full screen mutes it and lets it loop again (iPhone: `webkitEnterFullscreen`). The video comes from `NEXT_PUBLIC_DEMO_VIDEO_URL`, default `/demo/demo.mp4`; `public/demo/` is gitignored because the video is large, so host it (or add it on purpose). Without it (the hosted demo had no video on 12 Nov: `/demo/demo.mp4` was a 404) the frame shows a still of the lawn with "The demo video is coming soon" and no play button. Reduced motion: no autoplay, no slide-ups. +Two minutes with a Mind (`components/Demo.tsx`): the heading slides up word by word and the three steps rise in when the section comes into view. The video plays on its own, muted and looping; a click opens it full screen from the start with sound and controls, and leaving full screen mutes it and lets it loop again (iPhone: `webkitEnterFullscreen`). The video is the marketing film (48 s, Nabil's "HelloNear film v7 FINAL (SFX v5)"), committed in `public/demo/` on purpose (#334, 15 Nov): `demo-1080.webm` (VP9 1080p30, 6.8 MB) from 768 px up, `demo-720.webm` (VP9 720p30, 3.4 MB) on phones, `demo-720.mp4` (H.264, 4.3 MB) for browsers without WebM, and `demo-poster.webp` (the frame at 20 s) until it plays. Encoded with ffmpeg: VP9 `-crf 38` (1080) / `-crf 40` (720), `-b:v 0`, Opus audio; H.264 `-crf 27 -preset slow -movflags +faststart`. The frame is always 16:9, as wide as the column and at most 1067 x 600 px, so nothing of the film is cut. `NEXT_PUBLIC_DEMO_VIDEO_URL`, when set, replaces all the files. If nothing plays, the frame shows a still of the lawn with "The demo video is coming soon" and no play button. Reduced motion: no autoplay, no slide-ups. Ready to meet your Mind? (`components/Cta.tsx`): no card, straight on the page, about 86vh tall on desktop. The copy and two buttons (Meet your Mind to `#minds`, View on GitHub; side by side and the same width on every screen, `.cta-btns`) on the left; on the right a big Mind flies in from the screen's right edge on a rocket-fire trail (`public/scenes/cta-flying.webp`, 1536 px with alpha, 155 KB; generated, master in `design/hellonear-assets/sections/cta-flying.png`), its flames running off the edge, with a soft shadow under it. In view: the heading slides up word by word, the rest rises in, the Mind flies in (`.cta-fly-in`) and then hovers (`.float-idle`). Phones: the Mind sits under the copy, bleeding off the right edge. Reduced motion: no motion. @@ -103,14 +103,14 @@ Measured on the production build (`bun run build && bun x next start`), Chrome a ## Hosted on the demo box (#266) - `deploy/deploy.sh` builds this folder on the deploying machine (`next build` from `git archive HEAD`) and ships only `.next`; the box runs `next start` on port 3100 as `hellonear-landing.service` (`deploy/systemd/`). A merged `main` deploys it like the rest (`deploy/README.md`). -- The demo video: set `DEPLOY_LANDING_VIDEO_URL` for the deploy (it becomes `NEXT_PUBLIC_DEMO_VIDEO_URL`); without it the demo section shows its placeholder. +- The demo video ships with the landing (`public/demo/`, #334). `DEPLOY_LANDING_VIDEO_URL` (it becomes `NEXT_PUBLIC_DEMO_VIDEO_URL`) is only needed to serve it from somewhere else. - `https://hellonear.xyz` serves it since 12 Nov: the apex ingress rule points at 3100 (#266, `deploy/README.md`, step 8). ## Deploying to Vercel instead (checked 11 Nov, not deployed: deploys need Axel's approval) - Project settings: Root Directory `apps/landing`, framework Next.js (auto). Vercel sees `bun.lock` and installs with Bun. -- Env: `NEXT_PUBLIC_APP_URL` (default `https://app.hellonear.xyz`) and `NEXT_PUBLIC_DEMO_VIDEO_URL` (the hosted demo video; without it the demo shows a placeholder, since `public/demo/` is gitignored). -- A build from a clean `git archive` of the branch passes and every asset the page uses is committed (the demo video is the only file that is not, on purpose). +- Env: `NEXT_PUBLIC_APP_URL` (default `https://app.hellonear.xyz`) and `NEXT_PUBLIC_DEMO_VIDEO_URL` (optional: serves the demo video from elsewhere instead of the committed `public/demo/` files). +- A build from a clean `git archive` of the branch passes and every asset the page uses is committed (the demo film included, since #334). - The page is fully static; images are plain `` (no Vercel image optimisation needed). `next.config.ts` caches `/hero`, `/scenes`, `/minds`, `/brands` and `/draco` for a day (stale-while-revalidate for a week), since those files keep their names when they change. ## Copy guidelines diff --git a/apps/landing/components/Demo.tsx b/apps/landing/components/Demo.tsx index df40cfb..bdcc241 100644 --- a/apps/landing/components/Demo.tsx +++ b/apps/landing/components/Demo.tsx @@ -5,11 +5,13 @@ import { useEffect, useRef, useState } from "react"; // "Two minutes with a Mind": the heading slides up word by word and the steps rise in when the // section comes into view (like the Minds heading). The video plays on its own, muted and looping, // like a moving picture; a click opens it full screen from the start with sound, and leaving full -// screen mutes it and lets it loop again. Until the real video is in `public/demo/` (or DEMO_SRC -// points to where it is hosted), a placeholder shows instead. Reduced motion: no autoplay, no -// slide-ups. +// screen mutes it and lets it loop again. The film (48 s) is in `public/demo/` (#334): WebM (VP9) +// at 1080p from 768 px up and 720p on phones, an H.264 MP4 for browsers without WebM (older +// iPhones), and a poster frame. NEXT_PUBLIC_DEMO_VIDEO_URL, when set, replaces all of them. If no +// source plays, a placeholder shows instead. Reduced motion: no autoplay, no slide-ups. -const DEMO_SRC = process.env.NEXT_PUBLIC_DEMO_VIDEO_URL || "/demo/demo.mp4"; +const DEMO_URL = process.env.NEXT_PUBLIC_DEMO_VIDEO_URL; +const POSTER = "/demo/demo-poster.webp"; const TITLE = "Two minutes with a Mind"; const HOW = [ ["Pick a Mind", "Choose a personality and give it a name."], @@ -111,21 +113,33 @@ export function Demo() { type="button" onClick={open} disabled={missing} - aria-label={missing ? "The demo video is coming soon" : "Play the two-minute demo full screen, with sound"} - className={`group relative aspect-video max-h-[600px] w-full overflow-hidden rounded-[24px] bg-[#161614] ${seen ? "fade-in" : "opacity-0"}`} + aria-label={missing ? "The demo video is coming soon" : "Play the demo full screen, with sound"} + // Always 16:9 so nothing of the film is cut: as wide as the column, at most 1067 px (600 px + // tall), centred. (A 600 px height cap on a full-width frame used to crop the top and bottom.) + className={`group relative mx-auto aspect-video w-full max-w-[1067px] overflow-hidden rounded-[18px] bg-[#161614] md:rounded-[24px] ${seen ? "fade-in" : "opacity-0"}`} style={{ animationDelay: `${words.length * 70 + 150}ms` }} > {!missing && ( )} {/* No video hosted yet (NEXT_PUBLIC_DEMO_VIDEO_URL unset and public/demo/ is not deployed): a still of the lawn and a quiet "coming soon", never a developer note or a play button that does nothing. */} diff --git a/apps/landing/public/demo/demo-1080.webm b/apps/landing/public/demo/demo-1080.webm new file mode 100644 index 0000000..40cb566 Binary files /dev/null and b/apps/landing/public/demo/demo-1080.webm differ diff --git a/apps/landing/public/demo/demo-720.mp4 b/apps/landing/public/demo/demo-720.mp4 new file mode 100644 index 0000000..592eb19 Binary files /dev/null and b/apps/landing/public/demo/demo-720.mp4 differ diff --git a/apps/landing/public/demo/demo-720.webm b/apps/landing/public/demo/demo-720.webm new file mode 100644 index 0000000..de0b95b Binary files /dev/null and b/apps/landing/public/demo/demo-720.webm differ diff --git a/apps/landing/public/demo/demo-poster.webp b/apps/landing/public/demo/demo-poster.webp new file mode 100644 index 0000000..0bf8614 Binary files /dev/null and b/apps/landing/public/demo/demo-poster.webp differ