create-ilorb 0.2.0 → 0.3.1

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
@@ -1,50 +1,54 @@
1
- # create-overture — installation in 1 command
1
+ # create-ilorb — install an Ilorb Code template in 1 command
2
+
3
+ Download a template from Ilorb Code (https://code.ilorb.com), unzip it and run, inside that folder:
2
4
 
3
5
  ```sh
4
- npm create overture@latest chat # Overture Chat (messaging app: iOS, Android and web)
5
- npm create overture@latest widgets # Overture Widgets (free: Opera chat and calls on any site)
6
- npm create overture@latest consultas # Overture Consultas (scheduling + payment through the Core + video at a set time)
7
- npm create overture@latest status # Overture Status (public status page + uptime monitor; no Opera)
8
- npm create overture@latest agenda # Overture Agenda (in-person booking + payment through the Core; public booking page + widget; no Opera)
9
- npm create overture@latest sites # Overture Sites (block-based site published to R2 from the panel; no Opera)
10
- npm create overture@latest starter # Overture Starter (SaaS base: organizations, plans and billing through the Core; web app on Pages)
11
- npm create overture@latest link # Overture Link (shortener, QR, bio, plans; click queue only on the paid plan)
12
- npm create overture@latest imoveis # Overture Imóveis (real-estate portal: SEO site + advertiser app + panel)
13
- npm create overture@latest quiz # Overture Quiz (quiz game; optional sample questions)
14
- npm create overture@latest helpcenter # Overture Help Center (help center + widget + requests by e-mail)
15
- npm create overture@latest classificados # Overture Classificados (classifieds site with SEO + app + moderation)
16
- # same thing: npx create-overture chat · with options: npm create overture@latest widgets -- --target local
6
+ npm create ilorb@latest chat # Ilorb Chat (messaging app: iOS, Android and web)
7
+ npm create ilorb@latest widgets # Ilorb Widgets (Ilorb Signal chat and calls on any site)
8
+ npm create ilorb@latest consultas # Ilorb Consultas (scheduling + payment through the Core + video at a set time)
9
+ npm create ilorb@latest status # Ilorb Status (public status page + uptime monitor)
10
+ npm create ilorb@latest agenda # Ilorb Agenda (in-person booking + payment through the Core; public booking page + widget)
11
+ npm create ilorb@latest sites # Ilorb Sites (block-based site published to R2 from the panel)
12
+ npm create ilorb@latest starter # Ilorb Starter (SaaS base: organizations, plans and billing through the Core; web app on Pages)
13
+ npm create ilorb@latest link # Ilorb Link (shortener, QR, bio, plans; click queue only on the paid plan)
14
+ npm create ilorb@latest imoveis # Ilorb Imóveis (real-estate portal: SEO site + advertiser app + panel)
15
+ npm create ilorb@latest quiz # Ilorb Quiz (quiz game; optional sample questions)
16
+ npm create ilorb@latest helpcenter # Ilorb Help Center (help center + widget + requests by e-mail)
17
+ npm create ilorb@latest classificados # Ilorb Classificados (classifieds site with SEO + app + moderation)
18
+ # also: delivery, cardapio, shop, faturas, cursos
19
+ # same thing: npx create-ilorb chat · with options: npm create ilorb@latest widgets -- --target local
17
20
  ```
18
21
 
19
- It asks for the license, asks a few questions, generates the buyer's project (Core + the product) already with the name, ids and theme,
22
+ Ilorb Code templates are free: no license is asked. The template's Ilorb key comes from the `ilorb.env` in the download.
23
+ It asks a few questions, generates the buyer's project (Core + the product) already with the name, ids and theme,
20
24
  creates everything in the **buyer's Cloudflare account** (D1, R2, Workers, Pages), applies the migrations, publishes, configures
21
25
  login through `/v1/admin/*` and prints the URLs and next steps. Running it again is safe: it continues where it stopped and does not
22
- duplicate anything. With `--target local` it brings up Core, Chat API, panel and app **on the computer**; the chat itself is Opera's
23
- in the cloud, with an **Opera TEST app** owned by the buyer (the Opera chat server is not in the package).
26
+ duplicate anything. With `--target local` it brings up Core, the product API, panel and app **on the computer**; the chat itself is
27
+ Ilorb Signal's in the cloud, with an **Ilorb Signal TEST app** owned by the buyer (the chat server is not in the package).
24
28
 
25
- > ⚠️ **npm name:** package `create-overture` (unscoped; free on npm on 2026-10-23) → `npm create overture`. The internal
26
- > packages use the scope `@operasourcecode/overture-*` (the `@overture` scope belongs to another organization). Nothing has been published.
29
+ > The folders and files keep their technical names (`overture-core/`, `overture-<product>/`, `.overture/`, `overture.json`,
30
+ > `overture.theme.json`): they are what the templates and installed projects expect.
27
31
 
28
32
  Node 20+ (tested on 22), pnpm (`npm i -g pnpm` or `corepack enable`). No runtime dependencies: just Node.
29
33
 
30
34
  ## Products (one `ProductSpec` per product in `src/products.ts`)
31
35
  Everything that differs from one product to another lives in a single registry — the steps (`src/steps.ts`), generation (`src/generate.ts`),
32
- `scripts/dev-local.mjs` and the fake license server only read the spec. New product = one new record + the templates.
36
+ `scripts/dev-local.mjs` and the fake license server (dormant license path) only read the spec. New product = one new record + the templates.
33
37
 
34
38
  | | `chat` | `widgets` | `consultas` |
35
39
  |---|---|---|---|
36
40
  | Product Worker / D1 | `<app>-chat` / `<app>-chat` (`overture-chat/api/workers`) | `<app>-widgets` / `<app>-widgets` (`overture-widgets/api/workers`) | `<app>-consultas` / `<app>-consultas` (`overture-consultas/api/workers`) |
37
41
  | Generated secrets (`.overture/secrets.env`) | `CHAT_SECRETS_KEY` | `WIDGETS_VISITOR_KEY`, `WIDGETS_SECRETS_KEY` | `PAYMENTS_TOKEN`, `PAYMENTS_CALLBACK_SECRET` — **the Core Worker also receives both** (same value: product → Core and the signed callback Core → product) |
38
- | Product Worker secrets | `CORE_SERVICE_TOKEN`, `SECRETS_KEY` (+ `OPERA_APP_SECRET`, `OPERA_CALLBACK_SECRET` if provided) | `CORE_SERVICE_TOKEN`, `VISITOR_KEY`, `SECRETS_KEY` (+ the Opera ones and `RESEND_API_KEY`, if provided) | `CORE_SERVICE_TOKEN`, `PAYMENTS_TOKEN`, `PAYMENTS_CALLBACK_SECRET` (+ the Opera ones and `RESEND_API_KEY`, if provided) |
42
+ | Product Worker secrets | `CORE_SERVICE_TOKEN`, `SECRETS_KEY` (+ `OPERA_APP_SECRET`, `OPERA_CALLBACK_SECRET` if provided) | `CORE_SERVICE_TOKEN`, `VISITOR_KEY`, `SECRETS_KEY` (+ the Ilorb Signal ones and `RESEND_API_KEY`, if provided) | `CORE_SERVICE_TOKEN`, `PAYMENTS_TOKEN`, `PAYMENTS_CALLBACK_SECRET` (+ the Ilorb Signal ones and `RESEND_API_KEY`, if provided) |
39
43
  | Worker vars | `CORE_URL`, `PRODUCT`, `OPERA_APP_ID`, `OPERA_CHAT_URL`, `OPERA_ROOMS_URL`, `CALL_MEDIA`, `APNS_BUNDLE_ID` | `CORE_URL`, `PUBLIC_URL` (the snippet), `OPERA_APP_ID`, `OPERA_CHAT_URL`, `OPERA_ROOMS_URL`, `CALL_MEDIA`, `CORS_ORIGINS` (= the panel), `EMAIL_FROM` | `CORE_URL`, `PRODUCT`, `PUBLIC_URL`, `APP_URL` (local), `OPERA_*`, `CALL_MEDIA`, `NOTIFY_MODE` (cloud `live`, local `log`), `CORS_ORIGINS` (panel + local web app), `EMAIL_FROM` · **cron `* * * * *`** (24 h/15 min reminders, expired locks; local: `dev-local` calls `/__scheduled` every minute on the Core and on Consultas) |
40
- | R2 | `<app>-media` | — (messages and media stay in Opera) | — |
44
+ | Product R2 | — (photos and voice messages go to Ilorb Signal; an unused `<app>-media` from older installs is left alone) | — (messages and media stay in Ilorb Signal) | — |
41
45
  | App | Expo (`overture-chat/app/react-native`): bundle id, `app.json`, `eas.json`, `expo export` in local | — (no mobile app: no bundle id, no EAS) | Expo (`overture-consultas/app/react-native`, `EXPO_PUBLIC_CONSULTAS_API_URL`) |
42
46
  | Build before deploy | — | `node build.mjs` in `overture-widgets/web/js` → `api/workers/src/generated/assets.ts` (the widget goes INSIDE the Worker; widget changed → build + deploy only the Widgets Worker) | — |
43
- | Core `settings.products` | `{id:"chat", name:<app name>, platforms:[ios,android,web], apiUrl}` | `{id:"widgets", name:"Overture Widgets", platforms:[web], apiUrl}` | `{id:"consultas", name:<app name>, platforms:[ios,android,web], apiUrl}` (`apiUrl` is where the payment callbacks go) |
47
+ | Core `settings.products` | `{id:"chat", name:<app name>, platforms:[ios,android,web], apiUrl}` | `{id:"widgets", name:"Ilorb Widgets", platforms:[web], apiUrl}` | `{id:"consultas", name:<app name>, platforms:[ios,android,web], apiUrl}` (`apiUrl` is where the payment callbacks go) |
44
48
  | Copied folders | the whole Core + `overture-chat/{api/workers,app/react-native,web/react}` + `vendor/…/packages` | Core (Worker, panel, `app/react-native/packages` + `tsconfig.base.json`) + `overture-widgets/{api/workers,web/js,web/react,shared}` + `vendor/…/packages` — **without** `overture-chat/`, the Core demo app and `overture-widgets/e2e` | Core (Worker with payments + `PAYMENTS-API.md`, panel, `app/react-native/packages`) + `overture-consultas/{api/workers,app/react-native,web/react}` + `vendor/opera-signal-475ec74/packages` |
45
49
  | Local (ports starting at 8871) | auth, api, panel, app | auth, api, panel and the **test page** with the snippet (`http://localhost:<site>/?w=<widget id>`) | auth, api, panel, app; payments SIMULATED by the Core |
46
50
 
47
- ### Status, Agenda and Sites (no Opera: no Opera keys, no TEST app in local)
51
+ ### Status, Agenda and Sites (no Ilorb Signal: no Ilorb Signal keys, no TEST app in local)
48
52
 
49
53
  | | `status` | `agenda` | `sites` |
50
54
  |---|---|---|---|
@@ -53,12 +57,12 @@ Everything that differs from one product to another lives in a single registry
53
57
  | Generated secrets | `STATUS_SECRETS_KEY` (32 bytes → the Worker's `SECRETS_KEY`: encrypts Telegram/webhooks, signs "sign out") | `PAYMENTS_TOKEN`, `PAYMENTS_CALLBACK_SECRET` — **the Core receives both** (same value) | — |
54
58
  | Worker secrets | `SECRETS_KEY` (+ `RESEND_API_KEY`, if provided) — **no** `CORE_SERVICE_TOKEN` | `CORE_SERVICE_TOKEN`, `PAYMENTS_TOKEN`, `PAYMENTS_CALLBACK_SECRET` (+ `RESEND_API_KEY`) | only the optional ones: `RESEND_API_KEY`, `TURNSTILE_SECRET` (env at installation, never a flag) |
55
59
  | Vars | `CORE_URL`, `PRODUCT`, `PUBLIC_URL` (the custom domain, if `--status-domain`), `NOTIFY_MODE` (cloud `live`, local `log`), `ENVIRONMENT`, `CORS_ORIGINS` (= panel), `EMAIL_FROM` · **cron `* * * * *`** (checks) | `CORE_URL`, `PRODUCT`, `PUBLIC_URL`, `NOTIFY_MODE`, `ENVIRONMENT`, `CORS_ORIGINS`, `EMAIL_FROM` · **cron `* * * * *`** (reminders, locks) | `CORE_URL`, `PRODUCT`, `PUBLIC_URL` (= the site), `NOTIFY_MODE`, `ENVIRONMENT`, `CORS_ORIGINS`, `EMAIL_FROM` · no cron |
56
- | `settings.products` | `{id:"status", name:"Overture Status", platforms:[web], apiUrl}` | `{id:"agenda", name:<app name>, platforms:[ios,android,web], apiUrl}` | `{id:"sites", name:<app name>, platforms:[web], apiUrl}` |
60
+ | `settings.products` | `{id:"status", name:"Ilorb Status", platforms:[web], apiUrl}` | `{id:"agenda", name:<app name>, platforms:[ios,android,web], apiUrl}` | `{id:"sites", name:<app name>, platforms:[web], apiUrl}` |
57
61
  | Copied folders | Core (Worker, panel, `app/react-native/packages` — with the **OFL fonts** the Core serves at `/v1/fonts/` and the Status page uses —, `THEME-API.md`) + `overture-status/{api/workers,web/react,README.md}` | Core (with payments) + `overture-agenda/{api/workers,web/react,web/embed,app/react-native}` | Core (packages: the server imports the theme) + `overture-sites/{api/workers,web/react,README.md}` |
58
62
  | Local (3 ports: auth, api, panel) | the page at `http://localhost:<api>/`; `dev-local` calls `/__scheduled` every minute | 5 ports (+ app and booking page); payments SIMULATED; cron every minute | publishing writes to local R2; the site at `http://localhost:<api>/` |
59
63
  | Custom domain | `--status-domain status.empresa.com` → `routes: [{pattern, custom_domain:true}]` + `PUBLIC_URL` (zone in the same account; token with Zone · Workers Routes · Edit) | — | manual (Worker Custom Domain + `PUBLIC_URL`), in the next steps |
60
64
 
61
- ### Starter and Link (no Opera; both bill through the Core: `PAYMENTS_TOKEN`/`PAYMENTS_CALLBACK_SECRET` identical on both Workers)
65
+ ### Starter and Link (no Ilorb Signal; both bill through the Core: `PAYMENTS_TOKEN`/`PAYMENTS_CALLBACK_SECRET` identical on both Workers)
62
66
 
63
67
  | | `starter` | `link` |
64
68
  |---|---|---|
@@ -71,7 +75,7 @@ Everything that differs from one product to another lives in a single registry
71
75
  | Extra question | — | **"do you have the paid Workers plan?"** (`--workers-paid` / `--no-workers-paid`; `--yes` = no): yes → creates the `<app>-link-clicks` queue and enables `queues` (producer `CLICKS` + consumer) in `wrangler.jsonc`; no → clicks go straight to D1. Local: never a queue |
72
76
  | Theme | — | the alias `overture-theme` → `./theme/entry.ts` → `../../../../overture-core/…` works the same in the buyer's project (the test checks that the files exist) |
73
77
 
74
- ### Imóveis, Quiz, Help Center and Classificados (no Opera)
78
+ ### Imóveis, Quiz, Help Center and Classificados (no Ilorb Signal)
75
79
 
76
80
  | | `imoveis` | `quiz` | `helpcenter` | `classificados` |
77
81
  |---|---|---|---|---|
@@ -105,23 +109,25 @@ cloud the CLI creates `<app>-theme` (step "Bucket R2", before the configuration)
105
109
  Core through the service route (the Core's `SERVICE_TOKEN` = the product's `CORE_SERVICE_TOKEN`).
106
110
 
107
111
  ## What it asks
108
- 1. **License** — Opera Source Code key (`osc1.…`) or Envato purchase code.
109
- 2. **App name** → becomes the resource `slug` (`meu-chat-auth`, `meu-chat-identity`…) and the suggested bundle id
112
+ 1. **App name** → becomes the resource `slug` (`meu-chat-auth`, `meu-chat-identity`…) and the suggested bundle id
110
113
  (`com.empresa.app`, from the owner's e-mail domain; webmail → `com.<app>.app`; override with `--bundle-id`). Only Chat has a
111
114
  bundle id (Widgets has no app; `--bundle-id` is ignored).
112
- 3. **Your e-mail** → the Core's `OWNER_EMAIL` (whoever signs in with it becomes the panel owner).
113
- 4. **Languages** (default all 4: pt, es, en, ar) → the Core's `settings.locales` (the 1st is the default; the app only shows these).
114
- 5. **Style + primary color** — colored swatches in the terminal (button, bubbles, light and dark) with the SAME `buildTheme`
115
+ 2. **Your e-mail** → the Core's `OWNER_EMAIL` (whoever signs in with it becomes the panel owner).
116
+ 3. **Languages** (default all 4: pt, es, en, ar) → the Core's `settings.locales` (the 1st is the default; the app only shows these).
117
+ 4. **Style + primary color** — colored swatches in the terminal (button, bubbles, light and dark) with the SAME `buildTheme`
115
118
  as the app; if the color lacks contrast, the CLI shows which shade it was corrected to. Goes to `overture.theme.json` and
116
- to the Core's `settings.theme`.
117
- 6. **Cloudflare account** (only if you have more than one).
118
- 7. **Opera keys** (App ID, App Secret and callback secret) — or "pular, configuro depois" (in the panel → Chat → Chaves do
119
- Opera; for Widgets: Widgets do site → Widgets → Conexão com o Opera e e-mail).
120
- With `--target local` these are the keys of a **TEST app** and are mandatory: without them the CLI stops at the step "Chaves do app de
121
- TESTE do Opera", explains how to create the test app in the Opera console and shows the `--resume` line.
122
- 8. **Sending the code by e-mail** (Resend key) — or skip: the owner signs in through the **first-access link** printed at the end.
123
-
124
- Then it shows the summary and asks for confirmation. With `--target local` questions 6 and 8 do not exist.
119
+ to the Core's `settings.theme`. Inside an Ilorb Code download customized on the template page, the zip's
120
+ `overture.theme.json` (next to `ilorb.env`) is the default answer — used as is with `--yes`, radius and font included —
121
+ unless `--style`/`--primary` or a saved state say otherwise; an invalid file is ignored with a one-line warning.
122
+ 5. **Cloudflare account** (only if you have more than one).
123
+ 6. **Ilorb Signal keys** (App ID, App Secret and callback secret) — taken from `ilorb.env` when the download has them; otherwise
124
+ asked, or "skip, I will set them later" (in the panel → Chat → Opera keys; for Widgets: Website widgets → Widgets →
125
+ Ilorb Signal connection and email).
126
+ With `--target local` these are the keys of a **TEST app** and are mandatory: without them the CLI stops at the step "Ilorb
127
+ Signal TEST app keys", explains how to create the test app in the Ilorb Signal console and shows the `--resume` line.
128
+ 7. **Sending the code by e-mail** (Resend key) — or skip: the owner signs in through the **first-access link** printed at the end.
129
+
130
+ Then it shows the summary and asks for confirmation. With `--target local` questions 5 and 7 do not exist.
125
131
 
126
132
  ## What each step does (cloud)
127
133
  The table is Chat's (20 steps). Widgets also has 20: without R2 (step 9) and with the **widget build** (`node build.mjs`)
@@ -129,18 +135,17 @@ between the migrations and the deploys; the product Worker is `<app>-widgets` wi
129
135
 
130
136
  | # | step | what it does | idempotent because… |
131
137
  |---|---|---|---|
132
- | 1 | License | checks the Ed25519 signature offline; `POST /v1/licenses/activate` | same installation = same activation |
133
- | 2 | Project files | downloads the templates through the activation (sha256), copies Core + product + `vendor/` | done once |
138
+ | 1 | Project files | copies Core + product + `vendor/` from the unzipped template folder | done once |
134
139
  | 3 | Secrets | `MASTER_KEY`, `ADMIN_TOKEN`, `SERVICE_TOKEN` (read-only, Chat → Core) and `CHAT_SECRETS_KEY` (encrypts the keys the Chat panel stores) generated → `.overture/secrets.env` (0600) | never replaces one that exists |
135
140
  | 4 | Dependencies | `pnpm install --frozen-lockfile` in the 4 projects | only redoes it if the lockfile changes |
136
141
  | 5 | Cloudflare account | token (`CLOUDFLARE_API_TOKEN`) or `wrangler login` | — |
137
142
  | 6 | workers.dev | discovers `<sub>.workers.dev` (without a token: from the 1st deploy) | — |
138
143
  | 7–8 | D1 `<app>-identity`, `<app>-chat` | looks it up; creates it if missing | looks up first; **exists and isn't ours → stops** |
139
- | 9 | R2 `<app>-media` | looks it up; creates it | same |
144
+ | 9 | R2 `<app>-theme` | the Core appearance bucket (logo, favicon): looks it up; creates it | same |
140
145
  | 10 | Pages `<app>-admin` | looks it up; creates it (the real subdomain comes from Cloudflare) | same |
141
146
  | 11 | Configuration | `wrangler.jsonc` with ids/URLs/vars, `app.json`, `eas.json`, `overture.json` | redoes only if something changed |
142
147
  | 12–13 | Migrations | `wrangler d1 migrations apply --remote` | D1 keeps track of what was already applied |
143
- | 14–15 | Workers | `wrangler deploy --secrets-file` (0600 file deleted right after). Core: `MASTER_KEY`, `ADMIN_TOKEN`, `SERVICE_TOKEN`. Chat: `CORE_SERVICE_TOKEN`, `SECRETS_KEY` (+ the Opera ones, if provided) — **Chat does not receive the `ADMIN_TOKEN`** | redoes only if config/secret changed |
148
+ | 14–15 | Workers | `wrangler deploy --secrets-file` (0600 file deleted right after). Core: `MASTER_KEY`, `ADMIN_TOKEN`, `SERVICE_TOKEN`. Chat: `CORE_SERVICE_TOKEN`, `SECRETS_KEY` (+ the Ilorb Signal ones, if provided) — **Chat does not receive the `ADMIN_TOKEN`** | redoes only if config/secret changed |
144
149
  | 16–17 | Panel | `vite build` with `VITE_AUTH_URL` and `wrangler pages deploy` | redoes only if the auth URL changed |
145
150
  | 18 | Core | `PUT /v1/admin/settings` (name, theme, **languages**, product with the Chat server's `apiUrl`, panel CORS) and e-mail with code as the primary method | reads first; only writes what changed |
146
151
  | 19 | First-access link | `POST /v1/admin/bootstrap-link` (ADMIN_TOKEN) → **single-use, 15 min** panel link, printed at the end (only the masked version in the on-disk log; never in the state) | always runs: each run generates a new link and invalidates the previous one |
@@ -149,8 +154,8 @@ between the migrations and the deploys; the product Worker is `<app>-widgets` wi
149
154
  Before creating a resource the CLI records the **intent** in the state: if it crashes between "created" and "saved", the resume
150
155
  adopts the resource instead of reporting a conflict.
151
156
 
152
- `--target local`: 1–4, Opera TEST app keys (stops with the path if missing), free ports (starting at 8871),
153
- configuration + `.dev.vars` (the product API points to `https://chat.operasignal.com` and `https://api.operasignal.com` with the
157
+ `--target local`: 1–4, Ilorb Signal TEST app keys (stops with the path if missing), free ports (starting at 8871),
158
+ configuration + `.dev.vars` (the product API points to `https://chat-signal.ilorb.app` and `https://api-signal.ilorb.app` with the
154
159
  TEST app), local D1s (identity and product), panel and web app builds (`expo export --clear`; Widgets: the widget build
155
160
  instead), sweep, brings up Core Auth, API, panel and app (Widgets: the test page) through `scripts/dev-local.mjs` and
156
161
  configures the Core. It keeps running until Ctrl+C. Afterwards: `pnpm dev` in the project folder.
@@ -160,12 +165,12 @@ port>` and open `http://localhost:<port>/?w=<widget id>` — the page carries th
160
165
  (`<script src="http://localhost:<api>/w.js" data-widget="wdg_…" async>`). Widgets e-mail goes to the Worker log
161
166
  (`EMAIL_MODE=log`).
162
167
 
163
- **Callbacks in local:** cloud Opera cannot reach the buyer's `localhost`, so **push and reports via callback**
168
+ **Callbacks in local:** cloud Ilorb Signal cannot reach the buyer's `localhost`, so **push and reports via callback**
164
169
  do not arrive. To test them: `cloudflared tunnel --url http://localhost:<api port>` and set
165
- `<tunnel URL>/v1/opera/callback` as the TEST app's callback in the Opera console — or deploy to the cloud. The rest
170
+ `<tunnel URL>/v1/opera/callback` as the TEST app's callback in the Ilorb Signal console — or deploy to the cloud. The rest
166
171
  (login, conversations, messages, photos, panel) works without it. The CLI shows this at the end of the local installation.
167
172
 
168
- **The package does NOT ship the Opera chat server:** from `vendor/opera-signal-475ec74/` (Chat) or `vendor/opera-signal-a2d9876/`
173
+ **The package does NOT ship the Ilorb Signal chat server:** from `vendor/opera-signal-475ec74/` (Chat) or `vendor/opera-signal-a2d9876/`
169
174
  (Widgets: the SDK with the chat scope in the token) only `packages/` (SDK: chat, uikit, client, protocol, server-auth, callkit)
170
175
  and `tsconfig.base.json` are shipped. `apps/` is never copied (`copyTemplates` refuses and the
171
176
  tests check that the generated project has no `apps/chat` file).
@@ -175,23 +180,20 @@ tests check that the generated project has no `apps/chat` file).
175
180
  | flag | env | meaning |
176
181
  |---|---|---|
177
182
  | `chat` \| `widgets` \| `consultas` \| `status` \| `agenda` \| `sites` \| `starter` \| `link` \| `imoveis` \| `quiz` \| `helpcenter` \| `classificados` | | the product |
178
- | `[pasta]` | | default: `./<name slug>` |
183
+ | `[folder]` | | default: `./<name slug>` |
179
184
  | `--target cloud\|local` | | default `cloud` |
180
185
  | `--yes` / `-y` | | no questions (something missing → says which flag to pass) |
181
186
  | `--dry-run` | | shows the plan (every command and call) **without creating anything**, not even the folder |
182
- | `--resume [pasta]` | | continues where it stopped (reads `.overture/`) |
187
+ | `--resume [folder]` | | continues where it stopped (reads `.overture/`) |
183
188
  | `--lang pt\|es\|en` | `OVERTURE_LANG`, `LANG` | installer language (Arabic still falls back to English) |
184
- | `--log <arquivo>` | | color-free copy of the output |
185
- | `--license <chave>` | `OVERTURE_LICENSE` | `osc1.…` key |
186
- | `--purchase-code <código>` | `ENVATO_PURCHASE_CODE` | Envato |
187
- | `--license-server <url>` | `OVERTURE_LICENSE_SERVER` | default `https://api.operasourcecode.com` |
188
- | `--templates <pasta>` | `OVERTURE_TEMPLATES` | use a templates folder instead of the download (development) |
189
+ | `--log <file>` | | color-free copy of the output |
190
+ | `--templates <folder>` | `OVERTURE_TEMPLATES` | the template folder (default: the folder you run it in, an unzipped download) |
189
191
  | `--name`, `--owner-email`, `--languages`, `--style`, `--primary`, `--bundle-id` | | the answers |
190
192
  | `--account-id <id>` | `CLOUDFLARE_ACCOUNT_ID` | Cloudflare account |
191
193
  | | `CLOUDFLARE_API_TOKEN` | token (without it, uses `wrangler login`) |
192
- | `--opera-app-id <app_…>` | `OPERA_APP_SECRET`, `OPERA_CALLBACK_SECRET` | Opera keys (secret never by flag); in local, from a TEST app |
193
- | `--skip-opera` | | configure later |
194
- | `--email-from <remetente>` | `RESEND_API_KEY` | code e-mail (without `--email-from`, uses `<App> <login@owner's domain>`) |
194
+ | `--ilorb-app-id <app_…>` | `ILORB_APP_SECRET`, `ILORB_CALLBACK_SECRET` | Ilorb Signal keys (secret never by flag; default: `ilorb.env`); in local, from a TEST app. The older names `--opera-app-id`, `OPERA_APP_SECRET`, `OPERA_CALLBACK_SECRET` still work (and win) |
195
+ | `--skip-ilorb` | | configure later (older name: `--skip-opera`) |
196
+ | `--email-from <sender>` | `RESEND_API_KEY` | code e-mail (without `--email-from`, uses `<App> <login@owner's domain>`) |
195
197
  | `--skip-email` | | configure later |
196
198
  | `--status-domain <host>` | | Status: the page's own domain (Custom Domain + `PUBLIC_URL`) |
197
199
  | `--short-domain <host>` | | Link: own short domain (Custom Domain + `PUBLIC_URL`) |
@@ -208,18 +210,34 @@ Secrets only through environment variables or a hidden prompt — never by flag
208
210
  ## Resuming
209
211
  Any failure ends with what happened, what to do and the exact command line:
210
212
  ```
211
- ✖ Sem conexão com a Cloudflare.
212
- O que fazer: Confira a internet e --resume.
213
- Para continuar de onde parou: npx create-overture --resume meu-chat
213
+ ✖ No connection to Cloudflare.
214
+ What to do: Check the internet and --resume.
215
+ To continue from where it stopped: npx create-ilorb --resume my-chat
216
+ ```
217
+ The state lives in `my-chat/.overture/install.json` (no secrets). Running the original command again also resumes.
218
+ Changed an answer (e.g. `--ilorb-app-id`)? Only the affected steps run again.
219
+
220
+ ## Template updates (`create-ilorb update`, `src/update.ts`)
221
+ ```
222
+ npm create ilorb@latest update # in the project: "You have X, latest is Y" + the notes in between
223
+ npm create ilorb@latest update -- --apply ../ilorb-code-chat # 3-way plan against the unzipped new download (writes nothing)
224
+ npm create ilorb@latest update -- --apply ../ilorb-code-chat --yes # apply it
214
225
  ```
215
- The state lives in `meu-chat/.overture/install.json` (no secrets). Running the original command again also resumes.
216
- Changed an answer (e.g. `--opera-app-id`)? Only the affected steps run again.
226
+ - Version of the project: `ilorb-template.json` → `.overture/install.json` (`template`) → README footer `Package <id> <version>`.
227
+ Site: `--site` > `ILORB_CODE_URL` > the `site` in `ilorb-template.json` > `https://code.ilorb.com`
228
+ (`GET /api/templates/:id/latest` and `/changes?from=`; notes in the CLI language).
229
+ - The download needs a sign-in, so the command never downloads: the buyer unzips the new version NEXT TO the project.
230
+ - Per file, against the hashes saved at install time: unchanged by the buyer → replaced; changed by the buyer and by us →
231
+ theirs kept, ours written as `<file>.ilorb-new`; new → added; removed upstream → listed, never deleted. Never touched:
232
+ `ilorb.env`, `.env*` (not `.env.example`), `.dev.vars`, databases, `node_modules`, `.git`, `.overture`, symlinks.
233
+ Installs from before this feature have no hashes: every difference becomes a `.ilorb-new`.
217
234
 
218
235
  ## What stays in the buyer's project
219
236
  ```
220
237
  overture.json the choices (versioned, no secrets)
221
238
  overture.theme.json the theme
222
- .overture/ state, log, license (0600) and secrets.env (0600) — outside git
239
+ ilorb-template.json template id + version (copied from the download; read by `create-ilorb update`)
240
+ .overture/ state (+ sha256 of every shipped template file), log, license (0600) and secrets.env (0600) — outside git
223
241
  overture-core/… overture-chat/… (or overture-widgets/…) vendor/… the templates (same paths as the repository)
224
242
  scripts/dev-local.mjs pnpm dev (local only)
225
243
  ```
@@ -233,7 +251,7 @@ panel → Formas de entrar, or run again with `RESEND_API_KEY` and `--email-from
233
251
  and also prints the link.
234
252
 
235
253
  ## Configure later from the panel
236
- - **Opera keys** skipped → panel → **Chat → Chaves do Opera** (App ID, app secret, callback secret, "Testar
254
+ - **Ilorb Signal keys** skipped → panel → **Chat → Opera keys** (App ID, app secret, callback secret, "Testar
237
255
  conexão" and the exact callback URL). They are stored encrypted in Chat's D1 and take precedence over the Worker secrets.
238
256
  - **Push** (FCM/APNs) → panel → **Chat → Push** (with a test push and the latest deliveries).
239
257
  - **Widgets**: the widget itself (colors, greeting, hours, **allowed domains**, who answers, calls) and the snippet →
@@ -248,7 +266,7 @@ Storage · Edit; Cloudflare Pages · Edit; Account Settings · Read; User · Use
248
266
  - **D1** (2 databases): https://developers.cloudflare.com/d1/platform/pricing/
249
267
  - **R2** (every installation: the Core's `<app>-theme`; + `<app>-media` on Chat, `<app>-sites-files` on Sites and `<app>-link-media` on Link; enabling R2 requires a payment method even on the free tier): https://developers.cloudflare.com/r2/pricing/
250
268
  - **Pages** (the panel): https://developers.cloudflare.com/pages/functions/pricing/ and https://www.cloudflare.com/plans/developer-platform/
251
- - **Opera Signal** (chat, calls): the table in the Opera console/site (operasignal.com) — Opera pricing is the owner's decision.
269
+ - **Ilorb Signal** (chat, calls): the pricing on the Ilorb Signal site (signal.ilorb.app).
252
270
  - **Resend** (code e-mail): https://resend.com/pricing
253
271
  - **Expo EAS** (cloud app build, optional): https://expo.dev/pricing
254
272
  - **Stores:** Apple Developer Program https://developer.apple.com/support/enrollment/ · Google Play https://support.google.com/googleplay/android-developer/answer/6112435
@@ -257,11 +275,11 @@ Storage · Edit; Cloudflare Pages · Edit; Account Settings · Read; User · Use
257
275
  ```sh
258
276
  export PATH=$HOME/.nvm/versions/node/v22.23.2/bin:$PATH
259
277
  pnpm install
260
- pnpm typecheck && pnpm test # tsc + Vitest (226 tests: license, generation, plan, simulated/real provider with fakes, first-access link, local without Opera, the 12 products, theme R2 and Core fonts, accountUrl)
278
+ pnpm typecheck && pnpm test # tsc + Vitest (315 tests: brand guard, generation, plan, simulated/real provider with fakes, first-access link, local without Ilorb Signal, dormant license path, the 12 products, theme R2 and Core fonts, accountUrl)
261
279
  pnpm build && pnpm e2e # Chat: LOCAL end-to-end with 2 Chrome instances (writes docs/terminal-local.txt and docs/e2e/01–07)
262
280
  pnpm build && pnpm e2e:widgets # Widgets: installs local, creates the widget, the test page loads w.js and the visitor opens the conversation (docs/e2e/08–09)
263
281
  pnpm build && pnpm e2e:consultas # Consultas: installs local, identical payment secrets on Core and Consultas, cron, the owner creates a professional + service in the panel (docs/e2e/10)
264
- pnpm build && pnpm e2e:status # Status: no Opera, ports 23200–23299, the owner signs in through the link, sees "Status", creates a monitor, the cron checks and the page responds (docs/e2e/11)
282
+ pnpm build && pnpm e2e:status # Status: no Ilorb Signal, ports 23200–23299, the owner signs in through the link, sees "Status", creates a monitor, the cron checks and the page responds (docs/e2e/11)
265
283
  pnpm build && pnpm e2e:agenda # Agenda: identical payment secrets, cron, the owner sees "Agenda", creates a service in the panel and a customer books through the public page (docs/e2e/12, 16)
266
284
  pnpm build && pnpm e2e:sites # Sites: R2 FILES, the owner sees "Site", creates the home page, publishes to local R2 and the site responds (docs/e2e/13)
267
285
  pnpm build && pnpm e2e:starter # Starter: web app with EXPO_PUBLIC_WEB_URL, the owner sees "Starter" and changes the Pro free trial in the panel (docs/e2e/14)
@@ -271,10 +289,10 @@ pnpm build && pnpm e2e:quiz # Quiz: sample questions imported in local,
271
289
  pnpm build && pnpm e2e:helpcenter # Help Center: widget compiled first, /help, /widget.js, panel "Central de ajuda" (docs/e2e/19)
272
290
  pnpm build && pnpm e2e:classificados # Classificados: the INSTALADOR.md checks through the CLI, post-installation steps, "Classificados" (docs/e2e/20)
273
291
  ```
274
- The e2e is 100% local: it brings up Opera's chat itself from the copy in `vendor/` (only in OUR repository) and passes the CLI the
292
+ The e2e is 100% local: it brings up Ilorb Signal's chat itself from the copy in `vendor/` (only in OUR repository) and passes the CLI the
275
293
  INTERNAL variable `OVERTURE_INTERNAL_OPERA_CHAT_URL` (not documented to the buyer) + its own test app keys —
276
- it never touches the published Opera. Each e2e runs in an ISOLATED state (`os.tmpdir()/overture-e2e-<product>-<pid>`, or `E2E_STATE_DIR`) and only deletes that folder:
277
- the Opera chat in the tests uses its own config with absolute paths and `--persist-to` there — never the `.wrangler` of
294
+ it never touches the published Ilorb Signal. Each e2e runs in an ISOLATED state (`os.tmpdir()/overture-e2e-<product>-<pid>`, or `E2E_STATE_DIR`) and only deletes that folder:
295
+ the Ilorb Signal chat in the tests uses its own config with absolute paths and `--persist-to` there — never the `.wrangler` of
278
296
  `vendor/` (shared with other sessions). The status/agenda/sites/starter/link e2e pass `OVERTURE_INTERNAL_PORT_BASE=23200` (also internal) so local uses the range
279
297
  23200–23299 (inspectors starting at 23250).
280
298
  ```sh
@@ -283,4 +301,5 @@ node tools/fake-license-server.mjs --mint chat # a TEST l
283
301
  ```
284
302
  - `src/theme/vendor/{color,tokens}.ts` are faithful copies of `overture-core/app/react-native/packages/theme/src` (the test
285
303
  checks it). Changed there → copy again.
286
- - The store contract is in `LICENSE-API.md`.
304
+ - The dormant license path (`--license`, `--purchase-code`, `--license-server`; not used by Ilorb Code templates) and its store
305
+ contract are described in `LICENSE-API.md` in the repository.
@@ -18,7 +18,7 @@ const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..')
18
18
  const L = JSON.parse(readFileSync(join(ROOT, 'overture.json'), 'utf8'))
19
19
  const ports = L.local?.ports
20
20
  if (!ports) {
21
- console.error('overture.json sem "local.ports": rode o create-overture com --target local primeiro.')
21
+ console.error('overture.json sem "local.ports": rode o create-ilorb com --target local primeiro.')
22
22
  process.exit(1)
23
23
  }
24
24
  // what changes per product (same as create-overture's ProductSpec): the product Worker, how to tell it is up, statics
@@ -201,5 +201,5 @@ console.log(`OVERTURE_READY ${JSON.stringify(URLS)}`)
201
201
  if (!process.env.OVERTURE_CHILD && PRODUCT.noOpera) {
202
202
  console.log(`\n ${L.appName} — tudo de pé:\n painel ${URLS.admin}\n${URLS.app ? ` app ${URLS.app}\n` : ''}${URLS.site && !PRODUCT.site ? ` reservas ${URLS.site}\n` : ''} ${L.product === 'status' ? 'página' : L.product === 'sites' ? 'site ' : 'api '} ${URLS.api}/\n login ${URLS.auth}\n\n ${PRODUCT.cron ? (PRODUCT.cron.startsWith('* ') ? 'O cron roda a cada minuto; o' : PRODUCT.cron.startsWith('*/') ? 'O cron roda a cada ' + PRODUCT.cron.slice(2).split(' ')[0] + ' min; o' : 'O cron roda de hora em hora; o') : 'O'}s avisos só vão para o log (NOTIFY_MODE=log).\n\n Ctrl+C derruba tudo.`)
203
203
  } else if (!process.env.OVERTURE_CHILD) {
204
- console.log(`\n ${L.appName} — tudo de pé:\n painel ${URLS.admin}\n ${URLS.app ? `app ${URLS.app}` : `teste ${URLS.site}/?w=<id do widget>`}\n login ${URLS.auth}\n api ${URLS.api}\n chat ${L.urls?.opera ?? 'https://chat.operasignal.com'} (Opera na nuvem, app de TESTE)\n\n Callbacks do Opera (push, denúncias) não chegam aqui: cloudflared tunnel --url ${URLS.api}\n e ponha <URL do túnel>/v1/opera/callback no seu app de TESTE no console do Opera.\n\n Ctrl+C derruba tudo.`)
204
+ console.log(`\n ${L.appName} — tudo de pé:\n painel ${URLS.admin}\n ${URLS.app ? `app ${URLS.app}` : `teste ${URLS.site}/?w=<id do widget>`}\n login ${URLS.auth}\n api ${URLS.api}\n chat ${L.urls?.opera ?? 'https://chat.operasignal.com'} (Ilorb Signal na nuvem, app de TESTE)\n\n Callbacks do Ilorb Signal (push, denúncias) não chegam aqui: cloudflared tunnel --url ${URLS.api}\n e ponha <URL do túnel>/v1/opera/callback no seu app de TESTE no console do Ilorb Signal.\n\n Ctrl+C derruba tudo.`)
205
205
  }
package/dist/args.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // argv → { positionals, flags }. "--x=1", "--x 1", "--no-x" and known booleans.
2
- export const BOOLEAN_FLAGS = new Set(['yes', 'dry-run', 'resume', 'help', 'version', 'skip-opera', 'skip-email', 'no-serve', 'serve', 'workers-paid', 'sample-data']);
2
+ export const BOOLEAN_FLAGS = new Set(['yes', 'dry-run', 'resume', 'help', 'version', 'skip-opera', 'skip-ilorb', 'skip-email', 'no-serve', 'serve', 'workers-paid', 'sample-data']);
3
3
  export function parseArgs(argv) {
4
4
  const positionals = [];
5
5
  const flags = {};
package/dist/generate.js CHANGED
@@ -4,11 +4,13 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
4
4
  import { join } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { copyTree, isIgnored, readJson, readJsonc, walk, writeFileAtomic, writeJson } from "./fsutil.js";
7
- import { COPY_EXCLUDE, COPY_EXCLUDE_RE, CORE_R2, FORBIDDEN_TEMPLATE_RE } from "./products.js";
7
+ import { COPY_EXCLUDE, COPY_EXCLUDE_RE, CORE_R2, FORBIDDEN_TEMPLATE_RE, appScheme, optionalTemplates } from "./products.js";
8
8
  import { formatEnv } from "./state.js";
9
9
  export function copyTemplates(templatesRoot, dir, product) {
10
10
  let n = 0;
11
- for (const rel of product.templates) {
11
+ // the required list + the optional files this template folder has (DOCS.md)
12
+ const optional = optionalTemplates(product).filter((rel) => existsSync(join(templatesRoot, rel)));
13
+ for (const rel of [...product.templates, ...optional]) {
12
14
  // the Opera chat server (vendor/…/apps) NEVER goes to the buyer — not even if someone puts it in the list
13
15
  if (FORBIDDEN_TEMPLATE_RE.test(rel))
14
16
  throw new Error(`template proibido: ${rel}`);
@@ -153,7 +155,7 @@ function applyAppConfig(dir, rel, product, a, urls, local) {
153
155
  const e = appJson.expo;
154
156
  e.name = a.appName;
155
157
  e.slug = a.slug;
156
- e.scheme = a.slug;
158
+ e.scheme = appScheme(a);
157
159
  e.ios = { ...e.ios, bundleIdentifier: a.bundleId };
158
160
  e.android = { ...e.android, package: a.bundleId };
159
161
  e.web = { ...e.web, name: a.appName };
@@ -206,7 +208,7 @@ export function writeRootFiles(dir, a, product, readme) {
206
208
  writeJson(pkg, {
207
209
  name: a.slug,
208
210
  private: true,
209
- description: `${a.appName} — ${product.name} (Opera Source Code)`,
211
+ description: `${a.appName} — ${product.name} (Ilorb Code)`,
210
212
  scripts: {
211
213
  dev: 'node scripts/dev-local.mjs',
212
214
  'install:all': product.installDirs.map((d) => `pnpm -C ${d} install`).join(' && '),