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
All features are no-op when `apiKey` is empty — safe to deploy without PostHog.
27
+
28
+
### What's included
29
+
30
+
| Feature | File | Notes |
31
+
|---------|------|-------|
32
+
| Analytics service | `analytics.service.js` | `track()`, `identify()`, `groupIdentify()` |
33
+
| Auto-capture middleware | `analytics.middleware.js` | Captures `api_request` on all routes (except health/public) |
34
+
| Feature flags service | `analytics.featureFlags.service.js` | `isEnabled()` (safe default `false` when not configured), `getVariant()` (`undefined` when not configured) |
35
+
| `requireFeatureFlag` middleware | `analytics.requireFeatureFlag.js` | 401 when unauthenticated, 403 when flag disabled, fail-open when analytics not configured |
2. Set env vars: `DEVKIT_NODE_posthog_apiKey`, `DEVKIT_NODE_posthog_host`
42
+
3. No DB migration needed — all data stored in PostHog
43
+
44
+
---
45
+
7
46
## Organizations & CASL v2 (2026-03-13)
8
47
9
48
This guide is for downstream projects (e.g. lou-node, pierreb-node) migrating to the new organizations + CASL document-level authorization system introduced on the `feature/signup-org-flow` branch.
0 commit comments