https://github.com/alp-kurt/firebase-backend-typescript
Firebase Cloud Functions + Firestore session API with a Vite React admin console. Includes auth, validation, rate limiting, idempotency, and CI/CD workflows.
https://github.com/alp-kurt/firebase-backend-typescript
backend ci-cd firebase gcp google-cloud-platform jest react typescript vite
Last synced: 4 months ago
JSON representation
Firebase Cloud Functions + Firestore session API with a Vite React admin console. Includes auth, validation, rate limiting, idempotency, and CI/CD workflows.
- Host: GitHub
- URL: https://github.com/alp-kurt/firebase-backend-typescript
- Owner: alp-kurt
- Created: 2026-02-04T01:13:10.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-04T23:16:12.000Z (5 months ago)
- Last Synced: 2026-02-05T04:43:18.302Z (5 months ago)
- Topics: backend, ci-cd, firebase, gcp, google-cloud-platform, jest, react, typescript, vite
- Language: TypeScript
- Homepage: https://alp-kurt.github.io/firebase-backend-typescript/
- Size: 594 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Firebase Session API (TypeScript)
Firestore-backed session management API on Firebase Cloud Functions with a small Vite React admin console.
## Live Demo
https://alp-kurt.github.io/firebase-backend-typescript/login
## Setup
1. Install backend dependencies:
```bash
cd functions
npm install
```
2. Install frontend dependencies:
```bash
cd ../frontend
npm install
```
3. Configure frontend env:
```bash
cp .env.example .env
```
Fill in `VITE_FIREBASE_*` values from your Firebase project.
## Run Locally
```bash
# from repo root
firebase emulators:start
```
Frontend dev server:
```bash
cd frontend
npm run dev
```
## Cloning & Firebase Projects
- After cloning, run `firebase login` and `firebase use --add` to select your own project.
- Emulators run locally without a Firebase project, but deployments require a selected project.
## Manual Firebase Setup
Some Firebase settings must be configured manually. See [`FirebaseSetup.md`](./FirebaseSetup.md).
## Deploy
Functions:
```bash
cd functions
npm run deploy:prod
```
Firestore rules:
```bash
cd functions
npm run deploy:rules
```
Predeploy checks (lint + test + build):
```bash
cd functions
npm run predeploy:check
```
Frontend (Firebase Hosting):
```bash
cd frontend
npm run deploy
```
Predeploy checks (lint + build):
```bash
cd frontend
npm run predeploy:check
```
GitHub Pages (tagged releases):
- Deploys on Release Published via GitHub Actions.
## API Docs
- Full endpoint list and examples: [`Endpoints.md`](./Endpoints.md)
- Tests: [`Tests.md`](./Tests.md)
- Changelog: [`CHANGELOG.md`](./CHANGELOG.md)
- Emulator guide: [`Emulators.md`](./Emulators.md)
## Decisions / Trade-offs
- Timestamps are serialized to ISO strings for client-friendly responses.
- Idempotency uses a Firestore collection + TTL for lightweight de-duplication.
- Rate limiting is in-memory per instance; Redis would be the next step for global limits.
More details: [`DesignChoices.md`](./DesignChoices.md)
## Author
[Alp Kurt](https://alpkurt.com) — krtalp@gmail.com