This monorepo uses Bun workspaces to manage multiple Next.js portals and a shared component library.
- Install Bun v1.1 or newer.
- Clone the repository and switch into the project directory.
- Ensure you can run
bunandnodefrom your shell (Node is pulled in via Bun, but having a recent LTS locally helps).
Run the install from the repo root to hydrate every workspace:
bun installShared defaults live in the root .env. Next.js portals automatically load this file (along with .env.local and .env.<NODE_ENV>) through the shared config in packages/lib/next.config.js.
Steps to configure envs:
- Copy
.env.exampleto.envand fill in required values (never commit secrets). - Optional overrides:
.env.local(root): local-only values that shadow.env.packages/<portal>/.env: use only for portal-specific overrides you need during development (e.g.packages/katana/.envfor an alternate API endpoint).
- Start a portal:
bun run dev:<portal>(e.g.bun run dev:katana). - The script proxies into
packages/<portal>and launches the associated Next.js dev server.
- Lint everything:
bun run lint - Format sources:
bun run prettier-format
- The repo uses Vitest + Testing Library. Run all tests with:
bun x vitest- Build a portal for production:
bun run build:<portal> - Serve a built portal:
bun run serve:<portal>
- Scaffold the portal under
packages/<portal>following existing examples. - Configure
package.jsonscripts for the new portal (dev:<portal>,build:<portal>, etc.) in the repo root. - Ensure portal-specific env overrides are minimal and reference shared values by default.