/wdg/ How do I run SQLite in the frontend, to store the database in the browser or the user's device - /g/ (#106018225)

Anonymous
7/25/2025, 11:49:08 AM No.106018225
SKM
SKM
md5: da4a87fde6bbf7474f164a565da0ed8f🔍
>Free beginner resources to get started with HTML, CSS and JS
https://developer.mozilla.org/en-US/docs/Learn - MDN is your friend for web dev fundamentals
https://web.dev/learn/ - Guides by Google, you can also learn concepts like Accessibility, Responsive Design etc
https://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern introduction to JavaScript
https://javascript.info/ - Quite a good JS tutorial
https://flukeout.github.io/ - Learn CSS selectors in no time
https://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSS

>Resources for backend languages
https://nodejs.org/en/learn/getting-started/introduction-to-nodejs - An intro to Node.js
https://www.phptutorial.net - A PHP tutorial
https://dev.java/learn/ - A Java tutorial
https://rentry.org/htbby - Links for Python and Go
https://quii.gitbook.io/learn-go-with-tests - Learn Go with Tests

>Resources for miscellaneous areas
https://github.com/bradtraversy/design-resources-for-developers - List of design resources
https://www.digitalocean.com/community/tutorials - Usually the best guides for everything server related

>Need help? Create an example and post the link
https://jsfiddle.net - if you need help with HTML/CSS/JS
https://3v4l.org - if you need help with PHP/HackLang
https://codesandbox.io - if you need help with React/Angular/Vue

/wdg/ may or may not welcome app development discussion. You can post and see what the response is.
Some app technologies of course have overlap with web dev, like React Native, Electron, and Flutter.

We have our own website: https://wdg-one.github.io

Submit your project progress updates using this format in your posts, the scraper will pick it up:

:: my-project-title ::
dev:: anon
tools:: PHP, MySQL, etc.
link:: https://my.website.com
repo:: https://github.com/user/repo
progress:: Lorem ipsum dolor sit amet

Previous: >>105946460
Replies: >>106021180 >>106024349 >>106026246 >>106027105 >>106027536 >>106029736
Anonymous
7/25/2025, 2:10:40 PM No.106019086
tailwind and effect are based
Anonymous
7/25/2025, 2:34:35 PM No.106019256
>>105965987
Nuh uh nagger my code is live in production rn and serves 1s of users
Replies: >>106020150
Anonymous
7/25/2025, 4:26:55 PM No.106020036
I assume you can compile sqlite into webassembly. idk about actual storage, but you might be able to hack something on top of cookies.
Anonymous
7/25/2025, 4:41:35 PM No.106020133
Are we really going to use this thread with the dog shit OP
Replies: >>106020159
Anonymous
7/25/2025, 4:43:32 PM No.106020150
1572278979662
1572278979662
md5: 20ff98aabe0c112b8c5d540ed597ac31🔍
>>106019256
>serves 1s of users
Anonymous
7/25/2025, 4:44:34 PM No.106020159
>>106020133
we shouldn't
Anonymous
7/25/2025, 4:46:12 PM No.106020172
You create a GUI executable that has the database on the users pc
Replies: >>106020231
Anonymous
7/25/2025, 4:55:20 PM No.106020231
>>106020172
Or you use IndexedDB but the API for that is a clusterfuck
Replies: >>106022494 >>106024134
Anonymous
7/25/2025, 5:13:11 PM No.106020391
Can you add notifications and sharing button to a web app if its not up on a domain yet? If I just run it on my PC can I still get notifications and share stuff?
Anonymous
7/25/2025, 6:34:46 PM No.106021180
1744397676370710
1744397676370710
md5: f51d73fbe600aa7714f927252678d295🔍
>>106018225 (OP)
Anonymous
7/25/2025, 6:58:08 PM No.106021447
>have an agent design a microservices architecture so that each part can fit in the model's context limit
>make agents work in each microservice in parallel
>ship enterprise-scale app in an hour
Pajeetically speaking, why wouldn't this work?
Anonymous
7/25/2025, 7:17:11 PM No.106021707
>tfw corporate network filters HTTP/3 traffic
this is some niggerlicious bullshit bros.
what's the point of IIS(r) 10 on Windows(r) Server(tm) 2022 supporting QUIC if it won't even work bros?!
Also, nginx support when?
>inb4 pay F5
Replies: >>106031645
Anonymous
7/25/2025, 8:12:46 PM No.106022494
>>106020231
Who the fuck thought making the IndexedDb interface such fucking cancer was a good idea? I love the idea of a database in the browser, but this is revolting.
Replies: >>106025118 >>106027818
Anonymous
7/25/2025, 9:58:46 PM No.106024134
>>106020231
dexie fixes that
Replies: >>106027731
Anonymous
7/25/2025, 10:11:53 PM No.106024349
>>106018225 (OP)
For React apps using MUI is the sx prop now the best method of styling now that styled components is being retired to maintenance?
Anonymous
7/25/2025, 10:52:04 PM No.106025118
>>106022494
would you rather no fe db? make a better one
Replies: >>106027818
Anonymous
7/25/2025, 11:50:52 PM No.106026246
2025-07-25+22-46-03_thumb.jpg
2025-07-25+22-46-03_thumb.jpg
md5: 6e2940d194e374be3533e73a883fa750🔍
>>106018225 (OP)
Working on https://csbook.club/

Made a pretty simple theme switcher - also uploaded the source to Github. There's still a lot I want to get to though.

https://github.com/churchofturing/csbookclub
Anonymous
7/26/2025, 12:49:39 AM No.106027078
Bros... Should I wait for WebGPU or just bite the bullet and learn and use WebGL2? I got some old 2D canvas stuff that kind of sucks and wanted to make it more GPU.
Anonymous
7/26/2025, 12:50:55 AM No.106027105
pnas
pnas
md5: c5ee8589904c8ddeb65cc38cf4fa1564🔍
>>106018225 (OP)
Are sitemaps worth it? Is there an SEO and ads guide?
Replies: >>106027583
Anonymous
7/26/2025, 1:20:40 AM No.106027536
>>106018225 (OP)
>How do I run SQLite in the frontend, to store the database in the browser or the user's device
Why not use IndexedDB instead? It's already in the browser.
Anonymous
7/26/2025, 1:24:55 AM No.106027583
>>106027105
Really depends on the size of your site in my experience. If your site doesn't have many pages and is good with internal linking you'll be fine.

If your site has hundreds of thousands of pages then it's worth it.
Anonymous
7/26/2025, 1:36:29 AM No.106027731
>>106024134
This, indexed db is great
Anonymous
7/26/2025, 1:43:30 AM No.106027818
>>106022494
>>106025118
The idea of having a persistent database in the browser is great, but the IndexedDB implementation is horrible because it's a NoSQL database. It's the fault of Firefox and Mozilla.
>Web SQL Database was a prior API developed by Apple.[12] But Firefox refused to add support for it and argued against it becoming a standard because it would codify the quirks of SQLite.[13][14] It was thus deprecated in favor of IndexedDB.[15]
https://en.wikipedia.org/wiki/Indexed_Database_API

Having SQLite or any other small SQL database in the browser would have been much better.
Replies: >>106027960 >>106032987
Anonymous
7/26/2025, 1:54:19 AM No.106027960
>>106027818
It isn't even bad because it's a NoSQL database, it's bad because, well, just look at the fucking interface. Try to do something with it. I dare you.
But yes, it should have been a proper SQL database like SQLite in the browser (in fact, as far as I know, it's actually implemented using SQLite in Chromium, don't quote me on that though). I would fucking coom if I had access to an SQL database in the browser.
Anonymous
7/26/2025, 4:53:30 AM No.106029736
61f6d5d1be0417504d537b3620decce2e0125990
61f6d5d1be0417504d537b3620decce2e0125990
md5: 9b332f5529a77107c43bbfd878346428🔍
>>106018225 (OP)
What's the best way of creating one of those retro blogs?
I'm trying a github-pages template, but it looks horrendously sterile and corpo due to the minima theme (changing it breaks the other stuff)
Replies: >>106032772 >>106033229
Anonymous
7/26/2025, 9:48:47 AM No.106031645
>>106021707
HTTP3 is more like HTTP2.1 desu
Anonymous
7/26/2025, 10:27:26 AM No.106031869
https://javascript.info/ninja-code

Kek this is quite funny
Anonymous
7/26/2025, 1:04:55 PM No.106032772
>>106029736
>What's the best way of creating one of those retro blogs?
It's crazy to me that people even have to ask this question. It's by doing it yourself you dullard: the authenticity is the point.
Anonymous
7/26/2025, 1:44:03 PM No.106032987
>>106027818
And they don't support PWAs either, these two things are exactly what I want, do they want me to switch to chromium??????
Replies: >>106033838
Anonymous
7/26/2025, 2:12:20 PM No.106033188
https://www.npmjs.com/package/absurd-sql
Anonymous
7/26/2025, 2:16:22 PM No.106033229
>>106029736
not sure i understand the question
it's all html and css
just change the styling
no rounded corners, high contrast, no excessive padding, etc
basically just do the opposite of everything that is considered "modern"
Anonymous
7/26/2025, 3:16:03 PM No.106033627
>Be on Debian 12
>Debian's version of Java is 17
>Now I need Java 21
>Microsoft provides Java 21 as a .deb repo
Thanks Bill Gates
Replies: >>106033676
Anonymous
7/26/2025, 3:25:10 PM No.106033676
>>106033627
Azul/Zulu and Amazon/Correto seem like popular choices.
Actually, why not use devcontainers?
Replies: >>106033689
Anonymous
7/26/2025, 3:27:30 PM No.106033689
>>106033676
I'm on a shitty computer and containers would probably just be extra bloat.
Anonymous
7/26/2025, 3:51:03 PM No.106033838
>>106032987
They also holding up @scope https://caniuse.com/css-cascade-scope
Anonymous
7/26/2025, 6:33:47 PM No.106035423
18289239939283993
18289239939283993
md5: 36e25776923c7b6968122dc7d701701d🔍
Crazy how many web devs still use external stylesheets even though they're much slower. You have to inline your CSS if you want good performance.
https://danielnagy.me/posts/Post_tsr8q6sx37pl
Replies: >>106036484 >>106039198
Anonymous
7/26/2025, 8:09:49 PM No.106036484
>>106035423
Inline is bad practice thoughever
Replies: >>106036772
Anonymous
7/26/2025, 8:35:14 PM No.106036772
>>106036484
How? You're taking a big performance penalty by not doing it. Locality of behavior is also pretty nice.
Replies: >>106038889
Anonymous
7/26/2025, 11:26:46 PM No.106038889
>>106036772
Inline CSS mixes presentation into HTML, violating separation of concerns and scattering styles across many elements, which makes code harder to maintain and inconsistent. It also prevents browsers from caching CSS, bloating HTML size and slowing performance compared to external stylesheet files. Keeping all styles in separate CSS files provides a single source of truth, streamlines updates, and improves collaboration. Adopting preprocessors and naming conventions further enhances modularity, scalability, and clarity in large projects.
Replies: >>106039193 >>106040274
Anonymous
7/26/2025, 11:56:01 PM No.106039193
>>106038889
>separation of concerns
Locality of behavior is argumentably more important (most of the time). I certainly think that's the case with CSS since CSS is very tricky; it's obvious what styling an element has if you inline the CSS.

>which makes code harder to maintain and inconsistent
>Keeping all styles in separate CSS files provides a single source of truth, streamlines updates, and improves collaboration. Adopting preprocessors and naming conventions further enhances modularity, scalability, and clarity in large projects.
True, it's a trade-off between significant performance gains and it being harder to maintain.

>It also prevents browsers from caching CSS, bloating HTML size and slowing performance compared to external stylesheet files
The difference is minimal after compression. The performance gains from inlining the CSS far outweighs it, as is evident by that article. You should inline the CSS if you care about performance.
Anonymous
7/26/2025, 11:56:23 PM No.106039198
>>106035423
Since when do webshitters give a damn about performance?
Replies: >>106039253
Anonymous
7/27/2025, 12:01:08 AM No.106039252
>How do I run SQLite in the frontend, to store the database in the browser or the user's device
https://sql.js.org/
Anonymous
7/27/2025, 12:01:07 AM No.106039253
>>106039198
I know, it's a sorry state of affairs. It isn't even hard to get good performance if you care.
Anonymous
7/27/2025, 1:40:37 AM No.106040274
>>106038889
separation of concerns is a meme dating back to html 2.0 at the time when we were getting rid of html tags (marquee, center, font, etc) to replace them with css.

Things have changed, bigly, since then.
Anonymous
7/27/2025, 1:48:54 AM No.106040346
I've got a raspberry pi zero 2 w with 512 MB ram
and I'm running a website dashboard on it

Currently in next.js
but should I swap to astro+Alpine.js+htmx?
I want it to be as easy on the CPU + ram as possible
while maintaining good DX
not sure if react is much more heavy at runtime than alpine.js+astro?
Replies: >>106040362
Anonymous
7/27/2025, 1:50:10 AM No.106040362
>>106040346
And to be precise I'm only displaying the website that is hosted elsewhere.
I'm not running the process on the actual raspberry pi
Only the browser with the loaded page