Full-Stack Architecture
Request path
Section titled “Request path”route → handler → service → repository → dbType safety chain
Section titled “Type safety chain”- Drizzle schema defines the
userstable drizzle-zodgeneratesinsertUserSchema/selectUserSchema- Hono routes use
@hono/zod-validatoron auth endpoints - Frontend uses
hc<AppType>()— TypeScript errors on mismatched bodies
| Role | Dashboard | Uploads | Stats API |
|---|---|---|---|
| ADMIN | yes | yes | yes |
| MANAGER | yes | yes | yes |
| USER | no | no | no |
Protected routes redirect unauthenticated users to /login before rendering.