smallkirby / favrec

Home Page:https://fav.smallkirby.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FAVREC 💓

Lint Deploy

Development

# Install dependencies & Build functions with hot-reload (Shell A)
npm ci
cd functions && npm ci && npm run build:watch &

# Start emulators (Shell B)
npm run emulate

# Start server (Shell C)
npm run dev

Architecture

  • Hosting: Firebase Hosting with Next.js static export.
  • Functions: Proxies site data fetch to avoid CORS restriction.
  • Database: Firebase Firestore.

Emulators

All the three components can be emulated locally using firebase-tools. You can just run npm run emulate to start all the emulators.

Data is imported/exported from/to ./emulator-data directory.

Deployment

All the three components are deployed to Firebase using GitHub Actions with the service account.

Notes / Known Issues

  • FirebaseExtended/action-hosting-deploy does not support deployment other than Hosting.
  • firebase-tools somehow invokes permissin error when running deploy --only functions,firestore, while firebase deploy --only firestore,functions works fine.
  • firebase-functions module V2 cannot pass appropriate authorization info to onCall. Known issue.

About

https://fav.smallkirby.com

License:MIT License


Languages

Language:TypeScript 98.8%Language:JavaScript 0.5%Language:HTML 0.4%Language:CSS 0.3%