| name | build-web-app |
| description | Build a SaaS web application using the Fireact framework (Firebase + React + TypeScript + Stripe). Triggers on "build a web app", "create a SaaS app", "scaffold SaaS application", "fireact app", "SaaS with auth and billing". |
Build Web App
This skill guides you through building a complete SaaS web application using the Fireact open-source framework. Fireact provides authentication, subscription management, team collaboration, and Stripe billing out of the box — built on Firebase, React, TypeScript, and TailwindCSS.
When to Use This Skill
- User wants to create a new SaaS web application
- User wants an app with authentication, billing, and team management
- User asks about Fireact or wants to scaffold a Firebase + React + Stripe app
- User wants to add subscription management to a new project
What This Skill Does
- Scaffolds a complete SaaS app using the
create-fireact-app CLI
- Configures Firebase (Auth, Firestore, Cloud Functions)
- Sets up Stripe billing with subscription plans
- Enables team management with invitations and permissions
- Customizes branding and UI with TailwindCSS
- Deploys to Firebase Hosting
How to Use
Build me a SaaS app for a project management tool with free and pro plans
Create a web app with Google auth, Stripe billing at $0/$29/$99, and team support
Scaffold a Fireact app for my AI writing tool
Instructions
Step 1: Gather Requirements
Ask the user for the following (provide sensible defaults where possible):
Product name:
What the app does (one-line):
Auth providers needed (email/password, Google, GitHub):
Billing plans:
- Plan name, price, features (for each tier)
Team/multi-user support needed? (yes/no):
Target directory for the project:
If the user provides an app description without answering all questions, infer reasonable defaults:
- Default auth: email/password + Google
- Default plans: Free ($0), Pro ($29/mo), Enterprise ($99/mo)
- Default team support: yes
Confirm before proceeding.
Step 2: Prerequisites
Verify the following are installed:
node -v
firebase --version
stripe --version
The user also needs:
- A Firebase project (create at https://console.firebase.google.com)
- Enable Authentication (Email/Password + any OAuth providers)
- Enable Firestore Database
- Enable Cloud Functions (requires Blaze/pay-as-you-go plan)
- A Stripe account (create at https://dashboard.stripe.com)
- Create products and prices matching the billing plans
See references/installation.md for detailed setup instructions.
Step 3: Scaffold the Project
npm install -g create-fireact-app
create-fireact-app <project-name>
npx create-fireact-app <project-name>
The CLI will interactively ask for:
- Firebase project configuration (API key, auth domain, project ID, etc.)
- Stripe configuration (publishable key, secret key, webhook secret)
- Subscription plan details (name, Stripe price ID, features)
After scaffolding:
cd <project-name>
npm run build && cd functions && npm run build && cd ..
See references/installation.md for the complete setup flow.
Step 4: Configure Authentication
The scaffolded app includes authentication out of the box. Configure based on user requirements:
Email/Password (enabled by default):
- Sign up, sign in, password reset, email verification all work immediately
Google OAuth (if requested):
- Enable Google sign-in in Firebase Console → Authentication → Sign-in method
- Set
socialLogin.google to true in src/config/app.config.json
GitHub OAuth (if requested):
- Create a GitHub OAuth App at https://github.com/settings/developers
- Enable GitHub sign-in in Firebase Console → Authentication → Sign-in method
- Add the GitHub client ID and secret to Firebase
Role-Based Access Control:
- Three default permission levels:
access, editor, admin
- Configured in
functions/src/config/app.config.json
admin permission is the highest level and includes all lower permissions
See references/auth-setup.md for detailed configuration.
Step 5: Configure Billing
Set up Stripe subscription plans to match the user's pricing:
-
Create products in Stripe Dashboard:
- Go to Products → Add Product for each plan
- Create a recurring price for each product
- Copy the Price ID (e.g.,
price_1234...)
-
Update Stripe configuration:
Edit functions/src/config/stripe.config.json:
{
"key": "sk_test_YOUR_STRIPE_SECRET_KEY",
"plans": [
{
"id": "free",
"name": "Free",
"stripePriceId": "",
"price": 0,
"currency": "usd",
"frequency": "month",
"features": ["Feature 1", "Feature 2"],
"free": true
},
{
See references/billing-setup.md for detailed configuration.
Step 6: Configure Team Management (if needed)
Team management is built into Fireact. If the user needs it:
- Team creation: Users create a "subscription" (which acts as a team/workspace)
- Invitations: Team owners invite members via email
- Permissions: Three levels —
access (view), editor (edit), admin (full control)
- Data isolation: Each team's data is isolated in Firestore under its subscription ID
No additional configuration is needed for basic team management — it works out of the box after scaffolding.
See references/team-management.md for customization options.
Step 7: Customize Branding
- Edit TailwindCSS styles in the project's CSS files
- Update the app name in
src/config/app.config.json
- Add a logo and favicon to the public directory
- Customize page routes in
src/config/app.config.json under pages
Step 8: Test Locally
firebase emulators:start
stripe listen --forward-to http://127.0.0.1:5001/<project-id>/us-central1/stripeWebhook
Test the complete flow:
- Sign up for a new account
- Create a subscription (select a plan)
- Complete Stripe checkout (use test card
4242 4242 4242 4242)
- Verify dashboard loads with subscription data
- Invite a team member (if team management is enabled)
- Test plan upgrade/downgrade
- Test cancellation
Step 9: Deploy to Production
-
Update configuration for production:
- Set
emulators.enabled to false in src/config/firebase.config.json
- Use production Stripe API keys in
functions/src/config/stripe.config.json
-
Build for production:
npm run build
cd functions && npm run build && cd ..
-
Deploy to Firebase:
firebase deploy
-
Set up production Stripe webhook:
- Add webhook endpoint in Stripe Dashboard:
https://us-central1-<project-id>.cloudfunctions.net/stripeWebhook
- Update the webhook secret in
stripe.config.json and redeploy functions
See references/deployment.md for detailed deployment instructions including CI/CD setup.
Important Notes
- Firebase Blaze plan is required — Cloud Functions need the pay-as-you-go plan (still has a free tier)
- Stripe webhook secret changes between local and production — update
stripe.config.json accordingly
- Rebuild functions after config changes — always run
cd functions && npm run build after editing config files
- Firestore security rules must be deployed separately:
firebase deploy --only firestore
- The monorepo uses symlinks — the
packages/ directory contains symlinks to src/. Don't break these when editing.
- Use test mode in Stripe during development — test card:
4242 4242 4242 4242, any future expiry, any CVC
- Troubleshooting: See
references/troubleshooting.md for common issues and solutions