Skip to content

hat://kpronounced "hack"

Extends your Vite application with an AT Protocol server. Add feeds, labels, and XRPC endpoints to your app, all typed from your lexicons.

Alpha Software

hatk is in early alpha. APIs may change without notice. Please give it a try and give feedback!

Project Structure

A hatk app looks like this:

my-app/
├── app/                        # SvelteKit frontend
│   ├── routes/
│   │   ├── +layout.server.ts   # parseViewer(cookies)
│   │   └── +page.svelte        # Your UI
│   └── lib/
├── server/                     # Backend handlers
│   ├── feeds/                  # Feed generators
│   │   └── recent.ts           # defineFeed({ ... })
│   └── xrpc/                   # Custom XRPC endpoints
│       └── getProfile.ts       # defineQuery('...', ...)
├── seeds/
│   └── seed.ts                 # Test fixture data
├── lexicons/                   # AT Protocol schemas
├── hatk.config.ts              # Server configuration
└── hatk.generated.ts           # Auto-generated types from lexicons