App layout
Every app produced by nexler create app follows a fixed, layered structure. main.go calls routes.Register(mux) once and is never edited again after the initial scaffold — new routes are added purely by running nexler create <route>, which wires itself into routes/public/public.go or routes/protected/protected.go automatically.
handlers/ HTTP handlers — decode request, call service, write response services/ business logic, orchestration store/ persistence via the Store interface models/ request/response and domain structs middleware/ auth, logging, recovery, etc. routes/ routes.go + public/protected aggregators openapi/ in-process OpenAPI registry → /openapi.json request/ decode helpers a handler calls into its Request struct response/ JSON envelope helpers a handler calls to write its result apiclient/ fetch/axios-style helpers for calling other HTTP APIs config/ loads {APPNAME}_-prefixed env vars once, at startup .env editable starting point for the app's env vars auth/ only with -auth jwt|session|both db/ only with -db mongo|mysql|postgres|mssql core/ only when -db is set — app-wide system data kpass/ only after `nexler init kpass` — infrastructure, never hand-edited kgate/ only after `nexler init kgate` (needs -db) — infrastructure, never hand-edited services/kpass/ only after `nexler init kpass` — your CheckAccess wrapper services/kgate/ only after `nexler init kgate` — your Init/HandleEvent