Also added did:web support for DID resolution. Small fix, but if you were running into issues resolving non-PLC identities, that's sorted now.
github.com/gamesgamesgamesgamesgames/happyview
Also added did:web support for DID resolution. Small fix, but if you were running into issues resolving non-PLC identities, that's sorted now.
github.com/gamesgamesgamesgamesgames/happyview
I'll probs add some more config around that feature later (disable, limit allowed domain authorities, etc), but it's pretty cool to no longer need to include a special handler for app.bsky.actor.getProfile. ๐
Say a request comes in for com.example.doThing and your instance doesn't have that lexicon. HappyView resolves the domain authority (example.com), makes the XRPC call there, and proxies the result back. Way more useful as general-purpose ATProto infrastructure.
HappyView can now resolve and proxy XRPC calls it doesn't have lexicons for. Instead of rejecting unrecognized methods, it'll resolve the target and proxy the call through.
A new release already wuuuuuuuuuuuuut ๐งต
github.com/gamesgamesga...
OH, sneak preview: within the next couple of releases, I'll very likely be adding support for writing your scripts in Typescript instead of just Lua. ๐
Plus the usual batch of bug fixes: Tap reconnections now properly sync collections, backfill edge cases are cleaned up, and a handful of UI fixes.
Curious what y'all wire up with index hooks. Let me know if you build something cool.
github.com/gamesgamesgamesgamesgames/happyview
The dashboard also picked up an event log, so you can keep track of what's happening under the hood. Record indexing, script runs, errors, backfills, and significantly more.
Super helpful for debugging hooks or just keeping an eye on things in general.
@trezy.codes is already using index hooks to push records to Algolia for search. A few lines of Lua and every record indexed by HappyView automatically gets synced over. That's the kind of thing these are built for.
Those hooks can actually do things, too. There's a new http module so your Lua scripts can make outbound requests, plus support for environment variables so you're not hardcoding secrets into your scripts. Sorting support in the db module rounds it out.
The headline feature: Index Hooks.
You can now write Lua scripts that run automatically when records are indexed. Want to transform data, trigger side effects, or filter incoming records? Write a hook and HappyView runs it as records come in from the network.
A doozy indeed. HappyView v1.9.0 is out, and this one's all about making the Lua scripting layer way more powerful. ๐งต
#atproto
All open source under MIT as always:
github.com/gamesgamesgamesgamesgames/happyview
These are the kinds of building blocks that get fun when people start combining them. Curious to see what y'all do with backlinks especially.
#atproto
And the big one for v1.8: advanced queries. db.backlinks() lets you find all records that reference a given AT URI, and db.raw() opens up read-only SQL with parameterized queries and automatic column type mapping. If the built-in query functions aren't enough, you can write straight SQL.
The Lua scripting layer got a bunch of love. There's a new db.search() function for full-text search, and a toarray() utility that fixes the classic Lua "is this an empty object or an empty array" problem when serializing to JSON.
Starting with the basics: you can now delete records from the dashboard and API, including bulk deletion by collection. The lexicon pages also have "View Records" buttons now so you can jump straight to browsing what's been indexed.
I've had a few releases since the last update. Here's what's new from since v1.5.0. ๐งต
#atproto
๐
๐
Well what do we have here... is it... DOCSโฝ
happyview.dev
#atproto
Hey, for folks either using or considering using @happyview.dev: where are you deploying it? I'm trying to update the deployment guides and I need to know where people are actually planning to deploy.
When it's saved, I'll automatically generate the endpoint at /xrpc/games.gamesgamesgamesgames.createGame. ๐
A side-by-side editor for lexicon JSON (left) and a Lua script (right).
Teaser time. This is a basic procedure lexicon with a processing script.
- prep a game record
- grab a slug or generate one from name
- prep a slug record
- set the same rkey for both records (sidecar model)
- save both records in parallel
- return the uri and cid
#atproto
I'm happy again!
A dialog showing that my account has been labeled as spam.
I'll be SadView until this gets fixed. ๐ข
bsky.app/profile/happ...
In summary:
- Quickslice is awesome
- Quickslice inspired my creation
- I'm the awesomest now, bebe
I think (and @trezy.codes agrees, I just asked him) this is going to be the real power for me. Quickslice generates GraphQL endpoints and schemas, but if you want to do anything more than write, edit, or delete a single record, you're gonna have to build a separate API to sit in front of Quickslice.
Trezy is in the process of adding a powerful system for custom processing those endpoints. You can:
- Create a base record and a sidecar at the same time
- Retrieve and hydrate a custom schema
- Use an endpoint like /xrpx/com.example.makeThing to actually delete a thing because you're the devil
Second, my lexicon management is /robust/. What's doable today:
- Write lexicons directly in the UI
- Connect lexicons from the ATProto network
- Review the JSON for your lexicons
- Delete a single lexicon
I'll also generate XRPC endpoints for procedure and query lexicons. Quickslice ignores them.