1Fast2Multi-device3Offline4Collaboration5Longevity6Privacy7User ControlLocal-first softwareKleppmann et al. · Ink & Switch, 2019inkandswitch.com/essay/local-firstWhat's wrong with the cloud?it breaks four of the seven idealsThey can read itmined for ads, AI training,and the terms change under you6 PrivacyThey can shut it downGoogle Reader, 2013:millions of users, switched off5 LongevityThey can lock you outone account ban, no appeal,and your data stays with them7 ControlNo network, no appthe real copy is theirs,offline is an error state3 OfflineOne place for everyone's data: one place to watch, block or lose it all.Local-first and P2P play along nicelyyou don't depend on one server: you depend on each otherData ownershipthe real copy is yours;no central owner of the networkSelf-repairingpeers come and go,the network routes around themDirect, or relayed by peersyou relay for others,they relay for you: you take partNo one in the middleno third party who can surveilor censor; relays carry sealed dataAnd peer-to-peer isn't new…None of this is newUsenet1980XMPP1999Freenet2000BitTorrent2001Tor2002Bitcoin2009Matrix2014Scuttlebutt2014IPFS2015Decades of working peer-to-peer tech.So why does most data still live on a few big servers?Why they lostnot by accident: each one to a pressure you can nameCommunicateUsenet, email: open to all, then drowned in spamthe fix was reputation, so: a few big providers→ MessagingArchiveNapster, BitTorrent: worked, at huge scalebut swarms are public: everyone sees who's in→ StorageAgreeBitcoin, Ethereum: open consensus, solved in 2008but every transaction is public, forever→ BlockchainBe usableFreenet (2000): built for dissidentstoo hard to use for the people it was built for→ Basecamp"I have nothing to hide"why privacy matters: Charter 77 already had the answer"…if he unhesitatingly gives answers to questionnaires which arecontrary to his real opinions and is prepared to deny his own self in public…"Václav Havel, open letter to Gustáv Husák, 1975"…someone considers it necessary to inform the State Security in detailabout his life, because he considers it honorable and legal…"Václav Benda, Parallel Polis, 1978: that is "naive and dangerous"Without privacy we censor ourselves, and the watcher holds power.Benda's answer: build parallel structures, alongside the official ones.Prague's Paralelní Polis is named after his essay. Logos calls it "parallel societies".English: Havel via Wikiquote; Benda tr. Mark Qvist (public domain)Logos: fixing what killed P2Pold ideas: mixnets '81, hashcash '97, Kademlia. New: privacy by default, at scalePrivate by defaultunlinkable, anonymous: network,messages, files, money. A mixnet hideswho talks to whomSpam protection, no IDRLN: ZK-based rate limiting.Prove you're within your quotawithout saying who you areA private blockchainprograms, tokens, shared rules,with private transactions andhidden validator stakesOne stack, your machinemessaging, storage, chain asmodules in Basecamp, a local-firstapp launcher on your own hardware"Privacy is the condition that makes free association possible."logos.co · open source · four claims: I'll score each one after the demoYes, there's a blockchainWhy?value transfer and permanent consensusHow?privately: for users and for operatorsIs this a crypto talk now?No. Scala doesn't use it today, but will benefit from itScalaa calendar you sharewith your peopleanyone can create a calendarshare it with a link or QR codeowner, editors, viewers, open calendarssign edits with a hardware wallet (Keycard)Android + desktop, same calendarimport / export .ics: no lock-inWhat Scala uses from Logosthe four parts my calendar runs on today:Deliverygossip network: pub/sub over libp2prelays pass messages, can't read themStoragecontent-addressed file storagefound by hash, served by peersBasecampdesktop shell that loads app modulesQML views + C++ cores, an app storeKeycardopen-source hardware wallet cardsigns on-card, key never leaves+ my own glue: Loam one shared network node per phone, and a small sync library all my apps share
No server. Every device has the whole calendar.
Logos NetworkDeliverymessagesStoragefiles · snapshotspeers relay and store for each otherphonephonelaptop · BasecampBluetoothno internet · Loamhub optionaljust another peer · always on
Inside one device
Scalacalendar view · Android app · Basecamp moduleevent logappend-only · calendar = replay(log)+sync library⏱ order · hybrid clock✍ sign · your key / Keycard🔒 seal · calendar key⇄ catch up · fingerprintsLoamone node per phone, shared by every appDeliveryBluetoothLogos Storage · filesLogos Deliveryphonesnearby
Offline edits, merged later no lost changes
phonelaptopofflinemove to 3 pmadd note✍ signed · 🔒 sealed✍ signed · 🔒 sealedback online“here's my fingerprint”“you're missing these”3 pm+ note3 pm+ notesame calendarwhatever order they arrive inwhat the network sees0x9f3a…c41e 0x02bb…7d10 0xe71c…05aaonly people with the calendar key can readonly signed authors can writeNo server, so who enforces the rules?Readingthe invite link carries thecalendar keyevery event is sealed with itno key, just noiseWritingevery event is signed(device key or Keycard)the owner's signed events saywho's an editorevery device checks, and ignoreswhat it shouldn't acceptthe catch: removing a reader means a new key; a kicked editor's old edits stay
Files & fast joins Logos Storage + the optional hub
behind NAT🔒hubrelaycachesnapshotsbehind NATsealed fileby content IDLogos Storagenew1 snapshot+recent changesinstead of replaying years of historySpamcomingSpam protection = a message budgetRLN: ZK-based rate limiting, a quota per node, shared by every appEvery sync message countscatch-up, retransmits, edits: snapshots and batching keep it smallNot switched on yetI measured my apps' traffic, so they fit before it isPrivacypartlyContent: sealed, relays see noiseonly people with the calendar key read; only signed authors writeMetadata: not yetrelays see topics and timing, peers see your IP; mixnet: testnetCross-platform crypto has sharp edgesdefault JS randomness isn't crypto-safe; two libs disagree on signaturesWho runs itpartlyHome routers say notwo phones behind NAT can't reach each other: you need a reachable peerThe network forgetshistory is kept only for a while. Re-send, or keep an always-on peerP2P file transfer is round-trip boundhundreds of KB/s to a phone; found and fixed a few causes upstreamUsablepartlyFor users: it worksinstall from F-Droid or Basecamp, offline, share by QR; no iPhone yetUpgrades break the wirea new library version and old phones stop understanding new desktops"It syncs nothing"one silent drop, five layers deep. Lesson: log every boundaryWhere it shinesinstant UI: every read is localoffline, and phone-to-phone over Bluetoothno backend to run, scale or pay forsharing = a link; permissions = signaturessame blocks → 7 more apps, fastScalashared calendarWhisperBoxencrypted formsKYMhousehold budgetQAKUanonymous Q&APerunruns & ridesBackpackapp store on LogosLoamone shared node per phoneShroomsmesh VPNapps.vpavlin.xyzWorth adopting?Local-firstalwaysbuild on the principles: better UX and real data ownershipPeer-to-peerwhen privacy and resilience are crucialno one in the middle to watch, block or lose your dataLogoswhen you need the full stackmessaging, storage, identity, chain: for a decentralised appStart buildingLogoslogos.cowhat it is, the whole stacklogos.co/basecampthe local-first launcherlogos.co/prifiprivate finance: the chain sideMy building blocksvpavlin/loamone shared node per phonevpavlin/loam-syncevent log, ordering, catch-upvpavlin/scalathe calendar, all of itvpavlin/logos-skillsthe lessons, written downmy blocks: github.com/vpavlin · MIT + Apache-2.0Get Scalaapps.vpavlin.xyzJoin the demo calendar
"…create autonomous information systems." Václav Benda, 1978Parallel structures don't need heroes.They need boring apps people use every day.Build one.Questions?apps.vpavlin.xyz · github.com/vpavlin
← → · swipe · ‹ › buttons · n notes · f fullscreen