Firebase App Template
Full-stack app with Firebase Authentication and Firestore. The simplest way to get started with StackSolo.
Quick Start
Section titled “Quick Start”# Create projectstacksolo init --template firebase-app
# Install dependenciescd my-appnpm install
# Start developmentnpm run devWhat’s Included
Section titled “What’s Included”Frontend (React or Vue)
Section titled “Frontend (React or Vue)”- Firebase SDK initialization with emulator detection
- Auth context/composable with login, signup, logout
- Google sign-in support
- Protected routes
- Dashboard component
Backend
Section titled “Backend”- Express API on Cloud Functions
kernel.authMiddleware()for protected routes- Profile endpoint that syncs with Firestore
Project Structure
Section titled “Project Structure”├── apps/web/ # React or Vue frontend│ └── src/│ ├── firebase.ts # SDK init + emulator detection│ ├── contexts/ # AuthContext (React)│ ├── composables/ # useAuth (Vue)│ └── components/ # Login, Signup, Dashboard
├── functions/api/ # Express API│ └── src/│ └── index.ts # Protected endpoints
└── stacksolo.config.json # Infrastructure configDevelopment
Section titled “Development”The template auto-detects Firebase emulators in development:
// Automatically connects to emulators when VITE runs in dev modeif (import.meta.env.DEV) { connectAuthEmulator(auth, 'http://localhost:9099'); connectFirestoreEmulator(db, 'localhost', 8080);}Start emulators:
firebase emulators:start --only auth,firestoreAPI Endpoints
Section titled “API Endpoints”| Method | Path | Description |
|---|---|---|
| GET | /api/health | Health check (public) |
| GET | /api/profile | Get/create user profile (protected) |
Deployment
Section titled “Deployment”stacksolo deployThis creates:
- Cloud Functions API
- Firestore database
- Cloud Storage for frontend
- Load balancer with SSL