尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Fault Line web app — Next.js 15, shares Supabase backend with the mobile app
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗The web client for Fault Line, a community infrastructure-accountability platform. Residents submit pothole / streetlight / drainage / signage reports with one tap; the system aggregates, verifies, and auto-escalates them to the responsible municipal authority with documentation that creates legal notice.
🌐 Live: app.fault-line.dev · marketing site · 📱 mobile app + backend
Most cities run a 311 system designed in the 1990s. Reports vanish, status updates don't happen, and individual complaints are easy to ignore. Every state has a notice-of-defect statute that creates municipal liability for unfixed reported hazards — but almost nobody triggers it because the documentation is too clunky. Fault Line is the documentation infrastructure: a one-tap photo becomes a community-verified, GPS-stamped, legally significant record that escalates automatically to the right authority.
This repo is the Next.js web client. The Expo/React Native mobile app + Supabase backend live in the Moonligh7er/FaultLine sibling repo. Both share the same database.
Next.js 15 (App Router, React 19) web app for Fault Line. Shares the same Supabase backend as the mobile app.
This app is built defensively. Every layer is hardened:
unsafe-inline for scripts. Nonces are generated in middleware, read by app/layout.tsx via headers(), and applied to every <Script> tag.next.config.ts:
Strict-Transport-Security: max-age=63072000; includeSubDomains; preloadX-Frame-Options: DENY, frame-ancestors 'none' in CSPReferrer-Policy: no-referrerPermissions-PolicyCross-Origin-Opener-Policy: same-origin, Cross-Origin-Resource-Policy: same-origin, Cross-Origin-Embedder-Policy: credentiallessOrigin doesn't match the app.next= param and auth callback reject anything that isn't a same-origin relative path.=+-@ prefixed with '), LIKE pattern escape on search, whitelist filters for category/status/state.dangerouslySetInnerHTML, eval, new Function — enforced by eslint-plugin-security.Read-only Open311 GeoReport v2 API, JSON only, public, CORS-enabled, rate-limited. It serves only reports that originated in Fault Line — any data ever imported from a city's own 311 system lives elsewhere and is never served here.
| Endpoint | Notes |
|---|---|
GET /open311/v2/services.json | Report categories as services |
GET /open311/v2/requests.json | Filters: jurisdiction_id (authority UUID), service_code, status=open|closed, start_date, end_date (default last 90 days), service_request_id (comma list). Max 1000 results. |
GET /open311/v2/requests/<uuid>.json | One request (one-item array, per spec) |
Example: https://app.fault-line.dev/open311/v2/requests.json?jurisdiction_id=<authority-uuid>&status=open
@supabase/ssr# 1. Install deps
npm install
# 2. Configure environment
cp .env.example .env.local
# Fill in Supabase URL + anon key, Upstash credentials, Sentry DSN
# 3. Dev
npm run dev # http://localhost:3000
# 4. Typecheck / lint / build
npm run check # tsc + eslint
npm run build # production build
.env.example in Project Settings.next.config.ts.src/
├── app/
│ ├── about/ # Static about page
│ ├── api/export/reports/ # CSV export (server-only, auth required)
│ ├── auth/callback/ # Magic link OAuth callback
│ ├── auth/signout/ # Sign out
│ ├── authority/ # Authority list + detail
│ ├── dashboard/ # Global reports dashboard
│ ├── login/ # Magic link login form + server action
│ ├── map/ # Leaflet map browser
│ ├── privacy/ # Privacy policy
│ ├── profile/ # User profile + reports
│ ├── report/[id]/ # Report detail
│ │ ├── insurance/ # Insurance claim package
│ │ └── legal/ # Legal demand letter
│ ├── search/ # Search reports
│ ├── submit/ # Submit a new report
│ ├── terms/ # Terms of service
│ ├── error.tsx # Global error boundary
│ ├── layout.tsx # Root layout (CSP nonce, GA, nav)
│ ├── not-found.tsx # 404 page
│ ├── page.tsx # Home
│ ├── robots.ts # robots.txt
│ └── sitemap.ts # sitemap.xml
├── components/
│ ├── LeafletMap.tsx # Client-only Leaflet wrapper
│ └── ShareButton.tsx # Web Share API button
├── lib/
│ ├── categories.ts # Report category constants
│ ├── csp.ts # CSP nonce + header builder
│ ├── env.ts # Zod-validated env
│ ├── insurance.ts # Claim evidence generator
│ ├── legal.ts # Demand letter generator
│ ├── rate-limit.ts # Upstash rate limiter
│ ├── supabase/ # SSR-safe Supabase clients
│ ├── types.ts # Database row types
│ └── zod-schemas.ts # Input validation + magic-byte check
└── middleware.ts # CSP nonces, CSRF origin check, auth refresh, route guards
@sentry/nextjs is installed but not wired) — create sentry.server.config.ts, sentry.client.config.ts, sentry.edge.config.ts once you have a DSNPRs and issues welcome. See CONTRIBUTING.md for setup and PR guidance, and SECURITY.md for the responsible-disclosure process if you find a vulnerability.
AGPL-3.0. The whole project is about civic transparency, so the license is too — anyone running modified versions as a service must offer the modified source to its users.
— Built by Moonlit Social Labs.