This repository contains the complete source code for the Fireact.dev project, combining the React frontend application and Firebase Cloud Functions backend code into a single, unified repository.
This repository is the main development workspace for the fireact.dev framework. It contains all the source code, development tools, and configurations needed to build and test the complete SaaS application framework locally.
This repository is configured for local development and testing. To ensure the Firebase emulators work correctly, you need to build both the React application and the Cloud Functions.
It uses:
- Firestore emulators for local database testing and development
- Stripe CLI for testing payment flows and webhook handling locally
- Firebase emulators for authentication and cloud functions testing
This repository follows a monorepo structure, combining the React application and Firebase Cloud Functions into a single codebase. The core components are organized into the following main packages:
-
packages/app/
: The React application package- Contains the complete React frontend application.
- Built with Vite, TypeScript, and TailwindCSS.
- Includes all UI components, pages, and client-side logic for authentication, user management, and subscription interfaces.
-
packages/functions/
: The Cloud Functions package- Contains all backend logic and API endpoints.
- Built with Firebase Cloud Functions and TypeScript.
- Handles server-side operations, Stripe webhooks, and database interactions, including subscription and payment processing.
In addition to the main packages, the repository includes the following important root-level directories:
functions/
: Contains Firebase Cloud Functions configuration and deployment files.src/
: The main source directory for the React application, containing its entry points and global styles.public/
: Stores static assets for the React application.
firebase.json
: Firebase project configuration.firestore.rules
: Firestore security rules.firestore.indexes.json
: Database indexes configuration.package.json
: Main project dependencies and scripts.vite.config.ts
: Vite build configuration for the React application.tailwind.config.js
: TailwindCSS configuration.tsconfig.app.json
: TypeScript configuration for the React application.tsconfig.json
: Base TypeScript configuration for the monorepo.tsconfig.node.json
: TypeScript configuration for Node.js environment.
- Node.js (v18 or higher)
- Firebase CLI
- Stripe CLI (for payment testing)
-
Install dependencies:
npm install && cd functions && npm install && cd ..
-
Build the application and functions:
npm run build && cd functions && npm run build && cd ..
-
Start Firebase emulators:
firebase emulators:start
-
Start Stripe CLI (in a separate terminal):
stripe listen --forward-to localhost:5001/your-project/us-central1/stripeWebhook
The development environment provides:
- Local Firestore database with emulated data
- Authentication emulator for user management testing
- Local cloud functions for API testing
- Stripe webhook testing via Stripe CLI
- Frontend: React 18, TypeScript, Vite, TailwindCSS
- Backend: Firebase Cloud Functions, TypeScript
- Database: Firebase Firestore
- Authentication: Firebase Auth
- Payments: Stripe
- Development: Firebase Emulators, Stripe CLI
For detailed setup instructions, API documentation, and deployment guides, visit the main project documentation at fireact.dev.
This is the main development repository for fireact.dev. When contributing:
- Make changes in the appropriate package (
packages/app/
orpackages/functions/
) - Test locally using the emulator suite
- Ensure all tests pass before submitting pull requests
This project is open source and available under the MIT License.