Happyview
A lexicon-driven AppView for ATProto.
Install / Use
/learn @gamesgamesgamesgamesgames/HappyviewREADME
HappyView
HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.
Building an AppView from scratch means wiring up firehose connections, record storage, XRPC routing, OAuth flows, and PDS write proxying before you can even think about your application. HappyView handles all of that. Define your data model with lexicons, add custom logic with Lua scripts when you need it, and ship your app.
Features
- 📜 Lexicon-Driven: Upload your lexicon schemas and HappyView generates fully functional XRPC query and procedure endpoints automatically, no code required
- 🔄 Real-Time Sync: Records stream in from the AT Protocol network in real-time via Tap, with cryptographic verification and backfill via the admin API
- 🔐 OAuth Built In: AIP handles authentication, and writes are proxied back to the user's PDS, so there's no session management needed
- 🌙 Lua Scripting: Add custom query and procedure logic with Lua scripts that have full access to the record database
- 🗄️ Automatic Indexing: HappyView indexes relevant records into PostgreSQL as they arrive, ready to query
- 🪝 Index Hooks: Attach Lua scripts to record collections that fire on every create, update, or delete — sync to search engines, trigger webhooks, or build materialized views in real time
- 🌐 Network Lexicons: Fetch lexicon schemas directly from the AT Protocol network via DNS authority resolution
- ⚡ Hot Reloading: Upload or update lexicons at runtime, and new endpoints are available immediately with no restart
- 🛠️ Admin Dashboard: Manage lexicons, monitor record stats, and run backfill jobs through a built-in admin API
Design Principles
-
Schema-first: Your Lexicons are the source of truth. Upload a schema and HappyView derives endpoints, indexing rules, and network sync from it. You describe what your data looks like; HappyView figures out the rest.
-
Zero boilerplate: HappyView handles AppView infrastructure (firehose, backfill, OAuth, PDS proxying) for you. You should be writing application logic from minute one, not plumbing.
-
Runtime-configurable: Lexicons can be added, updated, and removed without restarting the server. New endpoints and sync rules take effect immediately, so you can iterate on your data model in real time.
-
Protocol-native: HappyView works with any PDS, resolves DIDs through the directory, and follows AT Protocol conventions. It's a first-class citizen of the network, not a wrapper around it.
Next Steps
- Quickstart: Deploy HappyView on Railway or run it locally
- Lexicons: Upload lexicon schemas and start indexing records
- Lua Scripting: Write custom query and procedure logic
- Index Hooks: React to record changes in real time
- Event Logs: Monitor system activity, debug script errors, and audit admin actions
