Fireact Builder — Post-Installation Customization Skill
You help developers customize and extend their Fireact SaaS apps via natural language. This skill covers adding pages, replacing components, customizing navigation, branding, Cloud Functions, Firestore collections, and i18n.
1. Project Detection
Before doing anything, confirm this is a Fireact project:
- Check
package.json for @fireact.dev/app in dependencies
- Check
src/config/app.config.json exists
- Check
src/App.tsx imports from @fireact.dev/app
If any check fails, tell the user this doesn't appear to be a Fireact project and suggest running npx create-fireact-app first.
2. State Reading Protocol
MUST read these files before making any changes to understand the current project state:
| File |
What to learn |
src/App.tsx |
Current routing, imports, which components are local vs from @fireact.dev/app |
src/config/app.config.json |
Route paths, permissions, settings |
src/config/stripe.config.json |
Subscription plans |
src/i18n/en.ts |
Existing translation keys |
src/components/ (list files) |
Existing custom components |
functions/src/index.ts |
Existing Cloud Functions |
firestore.rules |
Existing security rules |
3. Customization Playbooks
A. Add New Subscription Page
Use when the user wants a page scoped to a subscription (e.g., "add a reports page", "add an analytics page").
Steps:
Create component at src/components/<PageName>.tsx:
- Import
useSubscription, useConfig, useTranslation from @fireact.dev/app
- Handle loading state (spinner) and error state (redirect to home)
- Use TailwindCSS for styling — no inline styles
- See
references/component-patterns.md for template
Add route key to src/config/app.config.json under pages:
"<pageName>": "/subscription/:id/<slug>"
Add route in src/App.tsx inside the SubscriptionProvider > SubscriptionLayout route block:
<Route path={appConfig.pages.<pageName>} element={
<ProtectedSubscriptionRoute requiredPermissions={['access']}>
<PageName />
</ProtectedSubscriptionRoute>
} />
Add import at top of src/App.tsx:
import PageName from './components/PageName';
Add i18n keys to src/i18n/en.ts (and other language files)
Optionally add to navigation menu (see Playbook E)
B. Add New Authenticated Page
Use when the user wants a page that requires login but is not scoped to a subscription (e.g., "add an API keys page", "add a settings page").
Steps:
Create component at src/components/<PageName>.tsx:
- Import
useAuth, useConfig from @fireact.dev/app
- See
references/component-patterns.md for template
Add route key to src/config/app.config.json under pages:
"<pageName>": "/<slug>"
Add route inside AuthenticatedLayout block in src/App.tsx:
<Route path={appConfig.pages.<pageName>} element={<PageName />} />
Add import and translations
C. Add New Public Page
Use when the user wants a page that doesn't require login (e.g., "add a landing page", "add a pricing page").
Steps:
Create component at src/components/<PageName>.tsx
Add route inside PublicLayout block in src/App.tsx:
<Route path="/<slug>" element={<PageName />} />
Add translations
D. Replace/Customize Existing Component
Use when the user wants to change an existing component from @fireact.dev/app (e.g., "customize the sign-in page", "change the dashboard").
Steps:
Identify which @fireact.dev/app component to replace (see references/component-patterns.md for the full export list)
Create local version at src/components/<ComponentName>.tsx maintaining the same hook/context contract as the original
Change import in src/App.tsx:
Reference references/component-patterns.md for the expected patterns of each component type
E. Customize Navigation
Use when the user wants to add, remove, or reorder navigation items.
Steps:
Create custom menu components (e.g., src/components/CustomSubscriptionDesktopMenu.tsx and CustomSubscriptionMobileMenu.tsx)
Follow the pattern: useLocation, useTranslation, useSubscription, useConfig, hasPermission()
Path replacement: use .replace(':id', subscription?.id || '') for subscription paths
Sidebar width classes:
[.w-20_&]:hidden — hide text when sidebar collapsed
[.w-64_&]:mr-4 — add margin for icon when sidebar expanded
[.w-20_&]:mx-auto — center icon when sidebar collapsed
Swap imports in src/App.tsx layout props:
- Remove
SubscriptionDesktopMenu / SubscriptionMobileMenu from @fireact.dev/app import
- Import custom versions
- Pass to
SubscriptionLayout desktopMenu and mobileMenu props
See references/navigation-customization.md for full reference.
F. Customize Branding & Theme
Use when the user wants to change colors, fonts, or logo.
Steps:
Modify tailwind.config.js for custom colors/fonts:
theme: {
extend: {
colors: {
primary: { /* custom palette */ }
}
}
}
Modify src/index.css for global styles
Create custom Logo component at src/components/Logo.tsx and import locally in App.tsx
SubscriptionLayout supports these props for nav theming:
navBackgroundColor — CSS class for nav background (e.g., "bg-blue-900")
navTextColor — CSS class for nav text (e.g., "text-blue-100")
G. Add Custom Cloud Functions
Use when the user wants to add backend logic.
Steps:
Create functions/src/<functionName>.ts:
import { onCall } from 'firebase-functions/v2/https';
export const myFunction = onCall(async (request) => {
// Access global config
const config = global.saasConfig;
// Your logic here
return { success: true };
});
Access global.saasConfig for permissions, plans, Stripe keys
Export from functions/src/index.ts:
export { myFunction } from './<functionName>';
Call from frontend:
import { httpsCallable } from 'firebase/functions';
const config = useConfig();
const myFunction = httpsCallable(config.functions, 'myFunction');
const result = await myFunction({ /* data */ });
Build: cd functions && npm run build
See references/cloud-functions-patterns.md for detailed patterns.
H. Add Firestore Collections & Custom Data
Use when the user wants to store and retrieve custom data.
Steps:
Use Firestore SDK with config.db from useConfig():
import { collection, doc, getDocs, addDoc } from 'firebase/firestore';
const config = useConfig();
// Read
const snapshot = await getDocs(collection(config.db, 'subscriptions', subscriptionId, 'myCollection'));
// Write
await addDoc(collection(config.db, 'subscriptions', subscriptionId, 'myCollection'), { ... });
Add security rules to firestore.rules following existing patterns:
match /subscriptions/{docId}/myCollection/{docId2} {
allow read: if request.auth != null
&& get(/databases/$(database)/documents/subscriptions/$(docId)).data.permissions.access.hasAny([request.auth.uid]);
allow write: if request.auth != null
&& get(/databases/$(database)/documents/subscriptions/$(docId)).data.permissions.admin.hasAny([request.auth.uid]);
}
Build components that read/write data using the patterns in references/component-patterns.md
4. Key Conventions (Always Follow)
- i18n: Use
useTranslation() with t('key') for ALL user-facing strings. Never hardcode display text.
- Loading/error states: Always handle in subscription components — show spinner while loading, redirect on error.
- TailwindCSS only: No inline styles. Use Tailwind utility classes.
- Route config: Always add route key to
src/config/app.config.json when adding a page.
- Subscription route protection: Always wrap subscription routes in
<ProtectedSubscriptionRoute requiredPermissions={[...]}>.
- Subscription URL pattern: Paths follow
/subscription/:id/<slug>.
- Verify after changes: Run
npm run build and cd functions && npm run build to confirm no errors.
5. References
For detailed API documentation and code templates, see:
- Hooks & Contexts API — All hooks, their return types, and exported TypeScript types
- Routing Patterns — Three route groups, ProtectedSubscriptionRoute, config mapping
- Component Patterns — Templates for subscription, authenticated, and public pages
- Navigation Customization — Menu component patterns, SubscriptionLayout props
- Cloud Functions Patterns — Backend function templates, global config, frontend calling
Source: fireact-dev/main — distributed by TomeVault.
1---2name: fireact-builder3description: Helps customize and extend Fireact SaaS apps after installation. Auto-detects Fireact projects by checking for @fireact.dev/app in package.json. Invoke when the user wants to add features, pages, custom components, navigation, branding, Cloud Functions, or i18n. Use when this capability is needed.4---56# Fireact Builder — Post-Installation Customization Skill78You help developers customize and extend their Fireact SaaS apps via natural language. This skill covers adding pages, replacing components, customizing navigation, branding, Cloud Functions, Firestore collections, and i18n.910---1112## 1. Project Detection1314Before doing anything, confirm this is a Fireact project:15161. Check `package.json` for `@fireact.dev/app` in dependencies172. Check `src/config/app.config.json` exists183. Check `src/App.tsx` imports from `@fireact.dev/app`1920If any check fails, tell the user this doesn't appear to be a Fireact project and suggest running `npx create-fireact-app` first.2122---2324## 2. State Reading Protocol2526**MUST read these files before making any changes** to understand the current project state:2728| File | What to learn |29|------|---------------|30| `src/App.tsx` | Current routing, imports, which components are local vs from `@fireact.dev/app` |31| `src/config/app.config.json` | Route paths, permissions, settings |32| `src/config/stripe.config.json` | Subscription plans |33| `src/i18n/en.ts` | Existing translation keys |34| `src/components/` (list files) | Existing custom components |35| `functions/src/index.ts` | Existing Cloud Functions |36| `firestore.rules` | Existing security rules |3738---3940## 3. Customization Playbooks4142### A. Add New Subscription Page4344Use when the user wants a page scoped to a subscription (e.g., "add a reports page", "add an analytics page").4546**Steps:**47481. **Create component** at `src/components/<PageName>.tsx`:49 - Import `useSubscription`, `useConfig`, `useTranslation` from `@fireact.dev/app`50 - Handle loading state (spinner) and error state (redirect to home)51 - Use TailwindCSS for styling — no inline styles52 - See `references/component-patterns.md` for template53542. **Add route key** to `src/config/app.config.json` under `pages`:55 ```json56 "<pageName>": "/subscription/:id/<slug>"57 ```58593. **Add route** in `src/App.tsx` inside the `SubscriptionProvider > SubscriptionLayout` route block:60 ```tsx61 <Route path={appConfig.pages.<pageName>} element={62 <ProtectedSubscriptionRoute requiredPermissions={['access']}>63 <PageName />64 </ProtectedSubscriptionRoute>65 } />66 ```67684. **Add import** at top of `src/App.tsx`:69 ```tsx70 import PageName from './components/PageName';71 ```72735. **Add i18n keys** to `src/i18n/en.ts` (and other language files)74756. **Optionally** add to navigation menu (see Playbook E)7677### B. Add New Authenticated Page7879Use when the user wants a page that requires login but is not scoped to a subscription (e.g., "add an API keys page", "add a settings page").8081**Steps:**82831. **Create component** at `src/components/<PageName>.tsx`:84 - Import `useAuth`, `useConfig` from `@fireact.dev/app`85 - See `references/component-patterns.md` for template86872. **Add route key** to `src/config/app.config.json` under `pages`:88 ```json89 "<pageName>": "/<slug>"90 ```91923. **Add route** inside `AuthenticatedLayout` block in `src/App.tsx`:93 ```tsx94 <Route path={appConfig.pages.<pageName>} element={<PageName />} />95 ```96974. **Add import and translations**9899### C. Add New Public Page100101Use when the user wants a page that doesn't require login (e.g., "add a landing page", "add a pricing page").102103**Steps:**1041051. **Create component** at `src/components/<PageName>.tsx`1061072. **Add route** inside `PublicLayout` block in `src/App.tsx`:108 ```tsx109 <Route path="/<slug>" element={<PageName />} />110 ```1111123. **Add translations**113114### D. Replace/Customize Existing Component115116Use when the user wants to change an existing component from `@fireact.dev/app` (e.g., "customize the sign-in page", "change the dashboard").117118**Steps:**1191201. **Identify** which `@fireact.dev/app` component to replace (see `references/component-patterns.md` for the full export list)1211222. **Create local version** at `src/components/<ComponentName>.tsx` maintaining the same hook/context contract as the original1231243. **Change import in `src/App.tsx`**:125 - Remove the component from the `@fireact.dev/app` destructured import126 - Add a local import:127 ```tsx128 import ComponentName from './components/ComponentName';129 ```1301314. **Reference** `references/component-patterns.md` for the expected patterns of each component type132133### E. Customize Navigation134135Use when the user wants to add, remove, or reorder navigation items.136137**Steps:**1381391. **Create custom menu components** (e.g., `src/components/CustomSubscriptionDesktopMenu.tsx` and `CustomSubscriptionMobileMenu.tsx`)1401412. **Follow the pattern**: `useLocation`, `useTranslation`, `useSubscription`, `useConfig`, `hasPermission()`1421433. **Path replacement**: use `.replace(':id', subscription?.id || '')` for subscription paths1441454. **Sidebar width classes**:146 - `[.w-20_&]:hidden` — hide text when sidebar collapsed147 - `[.w-64_&]:mr-4` — add margin for icon when sidebar expanded148 - `[.w-20_&]:mx-auto` — center icon when sidebar collapsed1491505. **Swap imports in `src/App.tsx`** layout props:151 - Remove `SubscriptionDesktopMenu` / `SubscriptionMobileMenu` from `@fireact.dev/app` import152 - Import custom versions153 - Pass to `SubscriptionLayout` `desktopMenu` and `mobileMenu` props154155See `references/navigation-customization.md` for full reference.156157### F. Customize Branding & Theme158159Use when the user wants to change colors, fonts, or logo.160161**Steps:**1621631. **Modify `tailwind.config.js`** for custom colors/fonts:164 ```js165 theme: {166 extend: {167 colors: {168 primary: { /* custom palette */ }169 }170 }171 }172 ```1731742. **Modify `src/index.css`** for global styles1751763. **Create custom Logo component** at `src/components/Logo.tsx` and import locally in `App.tsx`1771784. **SubscriptionLayout** supports these props for nav theming:179 - `navBackgroundColor` — CSS class for nav background (e.g., `"bg-blue-900"`)180 - `navTextColor` — CSS class for nav text (e.g., `"text-blue-100"`)181182### G. Add Custom Cloud Functions183184Use when the user wants to add backend logic.185186**Steps:**1871881. **Create** `functions/src/<functionName>.ts`:189 ```typescript190 import { onCall } from 'firebase-functions/v2/https';191192 export const myFunction = onCall(async (request) => {193 // Access global config194 const config = global.saasConfig;195 // Your logic here196 return { success: true };197 });198 ```1992002. **Access `global.saasConfig`** for permissions, plans, Stripe keys2012023. **Export from `functions/src/index.ts`**:203 ```typescript204 export { myFunction } from './<functionName>';205 ```2062074. **Call from frontend**:208 ```typescript209 import { httpsCallable } from 'firebase/functions';210211 const config = useConfig();212 const myFunction = httpsCallable(config.functions, 'myFunction');213 const result = await myFunction({ /* data */ });214 ```2152165. **Build**: `cd functions && npm run build`217218See `references/cloud-functions-patterns.md` for detailed patterns.219220### H. Add Firestore Collections & Custom Data221222Use when the user wants to store and retrieve custom data.223224**Steps:**2252261. **Use Firestore SDK** with `config.db` from `useConfig()`:227 ```typescript228 import { collection, doc, getDocs, addDoc } from 'firebase/firestore';229230 const config = useConfig();231232 // Read233 const snapshot = await getDocs(collection(config.db, 'subscriptions', subscriptionId, 'myCollection'));234235 // Write236 await addDoc(collection(config.db, 'subscriptions', subscriptionId, 'myCollection'), { ... });237 ```2382392. **Add security rules** to `firestore.rules` following existing patterns:240 ```241 match /subscriptions/{docId}/myCollection/{docId2} {242 allow read: if request.auth != null243 && get(/databases/$(database)/documents/subscriptions/$(docId)).data.permissions.access.hasAny([request.auth.uid]);244 allow write: if request.auth != null245 && get(/databases/$(database)/documents/subscriptions/$(docId)).data.permissions.admin.hasAny([request.auth.uid]);246 }247 ```2482493. **Build components** that read/write data using the patterns in `references/component-patterns.md`250251---252253## 4. Key Conventions (Always Follow)254255- **i18n**: Use `useTranslation()` with `t('key')` for ALL user-facing strings. Never hardcode display text.256- **Loading/error states**: Always handle in subscription components — show spinner while loading, redirect on error.257- **TailwindCSS only**: No inline styles. Use Tailwind utility classes.258- **Route config**: Always add route key to `src/config/app.config.json` when adding a page.259- **Subscription route protection**: Always wrap subscription routes in `<ProtectedSubscriptionRoute requiredPermissions={[...]}>`.260- **Subscription URL pattern**: Paths follow `/subscription/:id/<slug>`.261- **Verify after changes**: Run `npm run build` and `cd functions && npm run build` to confirm no errors.262263---264265## 5. References266267For detailed API documentation and code templates, see:268269- **[Hooks & Contexts API](references/hooks-and-contexts-api.md)** — All hooks, their return types, and exported TypeScript types270- **[Routing Patterns](references/routing-patterns.md)** — Three route groups, ProtectedSubscriptionRoute, config mapping271- **[Component Patterns](references/component-patterns.md)** — Templates for subscription, authenticated, and public pages272- **[Navigation Customization](references/navigation-customization.md)** — Menu component patterns, SubscriptionLayout props273- **[Cloud Functions Patterns](references/cloud-functions-patterns.md)** — Backend function templates, global config, frontend calling274275---276> Source: [fireact-dev/main](https://github.com/fireact-dev/main) — distributed by [TomeVault](https://tomevault.io).277<!-- tomevault:4.0:skill_md:2026-07-01 -->