feat: add module schema discovery and validation
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# Ekklesia module template
|
||||
|
||||
This is the smallest supported backend-only Ekklesia module. It proves the static manifest,
|
||||
compiled runtime entrypoint, capability registration, and logical storage-bucket declarations
|
||||
without pretending that API, Drizzle, or storage provisioning already exist.
|
||||
compiled runtime and schema entrypoints, capability registration, a module-owned Drizzle table, and
|
||||
logical storage-bucket declarations without pretending that migrations, API, or storage
|
||||
provisioning already exist.
|
||||
|
||||
To create a module inside this repository:
|
||||
|
||||
@@ -14,9 +15,11 @@ To create a module inside this repository:
|
||||
module actually implements and consumes.
|
||||
5. Replace `src/server/index.ts` with backend behavior only. Its `defineModuleRuntime` ID and version
|
||||
must match the manifest; do not duplicate the rest of the manifest in TypeScript.
|
||||
6. Run `pnpm install`, `pnpm build`, `pnpm modules:validate`, and `pnpm verify` from the repository
|
||||
6. Replace `src/schema/index.ts` with declaration-only Drizzle tables. Keep `createModuleTable` and
|
||||
`defineModuleSchema` aligned with the module ID, and never import another module's schema.
|
||||
7. Run `pnpm install`, `pnpm build`, `pnpm modules:validate`, and `pnpm verify` from the repository
|
||||
root. The declared production entrypoint is the compiled `dist/server/index.js`, not source
|
||||
TypeScript.
|
||||
TypeScript; the schema entrypoint is likewise compiled to `dist/schema/index.js`.
|
||||
|
||||
Do not add UI components, styles, renderers, navigation, or layouts. Those belong to surfaces.
|
||||
Keep imports side-effect-free, register capabilities in `register`, acquire resources in `start`,
|
||||
|
||||
Reference in New Issue
Block a user