A full-stack web application built with React, Express.js, and Firebase.
- Frontend (
apps/frontend): React + Vite + Tailwind CSS (shadcn/ui) - Backend (
apps/backend): Express.js server with Firebase Authentication and Cloud Firestore
- Node.js
v24.8.0 - pnpm
v10.0.0+ - Docker Desktop (for containerized deployment)
- Firebase project with Firestore and Authentication enabled
Install Turborepo globally:
pnpm add turbo --globalInstall project dependencies:
pnpm iFrontend (apps/frontend/.env):
cp apps/frontend/.env.example apps/frontend/.envEdit apps/frontend/.env and add your Firebase configuration:
VITE_BACKEND_SERVER_URL=http://localhost:5000
VITE_FIREBASE_API_KEY=your-api-key
VITE_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
VITE_FIREBASE_APP_ID=your-app-id
VITE_FIREBASE_MEASUREMENT_ID=your-measurement-idBackend (apps/backend/.env):
cp apps/backend/.env.example apps/backend/.envEdit apps/backend/.env:
PORT=5000
NODE_ENV=development
FIREBASE_PROJECT_ID=your-project-idDownload your Firebase service account key from Firebase Console:
- Go to Project Settings > Service Accounts
- Click "Generate New Private Key"
- Save the file as
apps/backend/serviceAccountKey.json
turbo devThis will start:
- Frontend: http://localhost:5173
- Backend: http://localhost:5000
Download and install Docker Desktop
Create .env file in the project root:
cp .env.example .envEdit .env with your Firebase configuration:
FIREBASE_PROJECT_ID=your-project-id
VITE_BACKEND_SERVER_URL=http://localhost:5000
VITE_FIREBASE_API_KEY=your-api-key
VITE_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
VITE_FIREBASE_APP_ID=your-app-id
VITE_FIREBASE_MEASUREMENT_ID=your-measurement-idPlace your serviceAccountKey.json in apps/backend/
Development/Standard mode:
docker-compose up --buildProduction mode:
docker-compose -f docker-compose.prod.yml up -d --buildThis will start:
- Frontend: http://localhost (port 80)
- Backend: http://localhost:5000
# View logs
docker-compose logs -f
# Stop services
docker-compose down
# Rebuild after changes
docker-compose up --build
# View running containers
docker ps-
Go to Firebase Console
-
Create a new project or select existing
-
For Frontend (Web App Config):
- Go to Project Settings > General
- Scroll to "Your apps" section
- Click "Add app" > Web (if not created)
- Copy the config values
-
For Backend (Service Account):
- Go to Project Settings > Service Accounts
- Click "Generate New Private Key"
- Save as
apps/backend/serviceAccountKey.json
turbo dev- Start development servers (frontend + backend)turbo build- Build both applicationsdocker-compose up- Run with Dockerdocker-compose down- Stop Docker containers
Port already in use:
- Frontend default: 5173
- Backend default: 5000
- Change ports in respective package.json or .env files
Firebase Authentication Error:
- Verify
serviceAccountKey.jsonexists and is valid - Check
FIREBASE_PROJECT_IDmatches your Firebase project
Backend can't find serviceAccountKey.json:
- Ensure file exists at
apps/backend/serviceAccountKey.json - Check volume mount in
docker-compose.yml
Environment variables not working:
- Frontend vars are baked at build time - rebuild if changed
- Backend vars can be changed without rebuild
Docker Desktop not running:
- Start Docker Desktop and wait for it to initialize
For more Docker-specific troubleshooting, see DOCKER_SETUP.md
.envfiles (contains API keys)serviceAccountKey.json(Firebase admin credentials)
These are already in .gitignore for your safety.
- Frontend: React 19, Vite 7, TypeScript, Tailwind CSS, shadcn/ui
- Backend: Express.js 5, TypeScript, Firebase Admin SDK
- Database: Cloud Firestore
- Authentication: Firebase Auth
- Build Tool: Turborepo
- Package Manager: pnpm
- Deployment: Docker + nginx
[Add your license here]