your-ai-workflow-firebase-os 1.14.10 → 1.14.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,6 +67,52 @@ npm install /path/to/your-ai-workflow-firebase-os-1.0.0.tgz # in your app
67
67
 
68
68
  Installing runs a postinstall step that patches the consumer project: it clears Vite's default CSS, writes `src/main.tsx` and `src/App.tsx` (both are owned by the library — see below), adds `yourAiFirebase()` from `your-ai-workflow-firebase-os/vite` and Tailwind to `vite.config.ts`, and creates `src/your-ai-workflow-firebase-os/` with the editable theme and configs. It writes no `GEMINI.md` / `AGENTS.md`: AI Studio reserves those filenames for the developer's own instructions, and a package writing them reads as prompt injection.
69
69
 
70
+ ### Starting from nothing (Claude Code, Codex, Antigravity)
71
+
72
+ In Google AI Studio the project, the `server.ts` and the Secrets tab all exist before the owner
73
+ arrives. On your own machine none of it does — so the first move is one block of text handed to
74
+ the assistant, not a list of commands for a person:
75
+
76
+ 1. Create a Vite + React + TypeScript app in the folder and delete the starter demo.
77
+ 2. `npm install your-ai-workflow-firebase-os`, then `npm install` once more (the install step adds Tailwind).
78
+ 3. Write `.env` in the project root — every value empty:
79
+
80
+ ```dotenv
81
+ # Firebase Configuration
82
+ VITE_FIREBASE_API_KEY=""
83
+ VITE_FIREBASE_AUTH_DOMAIN=""
84
+ VITE_FIREBASE_PROJECT_ID=""
85
+ VITE_FIREBASE_STORAGE_BUCKET=""
86
+ VITE_FIREBASE_MESSAGING_SENDER_ID=""
87
+ VITE_FIREBASE_APP_ID=""
88
+ STRIPE_SECRET_KEY=""
89
+ STRIPE_WEBHOOK_SECRET=""
90
+ RESEND_API_KEY=""
91
+ APP_NAME=""
92
+ ADMIN_EMAILS=""
93
+ EMAIL_FROM=""
94
+
95
+ # Admin Config
96
+ # Comma-separated list of admin emails
97
+ VITE_ADMIN_EMAILS=""
98
+
99
+ # AI features — server side only, never sent to the browser
100
+ GEMINI_API_KEY=""
101
+ ```
102
+
103
+ 4. `npm install express dotenv stripe` and `npm install -D tsx @types/express`, copy
104
+ `node_modules/your-ai-workflow-firebase-os/server.template.ts` to `server.ts` unchanged, and set the
105
+ dev script to `tsx server.ts`. Nothing is ever added to that file: every route lives in the package.
106
+ 5. `npm run dev`, then open the app — it lands on its Setup screen.
107
+
108
+ The Setup screen carries the same block behind a copy button. The switch at the top of `/setup`
109
+ ("I'm building with…") is what decides whether the whole walkthrough talks about the Secrets tab
110
+ and Apply, or about `.env` and restarting; the choice is remembered and the Payments and Email
111
+ screens read it too.
112
+
113
+ `GEMINI_API_KEY` is only needed if you later ask for something that uses AI, and it has no `VITE_`
114
+ prefix on purpose — the server reads it, the browser never sees it.
115
+
70
116
  ### What the build enforces
71
117
 
72
118
  The package ships a Vite plugin, `yourAiFirebase()`, that puts the project's structure out of the assistant's reach. `src/App.tsx` and `src/main.tsx` are owned files: the plugin serves its own canonical source for both and rewrites them on disk whenever they differ, so an edit there has no effect. Pages, forms and content files are discovered from `src/your-ai-workflow-firebase-os/configs/` and `microcomponents/` through a virtual module, so a deleted registry import can no longer make a page vanish. And every discovered file is validated before the build: a config file with the wrong name, a `route` that is not one string starting with `/`, an address used twice, a `*Tab.config.ts` without a valid `pageType`, a missing `*Config` export, a `systemName` that does not match the file, or a content file with no default export fails the build with one sentence that names the fix. A hand-written `<form>` in a content file only warns — its entries would never reach the Inbox.