Platform overview
Repositories
| Repo | Role |
|---|---|
| Prego | Monorepo: Next.js apps (client, admin, www), shared UI (prego-shell), internal docs site. |
| prego-zuplo | API gateway: routes, policies, OpenAPI, upstream proxy to Workers and Frappe. |
| prego_ai | Cloudflare Worker (Hono): chat, document retrieval, scheduled jobs, billing hooks — product Worker runtime. |
| prego-control-plane | Orchestration Worker: tenant master data, provisioning callbacks, system APIs. |
| prego_saas | Frappe / ERPNext app — domain persistence and business rules. |
| prego-pulumi | Infrastructure as code. |
| prego-ansible | Provisioning automation. |
| prego-docker | Runtime images / local stack. |
Layer model
- Platform core (target): contracts, tenant context, internal trust (signatures), observability conventions — reusable without ERP knowledge.
- Domain: ERP (Frappe), extended product semantics (scheduled automation, ERP adapters).
- Interface: Browser UI, Zuplo gateway.
- Infrastructure: Pulumi → Ansible → Docker (and Cloudflare account resources).
Integration style
- Contract-first: OpenAPI (Zuplo) is the public API contract; Workers trust signed internal headers from the gateway where applicable.
- Browser correlation: Web apps may send optional
x-trace-idthrough Zuplo (shape: Tenant & trust boundaries); Workers usesanitizeTraceId*from@platform/platform-trust. CORSallowedHeadersand PortalALLOWED_ORIGINSare gateway configuration — prego-zuplodocs/runbook/. - No direct coupling: Domain code does not import another repo’s internals; use HTTP + schemas only.
Where to read next
- Master plan
- Tenant & trust boundaries
- Repo responsibility matrix
- Repository README index
- Phase 2 — Corporate platform roadmap (Phase 2) — multi-ERP connectors and related integrations (product direction).
- Phase 2 — connector slots — thin contracts (
@platform/contracts, prego_aiconnector-kind+ optional CP read + optionalCACHEerp_cred:(ERP_CREDENTIAL_KV_PREFIX) + ref for connector credentials; prego-control-plane D1 0029 + internal GET/PATCH). Operator KV: prego_aidocs/deployment.md.
한국어
PREGO는 UI 모노레포, Zuplo 게이트웨이, 확장 런타임·컨트롤 플레인 워커, Frappe 도메인, IaC/프로비저닝 레포로 구성됩니다. 통합은 계약(OpenAPI) + 내부 신뢰 헤더를 기준으로 하고, 도메인은 HTTP와 스키마로만 연결하는 것을 목표로 합니다. 브라우저 x-trace-id·CORS·ALLOWED_ORIGINS 는 테넌트 신뢰 경계와 prego-zuplo docs/runbook/ 을 따릅니다. Phase 2 방향은 로드맵·connector slots를 참고합니다.