HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
phiresky
sql.js-httpvfs
TypeScript2021–2026
phiresky / sql.js-httpvfs

sql.js-httpvfs

Hosting read-only SQLite databases on static file hosters like Github Pages

25Distinct people
31Mentions
0Explicit recommenders
3.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Hosting read-only SQLite databases on static file hosters like Github Pages

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year31 dated mentions

Observed mentions: 2021-05-02 21:02:05 UTC to 2026-07-23 22:51:24 UTC.

02468102021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 10 mentions; 0 submissions, 10 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC505
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC10010
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC707
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC404
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC202

What Hacker News says

31 sources
Don't miss how this works. It's not a server-side application - this code runs entirely in your browser using SQLite compiled to WASM, but rather than fetching a full 22GB database it instead uses a clever hack that retrieves just "shards" of the SQLite database needed for the page you are viewing. I watched it in the browser network panel and saw it fetch: https://hackerbook.dosaygo.com/static-shards/shard_1636.sqlite.gz https://hackerbook.dosaygo.com/static-shards/shard_1635.sqlite.gz https://hackerbook.dosaygo.com/static-shards/shard_1634.sqlite.gz As I paginated to previous days. It's reminiscent of that brilliant SQLite.js VFS trick from a few years ago: https://github.com/phiresky/sql.js-httpvfs - only that one used HTTP range headers, this one uses sharded files instead. The interactive SQL query interface at https://hackerb
Read the rest
ook.dosaygo.com/?view=query asks you to select which shards to run the query against, there are 1636 total.
In Show HN: 22 GB of Hacker News in SQLite
From "Show HN: TeaTime – distributed book library powered by SQLite, IPFS and GitHub" https://news.ycombinator.com/item?id=42264274 : >> phiresky/sql.js-httpvfs: https://github.com/phiresky/sql.js-httpvfs >> mmomtchev/sqlite-wasm-http: https://github.com/mmomtchev/sqlite-wasm-http >> This project is inspired from @phiresky/sql.js-httpvfs but uses the new official SQLite WASM distribution duckdb/duckdb-wasm: https://github.com/duckdb/duckdb-wasm
In Hosting SQLite Databases on GitHub Pages (2021)
So the IPFS part is instead of a CDN? Does it replace asset URLs in templates with e.g. cf IPFS gateway URLs with SRI hashes? datasette-lite > "Could this use the SQLite range header trick?" https://github.com/simonw/datasette-lite/issues/28 From xeus-sqlite-kernel > "Loading SQLite databases from a remote URL" https://github.com/jupyterlite/xeus-sqlite-kernel/issues/6#i... re: "Loading partial SQLite databases over HTTP": > sql.js-httpvfs: https://github.com/phiresky/sql.js-httpvfs > sqlite-wasm-http: https://github.com/mmomtchev/sqlite-wasm-http >> This project is inspired from @phiresky/sql.js-httpvfs but uses the new official SQLite WASM distribution. Datasette creates a JSON API from a SQLite database, has an optional SQL query editor with canned queries, multi DB query support, docs; https://docs.datasette.io/en/stable/sql_queries.
Read the rest
html#cross-d... : > SQLite has the ability to run queries that join across multiple databases. Up to ten databases can be attached to a single SQLite connection and queried together.
In Show HN: TeaTime – distributed book library powered by SQLite, IPFS and GitHub
FUSE does local filesystems, and there are also HTTP remote VFS for sqlite. sqlite-wasm-http is based on phiresky/sql.js-httpvfs, "a read-only HTTP-Range-request based virtual file system for SQLite. It allows hosting an SQLite database on a static file hoster and querying that database from the browser without fully downloading it." "but uses the new official SQLite WASM distribution." [1][2] [2] sql.js-httpvfs: https://github.com/phiresky/sql.js-httpvfs [1] sqlite-wasm-http: https://www.npmjs.com/package/sqlite-wasm-http [3] sqlite3vfshttp: https://github.com/psanford/sqlite3vfshttp HTTP Range requests: https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requ...
In Using SQLite as storage for web server static content
I once tried to use sql.js [1] on a static site for full text search. It worked, but the resulting database size for that site was too large for the web, even with things like detail=none and content='' applied, and requiring the user to download a database each time was just no go. (I guess things should work better for sites with less content or those not requiring a trigram tokenizer.) I switched to Pagefind [2] afterwards before finding out a sql.js-httpvfs [3] fork of sql.js that removes exactly the need to fully download a database (with HTTP range requests). I haven't got the chance to test sql.js-httpvfs out though, but it looks pretty sound and could be much more flexible than Pagefind. (Previously discussed at https://news.ycombinator.com/item?id=27016630 .) [1] https://github.com/sql-js/sql.js/ [2] https://pagefind.app/ [3] htt
Read the rest
In SQLite FTS5 Extension
For search on static sites, I quite like lunrjs to provide a fast, good enough, client-side-only search experience. I came for the feature set and stayed for the tagline... "Lunr: A bit like Solr, but smaller and not as bright." Another neat trick is to create an FTS search index in SQLite, and have the client query it with sql.js-httpvfs [1]. Works with github pages just fine [2]... Your web server must respect HTTP range requests. [1] https://github.com/phiresky/sql.js-httpvfs [2] With the caveat that you have to commit your database index (lunr's json, or sqlite's db file) to source, because gh pages does not support serving objects managed by git LFS.
In Microfeatures in My Blog
I couldn't find do these wrappers support read-only SQLite databases with HTTP range requests, like in this famous post [1]. Phiresky's wrapper supports it, but it seems to be rebuilding the whole sql.js [2], I'd rather have it as VFS on top of sqlite.org's own WASM module. I like the idea of HTTP range requests, but I don't want to run a fork, that will be unmaintained in few years. [1]: https://news.ycombinator.com/item?id=27016630 [2]: https://github.com/phiresky/sql.js-httpvfs
In A future for SQL on the web (2021)

Showing the 15 most recent of 31 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.