尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證I am developing this app to detect potholes on the road. People can takre pictures and post it online and higher authorities can see it and further steps for improvement can be done.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Citizen-powered pothole reporting with proof. Report a pothole with a photo and GPS, find out someone already did, upvote it instead of duplicating — and make sure every "fixed" claim is verified by a citizen before it counts.
The core idea: users create reports; locations create potholes. One pothole, many reports, one verified repair — instead of ten identical complaints.檢視完整 README ↗Live: https://pothhole-checker-frontend.vercel.app · API: https://pothholewatch-api.onrender.com/api/health · Discovery PRD
Citizen-powered pothole reporting with proof. Report a pothole with a photo and GPS, find out someone already did, upvote it instead of duplicating — and make sure every "fixed" claim is verified by a citizen before it counts.
The core idea: users create reports; locations create potholes. One pothole, many reports, one verified repair — instead of ten identical complaints.
| Login doors | Map home | Report flow |
|---|---|---|
| Pothole timeline | Potholes list | Admin console |
|---|---|---|
Every pothole gets a permanent ID (#BLR-00001), a status, report/upvote counts, and a full timeline: first reported → repaired → reported again → verified.
🟢 CITIZEN (login door: "I'm a citizen" — the door you pick is the role you get)
└── Report: photo + GPS + description
├── same pothole within 20 m? → YES, SAME POTHOLE (joins it)
└── potholes within 2 km? → upvote the existing one
🔴 REPORTED
│
🟠 ADMIN (login: "I work for the municipality")
└── Assign repair ──────────┐
🟠 IN_PROGRESS
│
🟠 ADMIN (acts as the crew) │
└── Start repair │
├── 📸 before photo (GPS ≤ 25 m of the pothole, required)
├── do the fix
└── 📸 after photo (GPS ≤ 25 m, must be newer)
🟣 AWAITING VERIFICATION
│
🟢 CITIZEN (a citizen who reported it)
└── "Did this actually get fixed?"
├── ✅ Yes, it's fixed → ✅ RESOLVED (REPAIRS +1, "Verified by citizen")
└── ❌ No, still broken → 🔴 REOPENED (back to the queue)
🔁 A repaired pothole reported again? Status honestly flips back to
REPORTED with a REPORTED_AGAIN event — the verified repair stays on
the permanent timeline. Never "came back"; it was re-asserted.
Rules that keep it honest: nobody marks a pothole fixed directly; repair
evidence must be captured on-site (GPS-gated); the crew cannot verify its
own repair; every step lands on the pothole's permanent timeline.
| Layer | Tech |
|---|---|
| Frontend | Vite · React 19 · TypeScript · Tailwind CSS v4 · shadcn/ui · React Router 7 · TanStack Query · Leaflet + OpenStreetMap · vite-plugin-pwa |
| Backend | Node · Express 5 · TypeScript · Zod · Prisma · PostgreSQL (Neon) |
| Storage | Cloudflare R2 (S3-compatible, presigned uploads — photos never touch the API server) |
| Auth | Google Identity Services + JWT httpOnly cookie |
| Layout | npm workspaces monorepo with a shared API contract package |
├── frontend/ # React PWA (features: map, reports, repairs, potholes, admin, community)
├── backend/ # Express API (routes → controllers → services), Prisma schema + migrations
└── shared/ # Zod schemas + inferred types — the API contract both sides consume
Prerequisites: Node 20+, a Neon Postgres database, a Google OAuth client (Web application), and a Cloudflare R2 bucket with an API token.
# 1. Install
npm install
# 2. Configure environment (fill in your real values)
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
# 3. Create the database schema
npm run prisma:generate --workspace backend
npx prisma migrate deploy --workspace backend # or: migrate dev
# 4. Build the shared contract
npm run build --workspace shared
# 5. Run (two terminals)
npm run dev:backend # Express API on http://localhost:3001
npm run dev:frontend # Vite app on http://localhost:5173
In Google Cloud Console, add http://localhost:5173 as an Authorized JavaScript origin, and put the client ID in both backend/.env (GOOGLE_CLIENT_ID) and frontend/.env (VITE_GOOGLE_CLIENT_ID).
| Variable | Purpose |
|---|---|
DATABASE_URL | Neon Postgres connection string |
GOOGLE_CLIENT_ID | OAuth client (frontend + backend) |
ADMIN_EMAILS / REPAIRER_EMAILS | Comma-separated allowlists that grant roles at login |
R2_* | Cloudflare account, keys, bucket for photo storage |
NEARBY_RADIUS_M / REPAIR_GPS_RADIUS_M / AREA_RADIUS_M | Matching thresholds: 20 m same-pothole, 25 m repair evidence, 2 km area sweep |
CITY_CODE | Prefix for pothole IDs (BLR-00001) |
All routes under /api, cookie-authenticated, Zod-validated, errors as { error: { message, code } }.
| Area | Endpoints |
|---|---|
| Auth | POST /auth/google · GET /me · POST /auth/logout |
| Uploads | POST /uploads/photo → presigned R2 PUT |
| Potholes | GET /potholes · GET /potholes/:idOrHumanCode · GET /potholes/nearby (20 m) · GET /potholes/nearby-area (2 km) · POST /potholes/:id/repairs · PATCH /potholes/:id/status (admin) · POST /potholes/:id/upvote |
| Reports | POST /reports · GET /reports (mine / all for admin) · GET /reports/:id/photo |
| Repairs | POST /repairs/:id/pickup · POST /repairs/:id/before-photo · POST /repairs/:id/after-photo · POST /repairs/:id/verify · GET /repairs/:id/evidence/:stage/photo |
Built as a civic-tech prototype — photos and locations submitted by users may be shared with municipal works departments.