videogen/docs/reelforge/RESEARCH_ENTERPRISE_OSS.md
caelum0x d56639a594
Some checks are pending
build-images / api (push) Waiting to run
build-images / worker-gpu (push) Waiting to run
build-images / web (push) Waiting to run
codeql / Analyze (javascript-typescript) (push) Waiting to run
codeql / Analyze (python) (push) Waiting to run
perf / API hot-path micro-smoke (budgeted) (push) Waiting to run
perf / Desktop engine crates (release build check) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Waiting to run
vision2026-ci / API phase modules (ruff + pytest) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Waiting to run
vision2026-ci / Python SDK resource tests (push) Waiting to run
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Waiting to run
vision2026-ci / Alembic upgrade + drift check (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Waiting to run
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

312 lines
27 KiB
Markdown

# ReelForge — Enterprise Capabilities + OSS Adoption Research
> Research brief: for each **enterprise capability epic** on the ReelForge MVP → ENTERPRISE
> path, which **open-source project should we FORK / BUILD ON** (the "Cursor built on VS Code"
> model), and which must be **self-hosted-behind-an-API or avoided** on license grounds.
> Companion to [`RESEARCH_COMPETITORS_OSS.md`](./RESEARCH_COMPETITORS_OSS.md),
> [`ROADMAP_V2.md`](./ROADMAP_V2.md), and [`NEXT_PHASES.md`](./NEXT_PHASES.md); this is the
> **enterprise-platform** cross-link for the CTO-plan §10 (enterprise/GTM) workstream.
> Stack assumption: **FastAPI (Python) + Next.js 15 (TS) + Neon Postgres + Celery/Redis +
> Clerk + R2**.
>
> **HARD LICENSE RULE (non-negotiable):** only **MIT** or **Apache-2.0** (plus permissive
> **BSD**) are eligible to **adopt / fork / vendor** into ReelForge source. **AGPL, GPL,
> BSL/Business-Source, SSPL, Elastic, Fair-Core (FCL), MPL, and "source-available/commercial"**
> are **DEMOTED** to *self-host-behind-a-clean-network/API-boundary only* (run unmodified) or
> *avoid*. Every SPDX id + star count below was **verified live via `gh api /repos/{o}/{r}`**
> (and, for GitHub `NOASSERTION` cases, by decoding the actual `LICENSE` bytes) during the
> research passes dated in the footer. **Re-verify before cloning** — licenses relicense
> (Zitadel went Apache→AGPL in 2025; Flipt went GPL→Fair-Core).
---
## 1. TL;DR — the top-3 MIT/Apache foundations to fork/adopt FIRST
These three are **cross-cutting substrates** — land them before the epics, because every
later epic plugs into them (flags gate rollouts, telemetry instruments everything, the admin
console is the one UI surface for governance/billing/audit/notifications).
1. **OpenFeature SDKs — Apache-2.0** ([`open-feature/python-sdk`](https://github.com/open-feature/python-sdk),
[`open-feature/js-sdk`](https://github.com/open-feature/js-sdk), spec
[`open-feature/spec`](https://github.com/open-feature/spec)). Vendor-neutral **feature-flag
abstraction**, pure library, zero infra, swappable backend. **Stack fit:** `pip install
openfeature-sdk` in FastAPI + the JS SDK in Next.js 15; it de-risks Epic 8 *and* becomes the
kill-switch / gradual-rollout layer every other epic rides on. Adopt this **before anything
else** so all later enterprise rollouts are flag-gated.
2. **OpenTelemetry SDK + Collector — Apache-2.0** ([`open-telemetry/opentelemetry-python`](https://github.com/open-telemetry/opentelemetry-python),
[`open-telemetry/opentelemetry-collector`](https://github.com/open-telemetry/opentelemetry-collector)).
Instrument **once**; Epics 6, 9, and 4 all get tracing/metrics for free. **Stack fit:**
auto-instrument FastAPI + Celery, export to a Collector, land in an Apache/MIT store
(VictoriaMetrics / SigNoz). Pure library on the app side; the earlier it's in, the more
history you accrue.
3. **refine — MIT** ([`refinedev/refine`](https://github.com/refinedev/refine), 35.5k★). The
**Next.js-native, headless admin-console framework** that becomes the single UI surface for
Epics 1, 3, 5, 7 (governance, billing ops, audit viewer, notification prefs). **Stack fit:**
forks cleanly into the existing `web/` app; its `accessControlProvider` + `auditLogProvider`
interfaces line up 1:1 with your authz engine and your Neon audit table (you supply the
backend; refine supplies the resources/CRUD/UI shell).
**Sequencing:** flags → telemetry → admin console, *then* Epic 1 authz (pycasbin) and Epic 2
identity (Ory Polis), since governance + identity unblock every enterprise sale. Billing
(OpenMeter) and workflow (Hatchet) are the heaviest infra adds — schedule them **after** the
FastAPI adapter boundary exists.
---
## 2. EPIC → FOUNDATION table (MIT / Apache / BSD only)
Only adopt-eligible picks appear here. License-failing tools are in §4. `library` = embed in
process; `service` = self-host behind an internal FastAPI adapter; `fork` = clone into our tree.
| # | Epic | PRIMARY pick (license VERIFIED) | Type | ALT (license) | Integration sketch |
|---|------|-------------------------------|------|---------------|--------------------|
| 1 | Access & Governance (RBAC + audit + admin console) | **[casbin/pycasbin](https://github.com/casbin/pycasbin)** (Apache-2.0, 1.8k★) authz **+** **[refinedev/refine](https://github.com/refinedev/refine)** (MIT, 35.5k★) console | library + fork | [cerbos/cerbos](https://github.com/cerbos/cerbos) (Apache-2.0) sidecar; [openfga/openfga](https://github.com/openfga/openfga) (Apache-2.0) for ReBAC | `pip install casbin` + [pycasbin/fastapi-authz](https://github.com/pycasbin/fastapi-authz) middleware + [pycasbin/sqlalchemy-adapter](https://github.com/pycasbin/sqlalchemy-adapter) → Neon; fork refine into `web/`, REST data provider → FastAPI |
| 2 | Identity (SSO SAML/OIDC, SCIM, MFA) | **[ory/polis](https://github.com/ory/polis)** (Apache-2.0, 2.3k★) | service | [keycloak/keycloak](https://github.com/keycloak/keycloak) (Apache-2.0); [casdoor/casdoor](https://github.com/casdoor/casdoor) (Apache-2.0); [goauthentik/authentik](https://github.com/goauthentik/authentik) (MIT core) | Keep Clerk for B2C; run Polis as a sidecar SAML+SCIM→OIDC facade; FastAPI speaks OIDC to it |
| 3 | Billing (invoicing / metering / entitlements) | **[openmeterio/openmeter](https://github.com/openmeterio/openmeter)** (Apache-2.0, 2.2k★) metering+entitlements | service | [killbill/killbill](https://github.com/killbill/killbill) (Apache-2.0) for full invoicing (JVM); Stripe for invoices | Wrap behind internal FastAPI adapter; emit CloudEvents from Celery render workers → per-render credit burn-down; Stripe/Kill Bill for invoicing |
| 4 | API platform (SDKs, webhooks, docs) | **[svix/svix-webhooks](https://github.com/svix/svix-webhooks)** (MIT, 3.3k★) **+** **[scalar/scalar](https://github.com/scalar/scalar)** (MIT, 15.9k★) **+** **[OpenAPITools/openapi-generator](https://github.com/OpenAPITools/openapi-generator)** (Apache-2.0, 26.7k★) | service + library | [fern-api/fern](https://github.com/fern-api/fern) (Apache-2.0) SDKs+docs; [Redocly/redoc](https://github.com/Redocly/redoc) (MIT) docs | Svix as a service (reuses Postgres/Redis) for outbound webhooks; Scalar replaces Swagger UI on FastAPI; generate SDKs from OpenAPI in the local gate |
| 5 | Compliance (GDPR / audit) | **Build on Neon** append-only audit table **+** **Cerbos/OpenFGA decision logs** (Apache-2.0) | library/service | [jazzband/django-auditlog](https://github.com/jazzband/django-auditlog) (MIT) — **design reference only** (Django-only) | SQLAlchemy append-only table in Neon; stream PDP decision logs; surface in refine audit viewer |
| 6 | Observability (tracing / metrics) | **[open-telemetry/*](https://github.com/open-telemetry)** (Apache-2.0) → **[VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)** (Apache-2.0, 17.5k★) or **[SigNoz/signoz](https://github.com/SigNoz/signoz)** (MIT core, 31.8k★) | library + service | [prometheus/prometheus](https://github.com/prometheus/prometheus) (Apache-2.0) metrics-only | otel-python auto-instruments FastAPI/Celery → Collector → store; SigNoz UI as a service (**avoids AGPL Grafana**) |
| 7 | Notifications (multi-channel) | **[novuhq/novu](https://github.com/novuhq/novu)** (MIT core, 39.5k★) | service | [caronc/apprise](https://github.com/caronc/apprise) (BSD-2, 17k★) as an embeddable Python lib | Self-host Novu as a sidecar; map Clerk orgs → Novu subscribers/tenants; React `<Inbox/>` in Next.js. **`ee/` dir is proprietary — stay on core** |
| 8 | Feature flags / experiments | **[open-feature/*](https://github.com/open-feature)** (Apache-2.0) abstraction **+** **[Flagsmith/flagsmith](https://github.com/Flagsmith/flagsmith)** (BSD-3, 6.5k★) backend | library + service | [growthbook/growthbook](https://github.com/growthbook/growthbook) (MIT core, Mongo); [thomaspoignant/go-feature-flag](https://github.com/thomaspoignant/go-feature-flag) (MIT) flags-as-code | OpenFeature Python SDK in FastAPI, JS SDK in Next.js; Flagsmith provider behind it (**Django+Postgres = best datastore fit**) |
| 9 | Workflow orchestration | **[hatchet-dev/hatchet](https://github.com/hatchet-dev/hatchet)** (MIT, 7.7k★) | service | [temporalio/temporal](https://github.com/temporalio/temporal) (MIT) for max durability; [triggerdotdev/trigger.dev](https://github.com/triggerdotdev/trigger.dev) (Apache-2.0) TS-centric | Run on Postgres (fits Neon), Python+TS SDKs; port the render-pipeline DAGs off Celery gradually |
| 10 | BI / analytics | **[cube-js/cube](https://github.com/cube-js/cube)** (Apache-2.0, 20.6k★) embedded **+** **[PostHog/posthog](https://github.com/PostHog/posthog)** (MIT core, 37.7k★) product analytics | library/service | [lightdash/lightdash](https://github.com/lightdash/lightdash) (MIT core) if you standardize on dbt | Cube service over Neon with a multi-tenant security context for per-customer dashboards; build charts in Next.js; PostHog SDK for product events |
---
## 3. Per-epic detail
### Epic 1 — Access & Governance (RBAC + audit + ADMIN CONSOLE)
**AuthZ engine.** Start in-process: **[pycasbin](https://github.com/casbin/pycasbin)**
(Apache-2.0, 1.8k★, active) is a pure-Python ACL/RBAC/ABAC library that embeds directly in the
FastAPI process — no extra service. Glue it with **[pycasbin/fastapi-authz](https://github.com/pycasbin/fastapi-authz)**
(Apache-2.0, 193★) Starlette middleware and persist policies to Neon via
**[pycasbin/sqlalchemy-adapter](https://github.com/pycasbin/sqlalchemy-adapter)** (Apache-2.0,
82★). The canonical [`casbin/casbin`](https://github.com/casbin/casbin) (Apache-2.0, 20.3k★) is
the Go reference for the portable model/policy DSL. This covers tenant RBAC
(owner/admin/editor/viewer) now.
- **Graduate to ReBAC** when reel/workspace/org sharing graphs get deep:
**[cerbos/cerbos](https://github.com/cerbos/cerbos)** (Apache-2.0, 4.5k★) is the lowest-friction
sidecar PDP (YAML policies, GitOps-testable, **built-in decision audit logs** that feed Epic 5);
**[openfga/openfga](https://github.com/openfga/openfga)** (Apache-2.0, 5.6k★, CNCF, Zanzibar-style,
with [python-sdk](https://github.com/openfga/python-sdk)) is the most future-proof for
"which reels can this user see". [`authzed/spicedb`](https://github.com/authzed/spicedb)
(Apache-2.0, 7k★) is the equivalent alt; [`open-policy-agent/opa`](https://github.com/open-policy-agent/opa)
(Apache-2.0, 12k★) + [`permitio/opal`](https://github.com/permitio/opal) (Apache-2.0, 5.5k★)
and [`aserto-dev/topaz`](https://github.com/aserto-dev/topaz) (Apache-2.0) are the policy-distribution options.
- **Ruled out:** [`osohq/oso`](https://github.com/osohq/oso) — Apache-2.0 **but the repo is
literally marked DEPRECATED** (last push Feb 2025, vendor moved to commercial Oso Cloud). Do
not adopt. [`warrant-dev/warrant`](https://github.com/warrant-dev/warrant) is Apache-2.0 but
**acquired by WorkOS; OSS momentum stalled** (conf. 4).
**Admin console.** Fork **[refine](https://github.com/refinedev/refine)** (MIT, 35.5k★) — the
Next.js-native headless framework whose `accessControlProvider` delegates to Casbin/Cerbos and
whose `auditLogProvider` points at your Neon audit table. Heavier MUI alternative:
**[marmelab/react-admin](https://github.com/marmelab/react-admin)** (MIT, 26.9k★) — note its
polished `ra-rbac` / `ra-audit-log` modules are **paid Enterprise Edition** (rebuild those on
OSS core). For an *internal ops* console (not customer-facing), [`appsmithorg/appsmith`](https://github.com/appsmithorg/appsmith)
(Apache-2.0, 40.7k★) is a self-hosted low-code option. Node-only options
[`SoftwareBrothers/adminjs`](https://github.com/SoftwareBrothers/adminjs) (MIT) and
[`keystonejs/keystone`](https://github.com/keystonejs/keystone) (MIT) are less ideal for a
FastAPI backend.
### Epic 2 — Identity (SSO SAML/OIDC, SCIM, MFA)
Clerk covers B2C + basic orgs, but **enterprise SAML SSO + SCIM sit behind Clerk's paid
per-connection Enterprise add-ons** — the classic enterprise wall. Two strategies:
- **(A) Keep Clerk, bolt on a SAML+SCIM bridge — recommended smallest lift.**
**[ory/polis](https://github.com/ory/polis)** (Apache-2.0, 2.3k★, TypeScript; formerly BoxyHQ
SAML Jackson) is a drop-in **SAML 2.0 + OIDC SSO *and* SCIM 2.0 directory-sync** service that
fronts everything as an OIDC facade — your app only speaks OIDC. Run as a sidecar behind
FastAPI; Clerk stays for B2C. (conf. 90)
- **(B) Replace Clerk with a full self-hosted IdP** (no per-MAU tax):
- **[keycloak/keycloak](https://github.com/keycloak/keycloak)** (Apache-2.0, 36.2k★) — deepest
SAML + native LDAP/AD federation + UMA authz; **native SCIM 2.0 only in 26.6+**; JVM, heaviest ops.
- **[casdoor/casdoor](https://github.com/casdoor/casdoor)** (Apache-2.0, 14.2k★) — UI-first
"one box": SAML+OIDC+OAuth2+CAS + native SCIM + MFA + bundled admin console (also covers part
of Epic 1's console). Go + React.
- **[goauthentik/authentik](https://github.com/goauthentik/authentik)** (**MIT core**, 24.8k★) —
Python backend (fits your competency), SAML/OIDC + SCIM provider + Flow Engine. **`enterprise/`
dir is separately licensed — confirm which SSO features are free.**
- **Ory suite building blocks (all Apache-2.0):** [`ory/kratos`](https://github.com/ory/kratos)
(identity/MFA/passkeys), [`ory/hydra`](https://github.com/ory/hydra) (OAuth2/OIDC issuer for
your API platform), [`ory/keto`](https://github.com/ory/keto) (ReBAC — Epic 1),
[`ory/oathkeeper`](https://github.com/ory/oathkeeper) (zero-trust gateway).
- **Complementary / narrower (Apache-2.0):** [`dexidp/dex`](https://github.com/dexidp/dex) (OIDC
federation broker, no user store/SCIM); [`authelia/authelia`](https://github.com/authelia/authelia)
(reverse-proxy SSO+2FA for *internal tooling*, **not** customer SAML). Client libs:
[`panva/node-oidc-provider`](https://github.com/panva/node-oidc-provider) (MIT),
[`authts/oidc-client-ts`](https://github.com/authts/oidc-client-ts) (Apache-2.0).
- **Also relevant here:** [`fastapi-users/fastapi-users`](https://github.com/fastapi-users/fastapi-users)
(MIT, 6.2k★) is FastAPI-native user management if you ever move off Clerk.
### Epic 3 — Billing (invoicing / metering / entitlements)
- **Metering + entitlements (primary):** **[openmeterio/openmeter](https://github.com/openmeterio/openmeter)**
(Apache-2.0, 2.2k★, now maintained by Kong) — purpose-built real-time usage metering with a
**credit burn-down entitlements engine** (Metered/Boolean/Static), ideal for **per-render / per-minute
UGC billing**. Python/JS/Go SDKs + CloudEvents ingestion; pairs with Stripe (or Kill Bill) for
invoicing. **Caveat: it is a heavy SERVICE** (Kafka + ClickHouse + Postgres), not an embeddable
lib — the SDKs are clients; wrap it behind an internal FastAPI adapter.
- **Full invoicing engine (alt):** **[killbill/killbill](https://github.com/killbill/killbill)**
(Apache-2.0, 5.7k★) is the *only* true permissive complete billing engine (catalog, plans,
proration, dunning, credits, refunds; runs on Postgres). Java/Tomcat monolith — run as a
standalone service behind a thin FastAPI adapter; pair with OpenMeter for metering.
- **Commerce framework (partial fit):** [`medusajs/medusa`](https://github.com/medusajs/medusa)
(MIT core, 35.8k★) — TS commerce, not a SaaS subscription/metering engine.
### Epic 4 — API platform (SDKs, webhooks, docs)
- **Outbound webhooks:** **[svix/svix-webhooks](https://github.com/svix/svix-webhooks)** (MIT,
3.3k★) — full MIT engine: HMAC signing, retries/backoff, delivery logs, replay, and an
embeddable customer app-portal. Rust + Postgres + Redis (reuses your primitives). Best-in-class.
- **Docs:** **[scalar/scalar](https://github.com/scalar/scalar)** (MIT, 15.9k★) drops into FastAPI
and replaces Swagger UI with an interactive "try it" client; [`Redocly/redoc`](https://github.com/Redocly/redoc)
(MIT, 25.9k★) is the zero-backend three-panel alt.
- **SDKs:** **[OpenAPITools/openapi-generator](https://github.com/OpenAPITools/openapi-generator)**
(Apache-2.0, 26.7k★) for 50+ languages, or **[fern-api/fern](https://github.com/fern-api/fern)**
(Apache-2.0, 3.8k★) for a typed SDKs+docs+Postman bundle. Generate from your FastAPI OpenAPI in
the local gate.
- **Inbound webhook ingestion:** [`webhookdb/webhookdb`](https://github.com/webhookdb/webhookdb)
(Apache-2.0) mirrors third-party webhooks into your DB (opposite direction from Svix).
### Epic 5 — Compliance (GDPR / audit)
No strong framework-agnostic **Python** audit library exists. **Own the table:** an append-only
SQLAlchemy audit table in Neon, fed by (a) app-level events and (b) **PDP decision logs** streamed
from Cerbos or OpenFGA (both Apache-2.0) as the authz-audit trail. Surface it in the refine audit
viewer. [`jazzband/django-auditlog`](https://github.com/jazzband/django-auditlog) (MIT, 1.4k★) is
**Django-only** — use it as a *design reference* for the model-change schema, not a dependency.
(Zitadel's event-sourced audit story is compelling but **AGPL — see §4**.)
### Epic 6 — Observability (tracing / metrics)
Instrument with **[OpenTelemetry](https://github.com/open-telemetry/opentelemetry-python)**
(Apache-2.0) — auto-instrument FastAPI + Celery, export via the
[Collector](https://github.com/open-telemetry/opentelemetry-collector) (Apache-2.0). Store/visualize with a
**permissive** stack:
- **[VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)** (Apache-2.0, 17.5k★) or
**[prometheus/prometheus](https://github.com/prometheus/prometheus)** (Apache-2.0, 65.7k★) for
metrics.
- **[SigNoz/signoz](https://github.com/SigNoz/signoz)** (**MIT core**, 31.8k★) as an all-in-one
OTel-native UI (traces+metrics+logs+APM on ClickHouse) — **the MIT way to avoid AGPL Grafana/Loki/Mimir**.
Its `ee/` + `cmd/enterprise/` dirs are proprietary; run the core.
### Epic 7 — Notifications (multi-channel)
**[novuhq/novu](https://github.com/novuhq/novu)** (**MIT core**, 39.5k★) — email/SMS/push/chat +
in-app inbox, workflow builder with digest/batching/quiet-hours, provider fan-out (SendGrid/Twilio/FCM/Resend),
and a React `<Inbox/>` for Next.js. Self-host as a sidecar; map Clerk orgs → Novu subscribers/tenants.
**RBAC-on-notifications, SSO-to-admin, and some controls live under a proprietary `ee/`
(`LICENSE-ENTERPRISE`) — stay on core.** If you want **no service**,
**[caronc/apprise](https://github.com/caronc/apprise)** (BSD-2, 17k★) is a single Python library
covering 100+ channels — embed directly in FastAPI/Celery (no inbox UI / workflow engine).
[`notifme/notifme-sdk`](https://github.com/notifme/notifme-sdk) (MIT) is the Node equivalent.
**Avoid** relying on [`knocklabs/knock-node`](https://github.com/knocklabs) — SDK is Apache-2.0 but
the **engine is closed SaaS**.
### Epic 8 — Feature flags / experiments
**[OpenFeature](https://github.com/open-feature/spec)** (Apache-2.0) as the vendor-neutral
abstraction ([python-sdk](https://github.com/open-feature/python-sdk),
[js-sdk](https://github.com/open-feature/js-sdk), both Apache-2.0), backed by
**[Flagsmith/flagsmith](https://github.com/Flagsmith/flagsmith)** (**BSD-3**, 6.5k★) — Django +
PostgreSQL, the closest architectural/datastore fit to FastAPI + Neon. Alternatives:
[`growthbook/growthbook`](https://github.com/growthbook/growthbook) (**MIT core**, 8.1k★) — best
experiments/analytics but **backed by MongoDB** (infra mismatch; SSO/audit are paid);
[`thomaspoignant/go-feature-flag`](https://github.com/thomaspoignant/go-feature-flag) (MIT) +
[`open-feature/flagd`](https://github.com/open-feature/flagd) (Apache-2.0) for a low-footprint
flags-as-code/GitOps path with no Mongo/Kafka.
### Epic 9 — Workflow orchestration
**[hatchet-dev/hatchet](https://github.com/hatchet-dev/hatchet)** (MIT, 7.7k★) — **Postgres-backed**
distributed task queue + DAG orchestration (retries, concurrency, fairness), Python + TS SDKs, a
natural **Celery upgrade** on a Neon stack and lighter than Temporal.
**[temporalio/temporal](https://github.com/temporalio/temporal)** (MIT, 22.3k★) for max durability
guarantees at scale; **[triggerdotdev/trigger.dev](https://github.com/triggerdotdev/trigger.dev)**
(Apache-2.0, 16k★) for TS-centric background jobs. Port the render-pipeline DAGs off Celery
gradually behind the FastAPI adapter boundary.
### Epic 10 — BI / analytics
**[cube-js/cube](https://github.com/cube-js/cube)** (Apache-2.0, 20.6k★) — a **headless semantic
layer** with a **multi-tenant security context**, exposing metrics via REST/GraphQL/SQL for
**embedded per-customer dashboards** built in Next.js. Pair with
**[PostHog/posthog](https://github.com/PostHog/posthog)** (**MIT core**, 37.7k★) for product
analytics + session replay (heavy ClickHouse self-host; `ee/` proprietary). If you standardize on
dbt, [`lightdash/lightdash`](https://github.com/lightdash/lightdash) (MIT core, 6k★) is the
dbt-native BI layer. **Avoid AGPL Metabase for embedding — see §4.**
---
## 4. LICENSE OFF-LIMITS — self-host-behind-API-only or AVOID
**Never vendor/fork these into ReelForge source.** Exact licenses as verified. "Self-host behind a
clean network/API boundary, run unmodified" is the *only* permitted use of the copyleft ones; the
source-available/commercial ones are avoid-or-buy.
| Tool | License (VERIFIED) | Stars | Verdict / permissive substitute |
|------|--------------------|-------|--------------------------------|
| [zitadel/zitadel](https://github.com/zitadel/zitadel) | **AGPL-3.0** (relicensed from Apache in 2025) | 14.7k | self-host-behind-API only; use **Ory Polis / Keycloak / Casdoor** |
| [Permify/permify](https://github.com/Permify/permify) | **AGPL-3.0** | 5.9k | self-host-behind-API only; use **Cerbos / OpenFGA** |
| [getlago/lago](https://github.com/getlago/lago) | **AGPL-3.0** | 10.3k | self-host-behind-API only; use **OpenMeter / Kill Bill** |
| [Unleash/unleash](https://github.com/Unleash/unleash) (server) | **AGPL-3.0** | 13.7k | self-host **unmodified**; **client SDKs OK**; prefer **Flagsmith / go-feature-flag** |
| [flipt-io/flipt](https://github.com/flipt-io/flipt) | **FCL-1.0** (Fair-Core, v2) / **GPL-3.0** (v1 server) | 4.9k | avoid; only `rpc/` client dirs are MIT; use **go-feature-flag / Flagsmith** |
| [grafana/grafana](https://github.com/grafana/grafana) · [loki](https://github.com/grafana/loki) | **AGPL-3.0** | 76.3k / 28.7k | run unmodified, isolated; prefer **SigNoz / VictoriaMetrics** |
| [metabase/metabase](https://github.com/metabase/metabase) | **AGPL-3.0** + commercial embedding | 48.7k | isolated/iframe or buy embedding license; prefer **Cube** |
| [openobserve/openobserve](https://github.com/openobserve/openobserve) | **AGPL-3.0** | 21k | avoid forking; prefer **OTel + SigNoz/VictoriaMetrics** |
| [windmill-labs/windmill](https://github.com/windmill-labs/windmill) (core) | **AGPL-3.0** (partial Apache) | 17.5k | avoid forking; prefer **Hatchet / Temporal** |
| [unkeyed/unkey](https://github.com/unkeyed/unkey) | **AGPL-3.0** | 5.4k | avoid forking (API keys/rate-limit); build on Svix + own middleware |
| [motor-admin/motor-admin](https://github.com/motor-admin/motor-admin) | **AGPL-3.0** | 2.2k | avoid; use **refine** |
| [ForestAdmin/agent-nodejs](https://github.com/ForestAdmin/agent-nodejs) | **GPL-3.0** (+ commercial SaaS) | — | avoid; use **refine** |
| [Budibase/budibase](https://github.com/Budibase/budibase) | **NOASSERTION** (GPL-3.0 + source-available) | 28.2k | avoid forking; self-host-behind-API only |
| [hook0/hook0](https://github.com/hook0/hook0) | **SSPL** | 1.5k | avoid; use **Svix** |
| [speakeasy-api/speakeasy](https://github.com/speakeasy-api/speakeasy) | **Elastic-2.0** (source-available) | 433 | avoid forking; use **Fern / openapi-generator** |
| [logto-io/logto](https://github.com/logto-io/logto) | **MPL-2.0** (weak/file-level copyleft) | 14.3k | usable **as a service**; caution if forking-and-closing files |
| [osohq/oso](https://github.com/osohq/oso) | **Apache-2.0 but DEPRECATED** | 3.5k | do **not** adopt; use **Cerbos / OpenFGA** |
**Open-core cautions (adopt the MIT/Apache core, do NOT assume the enterprise dir is free):**
**authentik** (MIT core, `enterprise/` separately licensed) · **SuperTokens**
([supertokens-core](https://github.com/supertokens/supertokens-core), Apache core; enterprise SAML
SSO in **paid `ee/`**; no native SCIM — pair with Polis) · **PostHog / SigNoz / Novu / Lightdash /
GrowthBook / Medusa** (MIT/Apache core with proprietary `ee/`) · **react-admin** (MIT core;
RBAC/audit modules are **paid Enterprise Edition**). Clone core only; **gate any enterprise-dir
feature behind a license check.**
---
## 5. Recommended build order for Epic 1 (on the chosen authz + admin foundation)
1. **Land the top-3 substrates** (§1): OpenFeature SDKs (both apps) → OpenTelemetry
(FastAPI/Celery) → fork refine into `web/`. Everything below ships flag-gated and instrumented.
2. **Neon append-only audit table** (Epic 5 substrate) — SQLAlchemy model, immutable rows, written
from a FastAPI dependency. This is the sink both authz decisions and admin actions feed.
3. **Embed pycasbin + fastapi-authz + sqlalchemy-adapter** — tenant RBAC (owner/admin/editor/viewer)
enforced in-process; policies persisted to Neon. Wire a policy-reload watcher across Celery
workers + web dynos (Casbin has no built-in cross-process cache invalidation).
4. **Build the refine admin console** — resources over the FastAPI REST data provider; connect
`accessControlProvider` → Casbin enforce, `auditLogProvider` → the Neon audit table. This is the
single UI surface that Epics 3/5/7 later plug into.
5. **Add Clerk→FastAPI JWT bridge** (already flagged in `NEXT_PHASES.md` 5f) so console + API share
identity; then bolt on **Ory Polis** (Epic 2) for enterprise SAML+SCIM without ripping out Clerk.
6. **Graduate authz to a ReBAC sidecar** (Cerbos first for the built-in decision logs → Epic 5; or
OpenFGA for deep sharing graphs) once per-reel/workspace sharing outgrows flat RBAC — keep the
FastAPI enforcement seam stable so the swap is behind one interface.
---
*Compiled 2026-08-13. Licenses/stars recorded from `gh api /repos/{owner}/{repo}` (`spdx_id`) plus
raw `LICENSE`-byte decoding for `NOASSERTION` cases during research passes on 2026-08-13, and are
point-in-time. **All licenses MUST be re-verified before cloning or vendoring** — upstream
relicenses happen (Zitadel Apache→AGPL 2025; Flipt GPL→Fair-Core), enterprise-dir terms shift, and
star counts drift. Treat AGPL / GPL / MPL / SSPL / BSL / Fair-Core / Elastic / NOASSERTION and any
`ee/`/`enterprise/` directory as **self-host-behind-a-clean-API-boundary or reference-only** until
legal review clears them for a proprietary SaaS. Cross-links: [`RESEARCH_COMPETITORS_OSS.md`](./RESEARCH_COMPETITORS_OSS.md),
[`ROADMAP_V2.md`](./ROADMAP_V2.md), CTO-plan §10.*