···74747575## `lexicons/` -- AT Protocol schemas
76767777-Lexicons are JSON schemas that define your data model. Think of them like Prisma models, but for the AT Protocol -- they describe records (data types stored in user repositories), queries (GET endpoints), and procedures (POST endpoints).
7777+Lexicons are JSON schemas that define your data model for the AT Protocol. They describe records (data types stored in user repositories), queries (GET endpoints), and procedures (POST endpoints).
78787979```
8080lexicons/
+9-9
docs/site/index.md
···1313 link: /cli/
14141515features:
1616- - title: Typed end-to-end
1717- details: Lexicons generate TypeScript types for records, queries, and feeds. Your editor catches mistakes before your users do.
1818- - title: SQLite by default
1919- details: No external database to configure. Data lives in a single file that just works — locally and in production.
2020- - title: OAuth built-in
2121- details: AT Protocol auth with session cookies. Login, logout, and viewer resolution with zero setup.
2222- - title: SvelteKit-first
2323- details: Full-stack with SSR, remote commands, and typed XRPC calls from a generated client.
1616+ - title: Convention-driven storage
1717+ details: Define lexicons, get tables with full-text search and pagination. No DDL to write.
1818+ - title: File-based backend
1919+ details: Files in server/feeds/ become feed generators. Files in server/xrpc/ become endpoints.
2020+ - title: OAuth included
2121+ details: Server-side AT Protocol OAuth with session cookies. Configure scopes in hatk.config.ts.
2222+ - title: Typed from lexicons
2323+ details: Lexicons generate TypeScript types for records, queries, feeds, and the client.
2424---
25252626## Project Structure
···4141│ └── getProfile.ts # defineQuery('...', ...)
4242├── seeds/
4343│ └── seed.ts # Test fixture data
4444-├── lexicons/ # AT Protocol schemas (like Prisma models)
4444+├── lexicons/ # AT Protocol schemas
4545├── hatk.config.ts # Server configuration
4646└── hatk.generated.ts # Auto-generated types from lexicons
4747```