Lines
All docs

Where Lines keeps your data on the web

This covers the web app, including the demo at https://olekslitus.com/lines/app/. Everything stays in the browser, on the visitor's computer. The site's host (GitHub Pages) only serves the app's files, and the app never sends notes anywhere. The exception is sync, when someone sets it up: to a folder they choose, or to their own S3 bucket (not offered on the demo website).

All of it can be inspected in the browser's developer tools (in Chrome: Application → Storage).

In the browser

Browser storage belongs to one site (origin) in one browser profile. Another browser, a private window or another computer starts empty, and the demo website starts again with the feature tour. Settings → Export and Import → Start Again goes back to the tour and the examples in the same browser, deleting the notes there first.

IndexedDB

DatabaseStoreWhat's in it
linesnotesEvery note: its Markdown, dates, pin, trash, icon, and for a locked note its encrypted text
linesattachmentsImages and files added to notes, named by their content hash
linessyncWhat was last exchanged with the sync folder or bucket, per note, to tell which side changed
lines-foldersfoldersThe browser's handle to the folder chosen with Save to a folder, so Lines can use it again after a reload
lines-feedsfeedsEach feed subscribed to: what it said of itself and what it's written in (RSS, Atom, RSS 1.0 or JSON Feed, for the sidebar's rows by kind), its newest 200 posts (all but their content), which were read and which dismissed (and why), which its filters keep out, and its ETag and Last-Modified for asking whether it changed (its picture is its note's cover, an attachment)
lines-feedspostsEach post's content, as the feed gave it (HTML), read when the post is opened
lines-feedswordsWhat filters read of each feed's posts (each one's title, author, categories and the start of its text, in lower case, Latin and Greek letters without accents), read only when the filters change, and written when a post does
lines-feedsmarksWhat was done with each feed's posts, as it syncs (feeds/, Sync): when each was read, marked unread, dismissed or restored, by a fingerprint of its id, and when it was last in its feed; Dismiss All's cut-off, and the horizon marks from before are let go at
lines-feedspositionsWhere each podcast episode was stopped, and whether it was played to the end; the episode in the player, to put back after the app lock or a restart; and where each book kept with a note was left, and how far it's been read, by the note

With the app lock on, the notes and attachments in lines and everything in lines-feeds are encrypted (see Sync and src/lib/lock/vault.ts). lines-feeds keeps each record under a random id (a feed's, a post's, its marks', an episode's note's), so nothing there says what's subscribed to or listened to. Most of it isn't synced: subscriptions are notes and sync as notes do, and each device fetches the posts itself; the marks sync, as feeds/, with the words hidden in every feed.

localStorage

KeyWhat's in it
lines.prefsTheme, appearance, font (one of Lines' or one installed on the device, by its name) and formatting's fonts, text size, note width, spacing, icon set, layout, symbols, spreadsheets, links, whether links are looked up (the Library), how often feeds refresh and whether posts read are dismissed, the podcast player's speed, whether books are read a page at a time or scrolled and a PDF's pages in the theme's colors
lines.languageThe language chosen in Settings, unless it's System
lines.pluginsPlugins turned off or on in Settings
lines.tabsThe open tabs, when tabs are on
lines.tagIcons, lines.typeIconsIcons given to tags and types
lines.mutedWordsThe words and phrases hidden in every feed (Settings → Library → Feed filters), and when they were set; they sync as feeds/muted.json. Not encrypted by the app lock
lines.syncWhere notes sync to: the folder (its name and an id for its handle) or the bucket, and their keys (the bucket's secret key, the end-to-end encryption key). In the Mac, iPhone, iPad and Windows apps the keys are in the system's keychain instead (below). Encrypted while the app lock is on
lines.sync.sharedThe tag and a hash of each file of feeds' marks as last exchanged with the sync folder or bucket, so only those changed are read or written (by the one tab that syncs them)
lines.listsAccounts on AniList and MyAnimeList (who, and their tokens), and for each anime on the list what was last exchanged with the site, both sides, and with which note; and what was taken off the list there, which isn't put back. This device's own: never synced. Encrypted while the app lock is on
lines.sync.leftoversSet only while encrypted copies are being removed after turning end-to-end encryption off
lines.seededThat the welcome note or feature tour has been added once, so deleting them doesn't bring them back
lines.unsaved.<id>A note typed in just before the page went (a tab closed or reloaded, Lines quit), until it's in lines: stored at the next start unless what's there is newer. Never a locked note, nor anything while the app lock is on
lines.lockThe app lock's settings, and its key locked with the passphrase
lines.lockedNotesLocked notes' key, locked with their password, and whether Touch ID opens them

In a folder

After Save to a folder (Chrome, Edge and other Chromium browsers), Lines also writes everything to that folder and keeps it in step with the browser, both ways:

<folder>/
  notes/<id>.md          One per note: front matter (id, dates, pin, trash, icon, format), then its Markdown, LaTeX or spreadsheet
  attachments/<hash>.<ext>

The format is described in Sync. The browser stays the working copy; the folder is a copy that other apps can read, and that outlives the browser's storage.

How long it lasts

Browser storage isn't permanent:

  • Clearing site data (or cookies and site data for the site) deletes the notes in the browser.
  • The browser can evict it when the disk runs low. Lines doesn't ask for persistent storage (navigator.storage.persist()), so it's "best effort" storage.
  • Safari deletes the storage of a site that hasn't been visited for 7 days.

For notes that should last, use Save to a folder, or export them (Settings → Export and Import → Export).

Shared with other sites on the same domain

Browsers keep storage apart by domain, not by path. The demo is at olekslitus.com/lines/app/, so its storage belongs to olekslitus.com and is shared with every other page there, which is every GitHub Pages site of the olekslitus account: any of them could read the lines database and the lines.* keys. That's fine for a demo. Before encouraging people to keep real notes on the demo site, move it to a domain of its own (a subdomain such as lines.olekslitus.com would do).

In the desktop apps

The apps keep the same databases and keys, in their web view's storage, in a folder named for Lines' identifier, com.olekslitus.lines:

SystemFolder
macOS~/Library/WebKit/com.olekslitus.lines/ (WebKit's)
Windows%LOCALAPPDATA%\com.olekslitus.lines\ (WebView2's, in EBWebView)
Linux~/.local/share/com.olekslitus.lines/ (WebKitGTK's)

Besides those, an update being downloaded and copies of attachments opened in other apps are in Lines' cache folder (~/Library/Caches/com.olekslitus.lines/ on a Mac, the folder above on Windows, ~/.cache/com.olekslitus.lines/ on Linux), and with Touch ID on, its keys are in the Mac's login keychain as "lines app lock". The sync connection's keys are in the system's keychain as "Lines" (sync) on the Mac, iPhone and iPad, and in Windows' Credential Manager as Lines/sync; Linux and Android keep them in lines.sync for now.

What the host sees

GitHub Pages sees ordinary request logs, as for any site: IP address, browser, and which files were loaded. It never sees what's written in the notes.

Edit this page on GitHub