[HN Gopher] Show HN: TeaTime - distributed book library powered ...
___________________________________________________________________
Show HN: TeaTime - distributed book library powered by SQLite, IPFS
and GitHub
Recently there seem to be a surge in SQLite related projects.
TeaTime is riding that wave... A couple of years ago I was
intrigued by phiresky's post[0] about querying SQLite over HTTP. It
made me think that if anyone can publish a database using GitHub
Pages, I could probably build a frontend in which users can decide
which database to query. TeaTime is like that - when you first
visit it, you'll need to choose your database. Everyone can create
additional databases[1]. TeaTime then queries it, and fetches files
using an IPFS gateway (I'm looking into using Helia so that users
are also contributing nodes in the network). Files are then
rendered in the website itself. Everything is done in the browser -
no users, no cookies, no tracking. LocalStorage and IndexedDB are
used for saving your last readings, and your position in each file.
Since TeaTime is a static site, it's super easy (and free) to
deploy. GitHub repo tags are used for maintaining a list of public
instances[2]. Note that a GitHub repository isn't mandatory for
storing the SQLite files or the front end - it's only for the
configuration file (config.json) of each database, and for listing
instances. Both the instances themselves and the database files can
be hosted on Netlify, Cloudflare Pages, your Raspberry Pi, or any
other server that can host static files. I'm curious to see what
other kinds of databases people can create, and what other types of
files TeaTime could be used for. [0]
https://news.ycombinator.com/item?id=27016630 [1]
https://github.com/bjesus/teatime-json-database/ [2]
https://github.com/bjesus/teatime/wiki/Creating-a-TeaTime-in...
Author : yoavm
Score : 45 points
Date : 2024-11-27 13:56 UTC (9 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| viborcip wrote:
| "Everything is done in the browser - no users, no cookies, no
| tracking. LocalStorage and IndexedDB are used for saving your
| last readings, your position in each file."
|
| I love this! Thanks for making this!
| noamikotamir wrote:
| super cool
| mdaniel wrote:
| > (I'm looking into using Helia so that users are also
| contributing nodes in the network)
|
| I had to look that term up <https://github.com/ipfs/helia#readme>
| but while sniffing around in their
| <https://github.com/ipfs/helia/wiki/Projects-using-Helia> I was
| reminded of https://github.com/orbitdb/orbitdb#readme which seems
| like it may be much less rolling your own parts
| yoavm wrote:
| Thanks, I haven't heard of it before. I wonder if it's possible
| to use OrbitDB to download a file from IPFS though? Based on
| it's CID, I mean, because that was my intention with Helia. I
| thought that one of the nice thing about reading books is that
| it takes time, and if users could be seeding their files from
| IndexedDB to the network, they could automatically and
| effortlessly become "contributing citizens".
|
| Another interesting use case would be to see if this can
| replace (or be an addition to) SQLite as the database in which
| the queries are ran.
| slagfart wrote:
| Sorry if I missed this, but is there an example instance we can
| play with?
| yoavm wrote:
| Yes, https://bjesus.github.io/teatime/
| westurner wrote:
| Do static sites built with sphinx-build or _jupyter-book_ or hugo
| or other jamstack static site generators work with TeaTime?
|
| sphinx-build: https://www.sphinx-doc.org/en/master/man/sphinx-
| build.html
|
| There may need to be a different Builder or an extension of
| sphinxcontrib.serializinghtml.JSONHTMLBuilder which serializes a
| doctree (basically a DOM document object model) to the output
| representation: https://www.sphinx-
| doc.org/en/master/usage/builders/#sphinxc...
|
| datasette and datasette-lite can load CSV, JSON, Parquet, and
| SQLite databases; supports Full-Text Search; and supports search
| Faceting. datasette-lite is a WASM build of datasette with the
| pyodide python distribution.
|
| datasette-lite > Loading SQLite databases:
| https://github.com/simonw/datasette-lite#loading-sqlite-data...
|
| jupyter-lite is a WASM build of jupyter which also supports
| sqlite in notebooks in the browser with `import sqlite3` with the
| python kernel and also with a sqlite kernel:
| https://jupyter.org/try-jupyter/lab/
|
| jupyterlite/xeus-sqlite-kernel:
| https://github.com/jupyterlite/xeus-sqlite-kernel
|
| (edit)
|
| xeus-sqlite-kernel > "Loading SQLite databases from a remote URL"
| https://github.com/jupyterlite/xeus-sqlite-kernel/issues/6#i...
|
| %FETCH <url> <filename> https://github.com/jupyter-xeus/xeus-
| sqlite/blob/ce5a598bdab...
|
| xlite.cpp > void fetch(const std::string url, const std::string
| filename) https://github.com/jupyter-xeus/xeus-
| sqlite/blob/main/src/xl...
| mushufasa wrote:
| > The databases used in TeaTime are GitHub repositories tagged
| with the teatime-database topic, which are published on GitHub
| Pages.
|
| Couldn't this be a security issue, for a bad actors to use this
| tag?
| yoavm wrote:
| [delayed]
___________________________________________________________________
(page generated 2024-11-27 23:00 UTC)