Skip to content

Firebase App Template

Full-stack app with Firebase Authentication and Firestore. The simplest way to get started with StackSolo.

Terminal window
# Create project
stacksolo init --template firebase-app
# Install dependencies
cd my-app
npm install
# Start development
npm run dev
  • Firebase SDK initialization with emulator detection
  • Auth context/composable with login, signup, logout
  • Google sign-in support
  • Protected routes
  • Dashboard component
  • Express API on Cloud Functions
  • kernel.authMiddleware() for protected routes
  • Profile endpoint that syncs with Firestore
├── 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 config

The template auto-detects Firebase emulators in development:

// Automatically connects to emulators when VITE runs in dev mode
if (import.meta.env.DEV) {
connectAuthEmulator(auth, 'http://localhost:9099');
connectFirestoreEmulator(db, 'localhost', 8080);
}

Start emulators:

Terminal window
firebase emulators:start --only auth,firestore
MethodPathDescription
GET/api/healthHealth check (public)
GET/api/profileGet/create user profile (protected)
Terminal window
stacksolo deploy

This creates:

  • Cloud Functions API
  • Firestore database
  • Cloud Storage for frontend
  • Load balancer with SSL