AppView in a box as a Vite plugin thing
hatk.dev
1---
2layout: home
3
4hero:
5 name: hatk
6 tagline: Build AT Protocol apps with typed XRPC endpoints.
7 actions:
8 - theme: brand
9 text: Get Started
10 link: /getting-started/quickstart
11 - theme: alt
12 text: CLI Reference
13 link: /cli/
14
15features:
16 - title: Typed end-to-end
17 details: Lexicons generate TypeScript types for records, queries, and feeds. Your editor catches mistakes before your users do.
18 - title: SQLite by default
19 details: No external database to configure. Data lives in a single file that just works — locally and in production.
20 - title: OAuth built-in
21 details: AT Protocol auth with session cookies. Login, logout, and viewer resolution with zero setup.
22 - title: SvelteKit-first
23 details: Full-stack with SSR, remote commands, and typed XRPC calls from a generated client.
24---
25
26## Project Structure
27
28A hatk app looks like this:
29
30```
31my-app/
32├── app/ # SvelteKit frontend
33│ ├── routes/
34│ │ ├── +layout.server.ts # parseViewer(cookies)
35│ │ └── +page.svelte # Your UI
36│ └── lib/
37├── server/ # Backend handlers
38│ ├── feeds/ # Feed generators
39│ │ └── recent.ts # defineFeed({ ... })
40│ └── xrpc/ # Custom XRPC endpoints
41│ └── getProfile.ts # defineQuery('...', ...)
42├── seeds/
43│ └── seed.ts # Test fixture data
44├── lexicons/ # AT Protocol schemas (like Prisma models)
45├── hatk.config.ts # Server configuration
46└── hatk.generated.ts # Auto-generated types from lexicons
47```