尚未检测到更新。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.