尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證RE:GOV — Reimagine Government. Autonomous AI agent that transforms legacy PH government websites into modern, accessible, citizen-first sites (Muse Spark + SAM 3.1 + Muse Image, BetterGov Kapwa). Meta Global AI Developer Hackathon 2026.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Public websites deserve a second life. An autonomous AI agent that transforms legacy government websites into modern, accessible, citizen-first digital experiences. Live at regov.app.
Paste the URL of an old Philippine government WordPress site. The agent crawls it, uses SAM 3.1 and Muse Spark 1.3 (Meta Model API) to understand every page, rebuilds the site on the BetterGov.ph Kapwa design system with all content migrated, and hands back a migration report: what moved, what was image-only, what needs a human, which accessibility problems were fixed.
Built solo for the Meta Global AI Developer Hackathon 2026 (Indie track).
Build your own: the design system behind every reimagined site is open source. See it at regov.app/design-system and use it with AI tools by following docs/design-system.md, or jump to Build your own.
Every site RE:GOV produces is an unofficial, AI-generated concept for demonstration. The output is not operated by, endorsed by, or affiliated with the agency whose public website it was built from, or with any government body. Content is migrated automatically and may be incomplete or out of date. Previews are marked unofficial in the top bar, the footer and the page metadata, and are excluded from search indexing. Use the agency's official website for services and official information.
Thousands of .gov.ph and .edu.ph sites run on abandoned WordPress installs from the
2010s Government Web Template era. I migrated one by hand (UP Manila RGAO, WordPress →
Payload). It took weeks. This does the first 80% in minutes, on the design standard the
BetterGov.ph volunteers already defined for the whole government.
URL ─▶ crawl.ts ─▶ segment.ts ─▶ understand.ts ─▶ plan.ts ─▶ band.ts ─▶ site.json ─▶ Next.js + Kapwa
Playwright SAM 3.1 Muse Spark 1.3 Muse Spark 1.3 live preview
+ WP REST logo/seal vision + strict information + migration
cut-out JSON per page architecture report
| Step | Meta tool | What it does |
|---|---|---|
| Crawl | — | Polite same-origin crawl (robots.txt, 1 req/s). Full-page screenshots, HTML, visible text, link graph, WordPress REST when exposed. |
| Segment | SAM 3.1 | Noun-phrase prompts on the homepage screenshot. Finds the agency seal, cuts it out with the mask as alpha, reuses it as the new brand mark. |
| Understand | Muse Spark 1.3 | Screenshot + text → strict-schema PageModel: typed content blocks (people, steps, FAQ, tables, timelines, contact…), accessibility issues, migration notes. Image-only content is transcribed. |
| Plan | Muse Spark 1.3 | All page models → citizen-first SitePlan: nav, popular services, homepage sections, footer, redirects. |
| Identity band | Muse Image | Muse Spark writes an art brief from the site plan; Muse Image paints a wide header illustration in the Kapwa palette, unique to each agency or LGU. |
| Render | — | Next.js renders site.json live on Kapwa tokens and styles. No per-job build. |
| Report | — | Coverage, SAM overlay, accessibility findings, "needs a human" list, page-by-page mapping. |
After the rebuild:
src/pipeline/scores.ts, backfill with scripts/score.ts).src/pipeline/translate.ts).src/pipeline/ask.ts)./edit/<job> to correct names, positions, numbers and fees, and ticks each page once it matches the original. The agent's version is kept and can be restored (src/components/SiteEditor.tsx).site.json, an old-to-new redirect map and a README for the agency (src/lib/exportSite.ts). "Content as Markdown" gives one Markdown file per page with front matter, for any static site generator or CMS (src/lib/exportMarkdown.ts).site.json, published as versioned JSON Schema at regov.app/schema/site-model.v1.json (docs/site-model.md).Sites behind bot protection (Cloudflare challenges) fall back to the Wayback Machine: the crawler picks the archive month with the most real pages and rebuilds from that. Dead sites get a second life literally.
Every model response is cached on disk under jobs/<id>/models, so reruns are free and deterministic. MODEL_CACHE=replay rebuilds a saved job from those answers only. Model names and the provider are configurable (docs/models.md).
Without a model key, using the fictional sample site:
npm install
npx playwright install chromium
cp .env.example .env
npm run sample # installs Bayan ng Halimbawa as job "sample"
npm run dev # http://localhost:3000/preview/sample and /report/sample
With a key, on a real site:
# add MODEL_API_KEY from dev.meta.ai to .env
npx tsx --env-file=.env scripts/smoke.ts # proves Spark text, Spark vision+JSON, SAM 3.1 work
# one shot: crawl + build
node --env-file=.env node_modules/tsx/dist/cli.mjs scripts/pipeline.ts https://cda.gov.ph cda 30
npm run dev # http://localhost:3000 → dashboard, /preview/<job>, /report/<job>
Or use the dashboard: paste a URL, press Reimagine, watch the job page stream progress.
Runs are admitted by an in-process queue (src/lib/runQueue.ts); the app runs as one Node
process inside a single container, so the queue is authoritative. Defaults, all overridable
through environment variables:
| Variable | Default | Meaning |
|---|---|---|
RUN_CONCURRENCY | 2 | Pipelines allowed to run at once. Extra submissions wait in order and the job page shows their place. |
RUN_QUEUE_MAX | 8 | Waiting runs allowed. Past this the form answers "the agent is busy". |
RUN_RATE_LIMIT / RUN_RATE_WINDOW_MIN | 3 / 10 | Submissions per visitor IP per window. |
RUN_DAILY_MAX | 7 | Runs accepted per day, resetting at 8:00 AM Asia/Manila, counted from job status files so it survives restarts. Protects the Meta credit balance. |
RUN_STALL_MIN | 20 | A run whose status has not changed for this long is killed and reported as stalled, freeing its slot. |
RUN_DEDUPE_HOURS | none | A host that is running, waiting, or already finished is not rebuilt again; the visitor is sent to that run. Set this to allow a rebuild once the last one is that many hours old. Operators can always rerun from /admin. |
GET /api/run reports the live counts. To stop accepting new runs, set SUBMISSIONS=paused in .env and restart; the form answers with a friendly notice while runs in flight finish. Remove it to resume.
To host your own copy, see docs/self-hosting.md (Docker Compose, or a plain server the way regov.app runs).
src/pipeline/ crawl · segment · understand · plan · build · schema (zod → strict JSON schema)
src/lib/ meta.ts (one OpenAI-compatible client for api.meta.ai) · jobs.ts
src/components/site/ Shell (GOVPH strip, header, footer) · Pages (home, content) · Blocks
src/app/ / dashboard · /jobs/[id] progress · /preview/[id]/[...slug] · /report/[id] · /api/run
scripts/ pipeline · smoke · sample · schema · a11y · vps/ (deploy, hardening)
fixtures/sample/ a fictional site for development and CI
test/ unit tests (node:test via tsx)
docs/ architecture · models · site model · self-hosting
jobs/ per-job artifacts (gitignored)
Kapwa is the design system BetterGov.ph built for
Philippine government portals. Generated sites load its tokens, type scale and base styles
(@bettergov/kapwa/kapwa.css) and render their own blocks on top in an editorial layout:
square corners, ruled sections, numbered indexes, a stronger hero, service-first navigation,
sticky header with search, WCAG AA contrast and semantic structure. Kapwa's React components
(Button, Card, Banner, OfficialBiography…) are not used yet.
The design system is documented as a Claude Code skill in
.claude/skills/regov-design-system and rendered
live at regov.app/design-system. To run it locally, use
npm run sample and npm run dev, then open http://localhost:3000/design-system.
.claude/skills/. It
explains how to install the Kapwa tokens and which source files to copy from.docs/design-system.md shows how to use the skill with Claude Code, Cursor, Copilot or a chat assistant, with example prompts.
Whichever you choose, keep generated sites labelled as unofficial concepts and invent nothing: every fact keeps its source.
Issues and pull requests are welcome. Start with CONTRIBUTING.md: it covers running the app without a model key, the checks CI runs (lint, types, unit tests, build, and an axe-core accessibility gate) and good first contributions. docs/architecture.md explains how the pieces fit. Generated output must stay clearly marked unofficial.
Questions, ideas, new block types and ports to other platforms (WordPress, plain HTML and the rest) go in Discussions. An agency asking for a change: use the Feedback button on regov.app or write to [email protected]. Security problems: see SECURITY.md.
MIT. Generated sites remain unofficial concepts; agency names, seals and content belong to their respective institutions.
See ROADMAP.md.