{"id":49339226,"url":"https://github.com/zhongmiao-org/meta-lc-platform","last_synced_at":"2026-04-27T03:01:41.239Z","repository":{"id":351516425,"uuid":"1211335094","full_name":"zhongmiao-org/meta-lc-platform","owner":"zhongmiao-org","description":"Meta-Driven SaaS OS core monorepo for kernel, bff, query, permission, datasource, migration, and audit.","archived":false,"fork":false,"pushed_at":"2026-04-23T08:21:28.000Z","size":298,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-23T08:25:36.741Z","etag":null,"topics":["audit","bff","lowcode","meta-driven","migration","monorepo","multi-tenant","nestjs","saas","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhongmiao-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T09:38:37.000Z","updated_at":"2026-04-23T08:21:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zhongmiao-org/meta-lc-platform","commit_stats":null,"previous_names":["zhongmiao-org/meta-lc-platform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhongmiao-org/meta-lc-platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongmiao-org%2Fmeta-lc-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongmiao-org%2Fmeta-lc-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongmiao-org%2Fmeta-lc-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongmiao-org%2Fmeta-lc-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhongmiao-org","download_url":"https://codeload.github.com/zhongmiao-org/meta-lc-platform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongmiao-org%2Fmeta-lc-platform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32320683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audit","bff","lowcode","meta-driven","migration","monorepo","multi-tenant","nestjs","saas","typescript"],"created_at":"2026-04-27T03:01:40.683Z","updated_at":"2026-04-27T03:01:41.225Z","avatar_url":"https://github.com/zhongmiao-org.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meta-lc-platform\n\nCore monorepo for Meta-Driven lowcode middleware.\n\nThis workspace combines reusable platform libraries under `packages/*` with a runnable NestJS middleware entry under `apps/bff-server`. The package docs describe the current code boundaries only; they do not imply that unfinished product APIs are already available.\n\nEnglish | [中文文档](./README_zh.md)\n\n## Architecture Flow\n\nThe platform keeps the frontend and runtime behind the BFF. Metadata flows through the Meta Kernel and `meta_db`; business data flows through runtime, query, permission, and datasource execution against `business_db`; audit records belong to `audit_db`.\n\nThis diagram shows runtime execution handoff, not package import dependencies. `Permission --\u003e Query` means permission transforms query AST / type contracts and must not execute SQL. `Query --\u003e Datasource` means runtime hands compiled SQL/request output to datasource execution; `query` still must not depend on `datasource`.\n\n```mermaid\nflowchart LR\n  Client[\"Runtime / Client\u003cbr/\u003eRenderer / Designer / Consumer\"]\n  BFFServer[\"apps/bff-server\u003cbr/\u003eNestJS bootstrap\"]\n  BFF[\"packages/bff\u003cbr/\u003eGateway only\u003cbr/\u003eHTTP / WS / request-id / error mapping\"]\n  Runtime[\"packages/runtime\u003cbr/\u003eExecution engine\u003cbr/\u003eView facade / RuntimeExecutor / DAG / State\"]\n  Kernel[\"packages/kernel\u003cbr/\u003eStructure source of truth\u003cbr/\u003eMeta registry / ViewDefinition / Schema / Version\"]\n  Query[\"packages/query\u003cbr/\u003eQuery compiler\u003cbr/\u003eAST to SQL\"]\n  Permission[\"packages/permission\u003cbr/\u003ePermission engine\u003cbr/\u003eAST transform + data scope\"]\n  Datasource[\"packages/datasource\u003cbr/\u003eDatasource adapter\u003cbr/\u003ePostgres / mutation / org-scope adapters\"]\n  Audit[\"packages/audit\u003cbr/\u003eObservability events\u003cbr/\u003eRuntime audit sink\"]\n  InfraScripts[\"infra/scripts\u003cbr/\u003emigrate.ts / seed.ts\"]\n  MetaDb[(\"meta_db\")]\n  BusinessDb[(\"business_db\")]\n  AuditDb[(\"audit_db\")]\n  Client --\u003e BFFServer\n  BFFServer --\u003e BFF\n  BFF --\u003e Runtime\n  Runtime --\u003e Kernel\n  Runtime --\u003e Permission\n  Runtime --\u003e Query\n  Runtime --\u003e Datasource\n  Runtime --\u003e Audit\n  Permission --\u003e|\"AST transform / query types\"| Query\n  Query --\u003e|\"compiled request\"| Datasource\n  Kernel --\u003e MetaDb\n  Datasource --\u003e BusinessDb\n  Audit --\u003e AuditDb\n  InfraScripts --\u003e MetaDb\n  InfraScripts --\u003e BusinessDb\n  InfraScripts --\u003e AuditDb\n```\n\n## Package Index\n\n| Package | Role | Docs |\n| --- | --- | --- |\n| `packages/runtime` | RuntimeExecutor execution engine, DAG/state execution contracts, runtime gateway facade, and WS event contracts. | [English](./packages/runtime/README.md) \\| [中文文档](./packages/runtime/README_zh.md) |\n| `packages/kernel` | Structural metadata contracts, MetaSchema validation, definition registry, diff, and migration SQL helpers. | [English](./packages/kernel/README.md) \\| [中文文档](./packages/kernel/README_zh.md) |\n| `packages/query` | Query AST / DSL to SQL compilation. | [English](./packages/query/README.md) \\| [中文文档](./packages/query/README_zh.md) |\n| `packages/permission` | RBAC and organization data-scope decisions. | [English](./packages/permission/README.md) \\| [中文文档](./packages/permission/README_zh.md) |\n| `packages/datasource` | Postgres datasource configuration and execution adapter. | [English](./packages/datasource/README.md) \\| [中文文档](./packages/datasource/README_zh.md) |\n| `packages/audit` | Audit contracts and optional non-blocking runtime observability sinks. | [English](./packages/audit/README.md) \\| [中文文档](./packages/audit/README_zh.md) |\n| `packages/bff` | NestJS IO Gateway for HTTP/WS DTOs, runtime controller entrypoints, request-id, and error mapping. | [English](./packages/bff/README.md) \\| [中文文档](./packages/bff/README_zh.md) |\n\n## Dependency Direction\n\n- `runtime`, `kernel`, `query`, `permission`, `datasource`, `bff`, and `audit` are the seven final architecture packages.\n- Migration lifecycle scripts live under `infra/`; `packages/migration` is intentionally removed.\n- Contracts live in the owning package; `contracts`, `shared`, `platform`, and `migration` packages are intentionally removed.\n- Final workspace dependencies are locked as: app -\u003e bff; bff -\u003e runtime; runtime -\u003e kernel/query/permission/datasource/audit; permission -\u003e query.\n- `kernel`, `query`, `datasource`, and `audit` must not depend on any workspace package.\n- `runtime -\u003e kernel` is allowed so runtime can read structure definitions; `kernel -\u003e runtime` and `kernel -\u003e permission` are forbidden.\n- `query` compiles AST to SQL and must not depend on `datasource`, `runtime`, or `permission`.\n- `bff` remains a gateway and must not own runtime orchestration, datasource wiring, permission decisions, audit wiring, or DB access.\n- `bff` must not depend on `kernel`; `/meta/*` may use an injected meta registry provider, and any kernel-backed provider must be composed outside the BFF package.\n- Deep cross-package imports are forbidden; import through package entrypoints.\n\n### Compiler / Execution Boundaries\n\n- `packages/query`: owns Query AST -\u003e SQL compile; must not execute SQL; must not depend on datasource.\n- `packages/datasource`: owns physical execution; receives compiled request / SQL command; must not compile Query AST; must not depend on query / permission / runtime.\n- `packages/permission`: owns AST transform only; may use type-only imports from query AST/types if needed; must not value-import the query compiler; must not compile SQL; must not execute datasource.\n\n## Runtime Entries\n\n- `packages/bff`: library form of the NestJS BFF module.\n- `apps/bff-server`: runnable middleware process entry.\n\n## Examples\n\n- Business demos live under `examples/*`, not inside core packages.\n- `examples/orders-demo` owns the orders workbench seed metadata, demo mutation adapter, and `001_orders_demo.sql`.\n- Deleting `examples/` must not affect `packages/*` build or test; examples may depend on packages, but packages must never depend on examples.\n- Examples are demonstration applications only and are not part of the core platform package topology.\n\n## Commands\n\n```bash\npnpm install\npnpm -r build\npnpm -r test\npnpm lint\npnpm --filter @zhongmiao/meta-lc-bff-server start\npnpm infra:up\npnpm infra:query-gate\npnpm test:examples:orders-demo\n```\n\n## Architectural Constraints\n\n- Frontend consumers enter through the BFF for HTTP and realtime protocols; page execution then crosses exactly one boundary into the runtime facade.\n- `meta_db`, `business_db`, and `audit_db` stay separated.\n- Kernel remains the structural source for metadata and migration planning.\n- BFF is an IO Gateway only: it owns HTTP/WS DTOs, controllers, and bootstrap wiring, not orchestration or data execution.\n- RuntimeExecutor is the only execution engine; runtime owns execution wiring and consumes query, permission, datasource, audit, and kernel boundaries.\n- DB driver access is intentionally restricted by boundary checks.\n\n## Release Governance\n\n- Publishable library identities use the `@zhongmiao/meta-lc-*` scope.\n- Root changelogs record platform, runtime, and service-level changes.\n- Package changelogs record package-local API and behavior changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhongmiao-org%2Fmeta-lc-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhongmiao-org%2Fmeta-lc-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhongmiao-org%2Fmeta-lc-platform/lists"}