diff --git a/backend/llm.txt b/backend/llm.txt index 33cb858..831110f 100644 --- a/backend/llm.txt +++ b/backend/llm.txt @@ -106,6 +106,15 @@ Run from `backend/`: - Prefer existing test style under `backend/tests/e2e`. - Run: `make test` +### 1.8 Module-level route group (Path + Middlewares) + +If you need to define a module HTTP middleware (applies to the module route group): + +1) Run `atomctl gen route` first. +2) Edit `backend/app/http//routes.manual.go`: + - Update `Path()` to return the current module route group prefix (must match the prefix used in `routes.gen.go`, e.g. `/super/v1`, `/t/:tenant_code/v1`). + - Update `Middlewares()` return value: return a list like `[]any{r.middlewares.MiddlewareFunc1, r.middlewares.MiddlewareFunc2, ...}` (no `(...)`), where each item is `r.middlewares.` referencing middleware definitions in `backend/app/middlewares`. + --- ## 2) Add / update a DB model