This repository hosts a fully functional demonstration of the Fireact.dev application, created using the create-fireact-app CLI tool. It showcases all core functionalities and serves as a reference implementation for developers building their own SaaS applications.
The demo application includes:
- ✅ User sign-up with email/password
- ✅ User sign-in/sign-out
- ✅ Password reset functionality
- ✅ Email verification
- ✅ User profile management
- ✅ Password change
- ✅ Multiple subscription plans
- ✅ Subscription creation with Stripe
- ✅ Plan upgrades and downgrades
- ✅ Subscription cancellation
- ✅ Billing portal access
- ✅ Payment method management
- ✅ Default payment method selection
- ✅ Payment method removal
- ✅ Invoice history viewing
- ✅ Billing details updates
- ✅ Team member invitations
- ✅ Role-based permissions
- ✅ User invitation acceptance/rejection
- ✅ Team member removal
- ✅ Subscription ownership transfer
- ✅ Multiple language options
- ✅ Dynamic language switching
- ✅ Internationalized UI components
Visit our live demonstration at https://fireact.dev/demos/ to explore the full range of features and capabilities without setting up locally.
- Node.js (v18 or higher)
- Firebase CLI:
npm install -g firebase-tools - Stripe CLI: Installation Guide
- Firebase project with web app configured
- Stripe test account
-
Navigate to the demo directory:
cd demo -
Install dependencies:
# Install app dependencies npm install # Install functions dependencies cd functions npm install cd ..
-
Configure Firebase:
firebase login firebase use --add # Select your Firebase project -
Update configuration files:
Edit
src/config/firebase.config.jsonwith your Firebase project settings.Edit
functions/src/config/stripe.config.jsonwith your Stripe test keys. -
Build the application:
npm run build cd functions npm run build cd ..
-
Start Firebase Emulators:
firebase emulators:start
This starts:
- Hosting: http://localhost:5002
- Auth Emulator: http://localhost:9099
- Firestore Emulator: http://localhost:8080
- Functions Emulator: http://localhost:5001
- Emulator UI: http://localhost:4000
-
Set up Stripe webhook (in a separate terminal):
stripe listen --forward-to http://127.0.0.1:5001/<your-firebase-project-id>/us-central1/stripeWebhook
Copy the webhook secret (whsec_...) and update
functions/src/config/stripe.config.json, then rebuild functions.
Once running, you can test:
-
Sign Up:
- Create a new account
- Verify email (check emulator UI)
- Complete profile
-
Create Subscription:
- Choose a subscription plan
- Enter test card:
4242 4242 4242 4242 - Complete payment setup
-
Manage Subscription:
- View subscription details
- Invite team members
- Update billing details
- Change payment methods
- View invoices
-
Team Features:
- Invite users via email
- Accept/reject invitations
- Manage user permissions
- Remove team members
-
Test Scenarios:
- Upgrade/downgrade plans
- Cancel subscription
- Transfer ownership
- Change language
demo/
├── src/ # React application
│ ├── components/ # UI components
│ ├── contexts/ # React contexts
│ ├── hooks/ # Custom hooks
│ ├── config/ # Configuration
│ └── i18n/ # Translations
├── functions/ # Cloud Functions
│ └── src/
│ ├── functions/ # Backend functions
│ └── config/ # Backend configuration
├── public/ # Static assets
├── deploy/ # Production configs (not in git)
├── cloudbuild.yaml # CI/CD configuration
├── firebase.json # Firebase configuration
├── firestore.rules # Security rules
└── package.json # Dependencies
This demo includes a production-ready CI/CD pipeline using Google Cloud Build.
- Trigger: Push to main branch
- Build: Cloud Build executes
cloudbuild.yaml - Configuration: Fetches production configs from Cloud Storage
- Deploy: Deploys to Firebase Hosting and Functions
- Verification: Runs post-deployment checks
The cloudbuild.yaml file defines the build steps:
steps:
# 1. Fetch production configs from Cloud Storage
# 2. Install dependencies
# 3. Build React application
# 4. Build Cloud Functions
# 5. Deploy to Firebase
# 6. Clean upThe deploy/ folder is designed for production configurations:
Files (not in repository):
firebase.config.json- Production Firebase settingsstripe.config.json- Production Stripe keysplans.config.json- Production subscription plans.firebaserc- Firebase project reference
Security:
- Production configs stored in Google Cloud Storage bucket
- Retrieved during build process
- Never committed to version control
- Access controlled via IAM permissions
-
Create Cloud Storage bucket:
gsutil mb gs://your-project-configs
-
Upload production configs:
gsutil cp deploy/* gs://your-project-configs/ -
Configure Cloud Build trigger:
- Go to Google Cloud Console → Cloud Build → Triggers
- Create trigger for your repository
- Set branch: main
- Set build configuration: cloudbuild.yaml
-
Grant permissions:
# Allow Cloud Build to access configs gsutil iam ch serviceAccount:YOUR_PROJECT_NUMBER@cloudbuild.gserviceaccount.com:objectViewer gs://your-project-configs
This demo serves as:
- See how all features work together
- Understand component integration
- Learn best practices
- Test user workflows
- Verify payment processing
- Explore subscription management
- Clone and customize for your project
- Use as template for new features
- Reference for troubleshooting
- Show potential of Fireact.dev
- Demonstrate SaaS capabilities
- Present to clients or investors
To customize this demo for your own project:
-
Branding:
- Update logo in
public/ - Modify colors in
tailwind.config.js - Change app name in configuration
- Update logo in
-
Features:
- Add custom components in
src/components/ - Extend Cloud Functions in
functions/src/functions/ - Modify subscription plans in configuration
- Add custom components in
-
Internationalization:
- Add languages in
src/i18n/locales/ - Update translations for new features
- Add languages in
-
Deployment:
- Update
cloudbuild.yamlfor your pipeline - Configure your own Cloud Storage bucket
- Set up your Firebase project
- Update
For detailed documentation:
- Getting Started: docs.fireact.dev/getting-started
- Custom Development: docs.fireact.dev/custom-development
- API Reference: docs.fireact.dev/app
- Architecture: ../ARCHITECTURE.md
- Troubleshooting: ../TROUBLESHOOTING.md
- Website: fireact.dev
- Documentation: docs.fireact.dev
- GitHub Issues: Report bugs and issues
- Discussions: Community support and questions
This demo application is open source and available under the MIT License.