{"id":50882472,"url":"https://github.com/wicanr2/co-car","last_synced_at":"2026-06-15T14:02:03.109Z","repository":{"id":363304567,"uuid":"1256721375","full_name":"wicanr2/co-car","owner":"wicanr2","description":"力行國泰員工接駁車線上預約系統 — Next.js 16 + Supabase + Vercel(工號+姓名登入、班次座位管理、RLS 截止鎖定、OpenStreetMap 路線)","archived":false,"fork":false,"pushed_at":"2026-06-08T10:34:07.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T11:18:00.637Z","etag":null,"topics":["nextjs","postgres","rls","shuttle-booking","supabase","tailwindcss","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://co-car.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wicanr2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-02T03:13:50.000Z","updated_at":"2026-06-08T10:34:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/wicanr2/co-car","commit_stats":null,"previous_names":["wicanr2/co-car"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/wicanr2/co-car","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wicanr2%2Fco-car","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wicanr2%2Fco-car/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wicanr2%2Fco-car/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wicanr2%2Fco-car/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wicanr2","download_url":"https://codeload.github.com/wicanr2/co-car/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wicanr2%2Fco-car/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34365597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextjs","postgres","rls","shuttle-booking","supabase","tailwindcss","typescript","vercel"],"created_at":"2026-06-15T14:02:02.091Z","updated_at":"2026-06-15T14:02:03.096Z","avatar_url":"https://github.com/wicanr2.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 力行國泰接駁車預約系統 (co-car)\n\n[![CI](https://github.com/wicanr2/co-car/actions/workflows/ci.yml/badge.svg)](https://github.com/wicanr2/co-car/actions/workflows/ci.yml)\n\n員工接駁車線上預約系統。**新竹市東區力行路11號 → 苗栗縣竹南鎮國泰路20號**,\n發車班次與座位上限由管理員設定(目前 08:40、5 位),預約日「前一天 17:00」截止。\n\n🔗 線上:**https://co-car.vercel.app**(登入:工號 + 中文姓名)\n\n\u003e 由 `frontend.md` 的 React 原型(localStorage 版)演進為 Next.js 16 + Supabase 多人系統。\n\u003e 架構與部署沿用 dinbando 範本(見 `PLAN.md`)。\n\n## 技術棧\n- **前端**:Next.js 16 (App Router) + Tailwind(薄荷綠主題,沿用原型視覺)\n- **後端**:Supabase(Postgres + Auth + Realtime + RLS)\n- **部署**:Vercel(production)+ Supabase Cloud\n\n## 核心概念(見 `CONTEXT.md`)\n| 詞 | 意義 |\n|---|---|\n| Reservation | 一筆預約,(emp_id, date) 一人一日一筆 |\n| Slot | 發車班次(departure_time),各有 capacity,admin 可增刪改 |\n| cutoff | 去程日「前一天」cutoff_hour:00(Asia/Taipei)截止 |\n| Admin | is_admin 員工:排班 / 班次設定 / 使用者管理 |\n\n## 本機開發\n```bash\nbash make-dev.sh          # 一鍵啟動(Supabase + dev server)\n# App     http://127.0.0.1:3101\n# Studio  http://127.0.0.1:54333\n# 登入     工號+姓名:admin/系統管理員(管理員)、A200112/張永裕(員工)\n```\n\n## 安全\n- 截止鎖定與權限由 **RLS(restrictive policy + auth hook 的 is_admin claim)** 在 DB 層強制,前端被繞過也擋得住。\n- 班次容量由 `before insert/update` trigger 原子檢查。\n- 無密碼模式:員工以「工號 + 中文姓名」登入(姓名即 Supabase 憑證),與 dinbando 一致;名單由 `scripts/import_users.py` 從 xlsx 匯入。\n- token 檔(`*-token-*.md`)、`.env*.local` 全程 gitignore + vercelignore。\n\n## 部署\n見 `.claude/skills/deploy-supabase-vercel/SKILL.md`(含四個踩坑修正)。\n\n## CI\n`.github/workflows/ci.yml`:每次 push / PR 跑 `typecheck → lint → build`(Node 22)。\n\n## License\n[MIT](./LICENSE) © 2026 L.CY (wicanr2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwicanr2%2Fco-car","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwicanr2%2Fco-car","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwicanr2%2Fco-car/lists"}