A comprehensive open-source framework for building production-ready SaaS applications with Firebase, React, TypeScript, and Stripe integration.
fireact.dev provides a complete foundation for building modern SaaS applications. It combines industry-standard technologies and best practices to help developers launch their SaaS products faster and more efficiently.
Visit our demos page to explore live demonstrations of both the Core and SaaS versions, showcasing the full range of features and capabilities.
- Authentication & User Management
- Complete authentication system (sign-up, sign-in, password reset)
- User profile management
- Role-based access control
- Team member invitations and permissions
- Subscription Management
- Multiple subscription plans support
- Stripe integration for payment processing
- Billing portal and invoice management
- Payment method management
- Subscription upgrades and downgrades
- TypeScript for better code quality
- TailwindCSS for responsive design
- Firebase emulator support for local development
- Comprehensive documentation
- Modular architecture
The repository is organized into several key directories:
source/: This directory contains the complete, combined source code for the Fireact.dev project, including both the React frontend application and Firebase Cloud Functions backend code. It follows a monorepo structure withpackages/appfor the React app andpackages/functionsfor the Cloud Functions.create-fireact-app/: Contains the CLI tool used to scaffold new Fireact applications.website/: The main marketing website for fireact.dev, built with Hugo.docs/: The documentation website for fireact.dev, built with Hugo.demo/: Contains the demo application.
To create a new Fireact application, use the create-fireact-app CLI tool. This tool will guide you through the setup process, including Firebase and Stripe configurations.
-
Install the CLI (if you haven't already):
npm install -g create-fireact-app
-
Create a new project:
create-fireact-app <your-project-name>
Replace
<your-project-name>with the desired name for your new application. -
Follow the prompts: The CLI will guide you through selecting your Firebase project and configuring Stripe.
-
After creation: Navigate into your new project directory:
cd <your-project-name>
Then, build the application and functions, and start the emulators:
npm run build && cd functions && npm run build && cd .. firebase emulators:start
For Stripe webhook testing, in a separate terminal:
stripe listen --forward-to http://127.0.0.1:5001/<your-firebase-project-id>/us-central1/stripeWebhook
Remember to update
functions/src/config/stripe.config.jsonwith the new webhook endpoint secret and rebuild functions (cd functions && npm run build) if the webhook secret changes.
- Frontend: React, TypeScript, TailwindCSS
- Backend: Firebase (Authentication, Firestore, Cloud Functions)
- Payment Processing: Stripe
- Development Tools: Vite, ESLint, PostCSS
Before deploying to production:
-
Update Configuration Files:
- Replace emulator settings with production Firebase config
- Use production Stripe API keys
- Set
emulators.enabledtofalsein firebase.config.json
-
Build for Production:
cd <your-project-name> npm run build cd functions npm run build cd ..
-
Test Production Build Locally:
firebase emulators:start --only hosting
Initial Deployment:
# Deploy everything
firebase deploy
# Or deploy specific services
firebase deploy --only hosting # React app
firebase deploy --only functions # Cloud Functions
firebase deploy --only firestore # Security rules & indexesSubsequent Deployments:
# Deploy only what changed
firebase deploy --only hosting,functionsUsing Multiple Firebase Projects:
# Set up aliases
firebase use --add
# Deploy to staging
firebase use staging
firebase deploy
# Deploy to production
firebase use production
firebase deployCreate .github/workflows/deploy.yml:
name: Deploy to Firebase
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: |
npm install
cd functions && npm install
- name: Build
run: |
npm run build
cd functions && npm run build
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}Get Firebase token:
firebase login:ci
# Save the token as GitHub secret: FIREBASE_TOKENSee demo/README.md for detailed Cloud Build setup with secure configuration management.
Verify Deployment:
- Check hosting URL:
https://your-project.web.app - Test authentication flow
- Verify Cloud Functions
- Check Firestore connectivity
- Test Stripe webhooks
Set Up Production Webhook:
# Add webhook endpoint in Stripe Dashboard
https://us-central1-your-project.cloudfunctions.net/stripeWebhook
# Use production webhook secret in stripe.config.jsonMonitor:
- Firebase Console → Functions logs
- Firebase Console → Analytics
- Stripe Dashboard → Webhooks
- Error tracking (recommended: Sentry, LogRocket)
For detailed deployment guides, see:
Visit fireact.dev for comprehensive documentation, including:
- Getting Started Guide
- Architecture Overview
- Component Documentation
- API Reference
- Custom Development Guide
- Troubleshooting Guide
We welcome contributions! Please read our Contributing Guidelines before submitting pull requests.
Key contribution areas:
- Bug fixes and improvements
- New features and components
- Documentation enhancements
- Example applications
- Test coverage
- Website: fireact.dev
- Documentation: docs.fireact.dev
- GitHub Issues: Report bugs and request features
- GitHub Discussions: Community questions and discussions
- Demo Application: Live Demo
This project is open source and available under the MIT License.
