i’m writing a diary app with pouchdb and preact that can use couchdb to store encrypted backups, but so far i have been most hyped about its test suite

· · Web · 1 · 0 · 3

it feels so good to debug my shitty code ahead of time

so i know i was hyped about the test suite but then i got lost writing app code and none of that has tests, lol. lmao actually

dev blogging 

i am using preact which is like this fucking weird barnacle on the react ecosystem. it’s syntactically similar, and usually compatible with stuff, but nobody tests for preact compat so sometimes i have to downgrade to make stuff work. if this sucks long enough i’ll just use vue for my next project

dev blogging 

testing for the frontend is instrumented and everything, i just haven’t bothered to test anything because the app architecture is still rapidly evolving. nobody ever tests frontend code which is fucking mind-boggling, so i insisted i do it this time.

dev blogging 

why i am i writing a diary? well,

i want to demonstrate an app that treats the user’s device as the authoritative source of the user’s data, while providing a self-hosted encrypted backup option for generic app data — which in this case is provided through couchdb. basically you can replicate your data to a backup service without that service knowing anything about your data :D

a slice of privacy; a piece of mind.

dev blogging 

i believe this replication story is very good for federated software. systems like mastodon don’t have good backup or export options for users, in part because there isn’t a standard export format that would make sense to provide to users. hell, facebook exports your data as static web pages.

but i’m not just talking backups. imagine a multi-instance masto client that centers your data in the browser, making it faster, more stable, and available offline. plus, encrypted backups!

dev blogging 

but this goes for all sorts of software, too. making it safe and easy for users to own their own data without becoming a sysadmin is crucial to advancing matters like user privacy and respectful data management.

but right now i’m just writing a diary.

dev blogging 

@garbados or just more generally, a federation of clients where servers only hold metadata and clients only get the data they actually need

dev blogging 

@garbados is this possible outside of the browser or are we talking 100% indexedeb here

dev blogging 

@wohali you could certainly write it as a server-based system. i’m thinking about doing this in the browser, yeah.

Sign in to participate in the conversation
Friend Camp

Hometown is adapted from Mastodon, a decentralized social network with no ads, no corporate surveillance, and ethical design.

<svg xmlns="" id="hometownlogo" x="0px" y="0px" viewBox="25 40 50 20" width="100%" height="100%"><g><path d="M55.9,53.9H35.3c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3h20.6c0.7,0,1.3-0.6,1.3-1.3S56.6,53.9,55.9,53.9z"/><path d="M55.9,58.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.6H48.5z M44.1,40.5l1.2,1.6h-7.5l1.2-1.6H44.1z M49.2,44.6h5.5v4.9h-5.5V44.6z"/></g></svg>