actions | *.action.ts | unit | one action per file; its test covers the happy path and one refusal | ADR 0098 |
queries | *.query.ts | unit | read-only operations | ADR 0126 |
models | *.model.ts | int | persistence models; their tests need the real database | ADR 0014 |
migrations | *.migration.ts | none | schema changes, applied in order | ADR 0014 |
seeds | *.seed.ts | none | seed data for local and test databases | ADR 0014 |
factories | *.factory.ts | none | test-data factories | ADR 0022 |
policies | *.policy.ts | unit | authorisation rules, one case per verb | ADR 0130 |
permissions | *.permission.ts | contract | declared permission names, covered by the member manifest test | ADR 0130 |
settings | *.setting.ts | contract | declared settings, covered by the member manifest test | ADR 0130 |
events | *.event.ts | contract | versioned event declarations, covered by the member manifest test | ADR 0141 |
listeners | *.listener.ts | unit | @OnEvent handlers, one toEmit case each | ADR 0264 d8 |
workflows | *.workflow.ts | int | durable, compensating workflows | ADR 0130 |
services | *.service.ts | unit | application services that actions and listeners depend on | ADR 0264 d10 |
hooks | *.hook.ts | unit | extension hooks only; React hooks are use-*.ts files, not a folder | ADR 0264 d7 |
links | *.link.ts | none | named links between modules (purpose not yet specified) | ADR 0264 d7 |
drivers | *.driver.ts | unit | port drivers; the memory driver is unit, a real one also needs int | ADR 0264 d7 |
widgets | *.widget.ts | unit | UI widgets; the test sits beside the component | ADR 0264 d7 |
pages | *.page.ts | unit | route pages | ADR 0264 d7 |
resources | *.resource.ts | unit | admin-UI @Resource declarations; the word resource is reserved for them | ADR 0234 |
ai | none | none | AI code: prompts, tools and agents | ADR 0264 d7 |
raw | none | unit | raw @Controller endpoints only: webhooks, streaming and the /api/auth paths; actions never use it | ADR 0130 |
decorators | none | unit | decorator packages with their Explorer (backend-decorator-package skill) | ADR 0130 |
contracts | none | contract | vocabulary under src/contracts/, used by the package entry of that name | ADR 0117 |
config | *.config.ts | contract | typed configuration inside src/config/, not beside src | ADR 0025 |
interfaces | *.interface.ts | contract | type-only shapes | ADR 0128 |
types | *.type.ts | contract | type aliases and unions | ADR 0128 |
tokens | *.token.ts | contract | DI tokens made with defineToken | ADR 0231 |
constants | *.constant.ts | contract | module-level constants, SCREAMING_SNAKE | ADR 0231 |
enums | *.enum.ts | contract | const-object enums with a same-named union type; the enum keyword is banned | ADR 0128 d1 (file name only; no ADR names the folder) |
errors | *.error.ts | contract | StackraError subclasses | ADR 0232 |
schemas | *.schema.ts | contract | Zod schemas | ADR 0095 |
components | none | unit | components as folders: components/<name>/<name>.tsx with its __tests__ beside it | ADR 0128 |