ZZZ Digital Lab

Back to HushBrief

Setup and deploy commands

Run commands from the project root in PowerShell. Estimates are active time; service and download waits are extra.

1. Local checks and a ready rehearsal — 5 minutes

npm ci --ignore-scripts --cache .cache/npm --registry https://registry.npmjs.org
npm test
npm run build
npm run rehearse

The last command serves both the app and fake cloud in one terminal. In a second terminal:

npm run check:browser
npm run record:demo

Recording takes approximately 2½ minutes. The script prints its unique output/demo/rehearsal-* folder. Use hushbrief-captioned.mp4 for review. Captions are already in the pixels; narration.txt and captions.srt are derived from the same English source. A rehearsal is not the live submission video.

2. One-time private service setup — 25–40 minutes

In a dedicated Firebase demo project register a Web app, enable AI Logic with Gemini Developer API, and complete the Gemini API setup. Register reCAPTCHA Enterprise in App Check and enforce Firebase AI Logic. No Auth/database is required.

npm run configure -- --init
notepad .env.local
npm run configure
npm run preflight

Fill only the seven generated fields; VITE_CLOUD_MODEL is optional. The checker never prints values, rejects unknown/duplicate fields and placeholders, and checks formats. Do not add server keys or App Check debug tokens. Preflight reports each missing client field separately and lists six console-only items as UNVERIFIED. It has no console credentials and cannot determine those settings remotely.

For local validation, keep debug=true, run the following and open a new temporary Chrome profile yourself. Register that profile's generated debug token privately in App Check. Every fresh profile needs its own token. Never send the token to an agent.

npm run dev:live -- --port 5173 --strictPort

3. Genuine inference and production attestation — 15–25 minutes

In Firebase mode use fictional notes, permit the preview and confirm Gemini · cloud. A local-rules fallback is not a successful cloud call. Try Prepare Nano on an eligible device and preserve a real Gemini Nano · on device result if available. Do not claim it when unavailable. Check permission reset and export. Console verification must cover the registered Web app, enabled AI Logic/Gemini APIs, model access, App Check provider/site key, allowed domain/debug registration and enforcement.

Before hosting, allow only the actual hosted domain(s) in reCAPTCHA Enterprise, edit .env.local to debug=false, and run:

npm run configure -- --release
npm run preflight -- --release

The release preflight deliberately returns a nonzero status while console/live checks remain UNVERIFIED. Review those six items in your console and the genuine response yourself; do not describe a format check as a live certificate. No token or account access is needed by the script.

4. Publish reviewed source and Hosting — 15–20 minutes

Inspect the exact public list and create a clean export. It excludes every .env*, including examples, plus caches, output, builds, dependencies and browser data. Source setup is generated by configure.mjs, so no environment example is needed in the public repository.

npm run publish-check -- --refresh-manifest
npm run publish-check -- --export

Use only output/public-repo for the public repository. The export refuses an existing folder; rename an older export yourself before a new run. Personally create the public GitHub/GitLab repository, then use its supplied push commands from that clean folder. For example, after setting $PublicRepoUrl to your new empty repository's HTTPS URL:

git -C output/public-repo init
git -C output/public-repo add --all
git -C output/public-repo commit -m "Release HushBrief for BuildHybridAI"
git -C output/public-repo branch -M main
git -C output/public-repo remote add origin $PublicRepoUrl
git -C output/public-repo push -u origin main

Set the project ID locally (the placeholder below must be replaced), then deploy only Hosting. This build command opts into the owner's private configuration. Default npm run build produces a credential-free rehearsal build.

$DemoProjectId = 'YOUR_DEDICATED_DEMO_PROJECT_ID'
npm exec --yes --package=firebase-tools@15.36.0 -- firebase login
npm run build:live
npm exec --yes --package=firebase-tools@15.36.0 -- firebase deploy --only hosting --project $DemoProjectId

The supplied firebase.json serves dist with no stored project selection. No fake backend is deployed. A configured live build opens in Firebase mode automatically, with rehearsal controls hidden. Rehearsal remains explicitly labelled if selected. Confirm real cloud, offline reload and export in a clean profile; leave judging access free through 17 December 2026 06:00 SGT. Confirm the contest's production-key wording before releasing a client-configured bundle; Firebase web config is client-visible, while debug tokens/server credentials must remain private.

5. Record, inspect, upload and submit — 15–20 minutes

Use the hosted production attestation route, avoiding fresh-profile localhost debug-token registration during automated filming:

npm run record:demo -- --live --headed --url https://YOUR_DEMO_PROJECT.web.app

The script requires a genuine cloud badge and fails if it sees local recovery, device-only output or a mock. If it fails, fix the runtime cause before filming again. A Nano-capable device may use the preferred local route; use a genuine Nano-unavailable environment for the cloud scene. Nano proof, if obtained, needs its own genuine footage; the script does not simulate it in live mode.

Optional voice-over hook, after placing your own recording under output/:

npm run record:demo -- --live --headed --url https://YOUR_DEMO_PROJECT.web.app --voiceover output/voiceover.wav

No speech is synthesised. Without a track the MP4 is silent with burned-in English captions. FFmpeg is required for MP4; the script finds ffmpeg on PATH, FFMPEG_EXE, or an installed Python imageio-ffmpeg binary. Playwright downloads only its small recording encoder into the project cache on first run. Quick validation: append --quick; its short smoke video is not the submission cut.

Inspect the entire captioned MP4, recording-report.json, duration below 180 seconds, accurate source labels and absence of account data. Upload the live cut to YouTube Public yourself. Submit the repository, working URL, video and English description to Devpost, then verify the submitted entry logged out. Record the judged commit/tag before the deadline: 1 December 2026 06:00 SGT, preferably by 30 November 22:00 SGT.

Estimated owner active time: 75–110 minutes, plus any Nano download, provider approval, service troubleshooting or optional customer feedback. The automation removes manual scene timing, caption editing, repeated file selection and configuration-format guesswork; eligibility, real service acceptance and publication remain personal actions.