You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`PLUGIN_OTLP_ENDPOINT` — Custom OTLP endpoint for plugin setup UI.
311
337
-`SEED_DATA` — Set `true` to seed demo data on startup.
338
+
-`MANIFEST_MODE` — `local` or `cloud` (default: `cloud`). Switches between SQLite/loopback auth and PostgreSQL/Better Auth.
339
+
-`MANIFEST_DB_PATH` — SQLite file path for local mode (default: in-memory).
340
+
-`MANIFEST_TELEMETRY_OPTOUT` — Set `1` to disable anonymous product analytics.
312
341
313
342
## Domain Terminology
314
343
@@ -331,6 +360,8 @@ To add a new font or icon library:
331
360
3. Reference the local CSS in `index.html` (e.g. `<link href="/fonts/..." />`)
332
361
4. Do **not** add external domains to the CSP directives
333
362
363
+
**Exception**: `connectSrc` includes `https://eu.i.posthog.com` for anonymous product analytics. This is the only external domain allowed. Opt-out via `MANIFEST_TELEMETRY_OPTOUT=1`.
364
+
334
365
## Architecture Notes
335
366
336
367
-**Single-service**: In production, `@nestjs/serve-static` serves `frontend/dist/` with SPA fallback. API routes (`/api/*`, `/otlp/*`) are excluded.
@@ -344,6 +375,10 @@ To add a new font or icon library:
344
375
-**Validation**: Global `ValidationPipe` with `whitelist: true`, `forbidNonWhitelisted: true`. Explicit `@Type()` decorators on numeric DTO fields.
345
376
-**OTLP auth caching**: `OtlpAuthGuard` caches valid API keys in-memory for 5 minutes to avoid repeated DB lookups.
346
377
-**Database migrations**: TypeORM migrations are version-controlled in `src/database/migrations/`. `synchronize` is permanently `false`. Migrations auto-run on boot (`migrationsRun: true`) wrapped in a single transaction. The CLI DataSource is at `src/database/datasource.ts`. Better Auth manages its own tables separately via `ctx.runMigrations()`.
378
+
-**Product analytics**: Anonymous usage tracking via PostHog (`eu.i.posthog.com`). Opt-out via `MANIFEST_TELEMETRY_OPTOUT=1`. Frontend: `services/analytics.ts`. Backend: `common/utils/product-telemetry.ts`.
379
+
-**SSE**: `SseController` provides `/api/v1/events` for real-time dashboard updates.
0 commit comments