logoalt Hacker News

Datasette Apps: Host custom HTML applications inside Datasette

65 pointsby lumpatoday at 1:06 AM21 commentsview on HN

Comments

euroderftoday at 6:14 AM

I never understood why someone hasn't made a framework that makes it stupidly easy to fill an HTML page with SQLite database tables, with all the usual display controls, and with as much "liveness" as desired, and with a protocol (over HTTPS) to manage comms to a server-side instance. SQLite is robust, lightweight, bulletproof - a WASM build belongs on ALL the webpages !

show 2 replies
anitiltoday at 2:11 AM

When I've needed something like this in the past I've spun up simple HTML pages and used the json endpoint that all datasette instances come with [0]. I like this new pattern much better, as it keeps your app and data in one place (I remember having some issue with this at the time, though I can't remember what the actual issue was)

So I imagine we could now load some data in to sqlite, design some HTML also loaded in to the db, and deploy. Although looking at the source, it seems like stored apps are expected to be managed by the plugin itself, but I'm sure there's a way around that

[0] Eg from one of the examples - https://datasette.io/legislators/-/query.json?sql=select+*+f... . If you strip the '.json' you get the html view. For what it's worth there's also a '.csv' version.

joren-today at 5:50 AM

Looks like a good addition to the datasette ecosystem. I have been working on a similar idea with cusom html around sqlite databases. By default a faceted search interface is generated but by reusing the client side data layer, custom apps are made easy.

The design keeps data and presentation together and even maps do not rely on external services.

I have called it Pihka: https://ghentcdh.github.io/Pihka/ https://github.com/GhentCDH/Pihka

jacobgoldtoday at 2:00 AM

It is pretty cool that we have browser features like this to rely on.

I remember writing code in the bad old days to parse HTML tags and allowlist specific attributes. Now browsers have a much better solution baked in.

But it still makes me a bit nervous. Seems like a very small bug could sneak in. This is a good example of where I would reach for Fable to double check the implementation and have a lot of extra tests.

(nit: would be nice if the chat box treated Enter and Shift+Enter the way these other companies have trained my brain, but maybe that is a deliberate choice.)

hankbondtoday at 2:19 AM

Wow this is very similar to the direction im taking with my new project https://github.com/hank-bond/uix (warning the code base is certainly not messy but the application is barely usable for anything as of this post).

Here the goal is to be a self-assembling harness (akin to pi) but focusing on duplex human-agent interactivity over rendered HTML "apps". To start, it's focused more on the "please review this PR and then generate a one-page report" with the ability to write comments in the actual report that automatically get sent back to the agent. The end goal is closer to offering a substrate for less technical people to be able to build personal applications like

- an interactive wiki maintainer: chat with the agent about an article, pull out sections, append/create concepts in the wiki with the new info - agent code harness: agent tabs to the left, chat in middle, code diffs on the right (like the superset/commander class of apps)

Anyway, I'm really into the "self assembling" class of software where everything is basically just an SDK + Agent. I think we might actually be ushering in a new era of "personal computing" in that it's less friction than ever to personalize your setup to your whims. Anyway, thats the goal I'm reaching for.

It seems many others are coalescing on this idea at the same time, so it must just be in the aether.

show 1 reply
nryootoday at 2:50 AM

[dead]

Litticetoday at 1:53 AM

[dead]

xgulfietoday at 1:28 AM

Why people feel the need to overload terms like "datasette" I'll never know

show 2 replies