{"id":50940661,"url":"https://github.com/sdcalmes/firebase-vercel-starter-template","last_synced_at":"2026-06-17T14:02:47.489Z","repository":{"id":352528000,"uuid":"1215484933","full_name":"sdcalmes/firebase-vercel-starter-template","owner":"sdcalmes","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-20T01:13:51.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-20T03:24:13.151Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdcalmes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-20T00:51:47.000Z","updated_at":"2026-04-20T01:13:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sdcalmes/firebase-vercel-starter-template","commit_stats":null,"previous_names":["sdcalmes/firebase-vercel-starter-template"],"tags_count":null,"template":true,"template_full_name":null,"purl":"pkg:github/sdcalmes/firebase-vercel-starter-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdcalmes%2Ffirebase-vercel-starter-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdcalmes%2Ffirebase-vercel-starter-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdcalmes%2Ffirebase-vercel-starter-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdcalmes%2Ffirebase-vercel-starter-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdcalmes","download_url":"https://codeload.github.com/sdcalmes/firebase-vercel-starter-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdcalmes%2Ffirebase-vercel-starter-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34451342,"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-17T02:00:05.408Z","response_time":127,"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":[],"created_at":"2026-06-17T14:02:42.748Z","updated_at":"2026-06-17T14:02:47.484Z","avatar_url":"https://github.com/sdcalmes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Firebase + Vercel Starter Template\n\nA minimal, production-ready scaffold for building apps on:\n\n- **Next.js 16 (App Router)** on **Vercel**\n- **Firebase** Auth / Firestore / Storage / Cloud Functions (v2)\n- **Bun**, **Vitest**, **Serwist** (PWA + Web Push), **Tailwind 4**\n- Optional **Upstash Redis** rate limiting and **Sentry** error monitoring\n\n\u003e Full setup instructions: **[`docs/firebase-vercel-template.md`](docs/firebase-vercel-template.md)**.\n\n## Quickstart\n\n```bash\n# 1. Bootstrap\nbun install\ncp .env.example .env.local\n# fill in your Firebase config (see docs)\n\n# 2. Run\nbun run emulators   # terminal 1\nbun dev             # terminal 2\n\n# 3. Deploy backend\necho 'NEXT_PUBLIC_FIREBASE_PROJECT_ID=my-app-prod' \u003e .env.prod\nbun run deploy:firebase\n\n# 4. Connect Vercel\n#    - import the repo in the Vercel dashboard\n#    - paste env vars from .env.example\n#    - push to main\n```\n\n## What's in the box\n\n| File / dir | Purpose |\n| --- | --- |\n| `src/lib/firebase/{config,admin}.ts` | Client + Admin SDK init, emulator auto-wiring, service-account parsing |\n| `src/lib/api-middleware.ts` | `verifyAuth(req)` and `verifyAdminRole(uid)` for API routes |\n| `src/lib/rateLimit.ts` + `rateLimitConfig.ts` | Upstash-or-memory rate limiter |\n| `src/lib/logger.ts` | JSON logs in prod, pretty logs in dev |\n| `src/context/AuthContext.tsx` | Email/password + Google sign-in, auto-creates `/users/{uid}` on first login |\n| `src/app/sw.ts` | Serwist service worker with Web Push handler |\n| `src/app/api/health/route.ts` | Liveness endpoint |\n| `firestore.rules` / `storage.rules` | Starting security rules (user-doc + per-user storage) |\n| `functions/src/index.ts` | Example `onSchedule` + `onDocumentCreated` triggers |\n| `functions/src/send.ts` | Web Push sender (prunes stale subscriptions) |\n| `scripts/deploy-firebase.sh` | One-shot deploy of rules, indexes, storage, functions |\n| `tests/rules/` + `tests/integration/` | Vitest suites that run against the Firestore emulator |\n| `.github/workflows/ci.yml` | Lint, typecheck, unit, build + integration tests on PR |\n\n## Decisions baked in\n\n- Scheduled work lives in **Cloud Functions**, not Vercel Cron — runs next to Firestore.\n- `FIREBASE_ADMIN_SERVICE_ACCOUNT_JSON` is the single source of server credentials (no split-field gymnastics).\n- Sentry wrapping is skipped entirely when `NEXT_PUBLIC_SENTRY_DSN` is unset — nothing to pay for until you want it.\n- Upstash is optional; the rate limiter falls back to an in-memory store so local dev doesn't need Redis.\n- PWA manifest + offline page + Web Push handler are wired up so you can opt into notifications without a refactor.\n\nSee the full docs for env vars, the Firebase console checklist, Vercel wiring, and common pitfalls.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdcalmes%2Ffirebase-vercel-starter-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdcalmes%2Ffirebase-vercel-starter-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdcalmes%2Ffirebase-vercel-starter-template/lists"}