A small NestJS + GraphQL service over two slices of a learning platform: publishing classes and teams of people.
bun install
bun run devThe API is then at http://localhost:4000/graphql. It runs on in-memory adapters with seed data, so nothing else needs to be installed.
query {
team(id: "team-northwind") {
name
planCode
members { name email }
}
class(id: "class-watercolour") {
title
status
}
}bun run typecheck # tsc --noEmit
bun run lint # biome check .
bun run test # bun testThe service runs entirely in memory by default. To point it at a real database:
cp .env.example .env
bun run db:up # Postgres 16 in Docker, on :5433
bun run db:migrate
bun run db:seed
ADAPTER=postgres bun run devbun run db:down stops it again.
CONTEXT.md describes the domain language and how the repository is arranged.
docs/adr holds the decisions behind it.