This repository is a Bun based monorepo. Always run bun install in the root
before executing scripts. Lint and typecheck every change:
bunx biome check --fix path/to/file
bun run typecheck- Server startup:
@zemble/bunand@zemble/nodeprovide aservefunction which creates an app withcreateAppand starts the HTTP server. - Plugin definition: each package usually exposes a
plugin.tsexporting aPlugininstance. - App composition: apps configure their plugins and call
serve.
packages/core/createApp.tsresolves plugin dependencies and initialises middleware. Provider instances are attached here.- Each plugin may register providers via
setupProviderin its middleware. - GraphQL requests are handled by the
@zemble/graphqlplugin using GraphQL Yoga. REST routes are collected by@zemble/routesfrom each plugin'sroutes/folder.
- Forgetting to run
bun installor skipping lint/typecheck before committing. - Plugins executed outside their directory may not pick up local configuration.
- When multiple implementations of a provider exist, ensure the
providerStrategiesare set correctly.
- Keep plugins small and focused; avoid tight coupling.
- Use environment variables for configurable values and provide sensible defaults in plugin configs.
- After modifying GraphQL schema or resolvers run
bun run codegento update types. - Add tests near the functionality they cover and run
bun run test.
If something is unclear check the plugin’s plugin.ts or the core
implementation in packages/core.