pgx
PGX — Lightweight Postgres for AI agents. Written in Rust. Thousands of isolated databases in one runtime. 🐘
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證COPA Tool - Web Dashboard
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Comprehensive Outdoor Playspace Audit (COPA) Tool (Frontend)
Enterprise-grade frontend for the Comprehensive Outdoor Playspace Audit (COPA) Tool.
This app is part of a hierarchical Audit Management System (Account → Projects → Places → Audits) and is designed to integrate with a FastAPI backend.
• Framework: Next.js 16 (App Router) + TypeScript
• Styling: Tailwind CSS
• UI: shadcn/ui
• Data: TanStack Query (React Query) + Axios
• Forms: React Hook Form + Zod
• Icons: Lucide React檢視完整 README ↗Enterprise-grade frontend for the Comprehensive Outdoor Playspace Audit (COPA) Tool.
This app is part of a hierarchical Audit Management System (Account → Projects → Places → Audits) and is designed to integrate with a FastAPI backend.
| Manager Dashboard | Auditor Dashboard | Administrator Dashboard |
|---|---|---|
| Manager Projects | Manager Places |
| Manager Place | Manager Project |
| Manager Audits | Manager Auditor |
| Manager Assignment | Manager Settings |
| Auditor Execute Page | Auditor Places Page |
| Auditor Reports Page | Auditor Report |
| Auditor Settings |
| Administrator Accounts | Administrator Projects |
| Administrator Places | Administrator Audits |
| Administrator Auditor | Administrator System |
| Administrator Settings |
place_audit_status, and place_survey_status statuses.PV / U pairs instead of a collapsed combined score.auditor_code (no real names displayed)./manager routes.Install dependencies:
pnpm install
Run the dev server:
pnpm dev
Open the app at [http://localhost:3000](http://localhost:3000).
Other useful commands:
pnpm lint
pnpm build
pnpm start
Visual regression coverage lives in tests/visual/ and uses Playwright for navigation/state setup plus Percy for visual review and diffing.
public/screenshots/ remains the home for curated README/docs assets.docs/visual-testing.md.Configure the FastAPI base URL in .env.local:
NEXT_PUBLIC_API_BASE_URL="http://127.0.0.1:8000"
If not set, the frontend defaults to http://127.0.0.1:8000.
Analytics is optional and controlled by two variables. Both tools only load in production builds — never in local dev or previews.
NEXT_PUBLIC_CLARITY_PROJECT_ID="your-clarity-project-id" # Microsoft Clarity (heatmaps + session replay)
NEXT_PUBLIC_GA_MEASUREMENT_ID="G-XXXXXXXXXX" # Google Analytics 4 (gtag.js)
When a variable is unset, that tool never loads.
Region-aware consent. The app determines the visitor's region on the server from the edge geo header (x-vercel-ip-country, EEA/UK/CH treated as consent-required):
denied (cookieless pings only) until the visitor accepts.The consent region set lives in src/lib/analytics/regions.ts. When no geo header is present, the app defaults to the stricter consent-required behavior.
This repo currently uses a frontend-only demo login that sets cookies in the browser to simulate an authenticated session.
src/lib/auth/role.ts):
playspace_role: "manager" or "auditor"playspace_access_token: bearer token (demo-generated for now)playspace_auditor_code: auditor-only identifierThe route guard is implemented in proxy.ts using those cookies:
/manager/** requires playspace_role="manager"/auditor/** requires playspace_role="auditor"/settings requires authentication (either role)/login/manager/dashboard/manager/projects/auditor/dashboard/auditor/execute/[placeId]/settingsProtected routes render inside a responsive AppShell with a sidebar (desktop) and a sheet drawer (mobile):
src/app/(protected)/layout.tsxsrc/components/app/app-shell.tsxThe navigation items are derived from the active role and rendered dynamically.
Axios client lives at src/lib/api/api-client.ts:
Authorization: Bearer <token> from playspace_access_token401, clears auth cookies and redirects to /loginThe audit execution UI is in:
src/app/(protected)/auditor/execute/[placeId]/page.tsx (server wrapper)src/app/(protected)/auditor/execute/[placeId]/audit-form.tsx (client form)Auto-save behavior:
PATCH (900ms) with a partial payload to:
PATCH /playspace/places/:placeId/audits/draftaudit, survey, or bothplace_audit_statusplace_survey_statusaudit_mean_scoressurvey_mean_scoresoverall_scoresPV {x} | U {y}Scoped conventions for this repo (keep .cursor/rules/ and .claude/rules/ in sync):
frontend-dashboard-core.mdc - role guards, shared dashboard components, API contract, UI copyfrontend-i18n-and-exports.mdc - messages/en.json + de.json, report views, PDF/Excel exportsSee CLAUDE.md and .claude/README.md. Workspace routing: ../.claude/AGENT_ROUTING.md → web-dashboard-ui.
src/app/(public) - unauthenticated pagessrc/app/(protected) - authenticated shell + role-specific routessrc/lib/auth - role/session cookie helpers (server + browser)src/lib/api - Axios client + interceptorssrc/components/app - application shell components