- HTTP handler
- A Go function that receives a request and writes a response. Here they look like func(ctx, request) (response, error); the framework turns that into a real http.Handler.
- Route
- A method plus a compiler-owned path constant, e.g. GET core.RouteAPIAdminUsersVersioned, bound to one handler.
- Middleware
- A function that wraps a handler to run something before or after it — check a login cookie, a CSRF token, log. Wrapping is an onion: outer(inner(handler)); the outer layer runs first.
- RBAC
- Role-Based Access Control: what you may do depends on your role (super_admin, admin, staff, customer, plus an invalid unknown). An action is a thing you might be allowed to do; the policy package owns which roles may do which actions.
- core.ULID
- A 26-character sortable unique ID used for user IDs — a nicer UUID. The all-zero ULID means 'not set'; id.IsZero() checks for it.
- Store
- The database behind a Go interface. Handlers never touch SQL; they call methods like st.FindByID(ctx, id).
- WriteTx
- A database transaction. You hand it a function; everything in it commits or rolls back together. Inside the callback you read and write through tx, not the store.
- Ledger
- An append-only audit log. Every meaningful change writes a ledger entry, so there is a permanent, tamper-evident record of who did what and when.
- Validate()
- Almost every type has a Validate() error method that rejects malformed values at a clear boundary instead of passing bad data around silently.
- Sentinel error
- A named, comparable error like core.ErrForbidden, tested with errors.Is, so the HTTP layer can map it to the right status code.
- Fail closed
- When something required is missing or unclear, deny or error rather than allow. This package fails closed everywhere.
- CSRF
- Cross-Site Request Forgery: an attack that makes your browser send a state-changing request with your cookies. The defense is a secret token the attacker can't know; mutation routes require it, read routes don't.