Methodology
Study Space: data, backups, and limits
This page documents how My Study Space stores your data. The short version: everything lives in your browser, in a local database only your device can read. The rest of this page is the long version, so you can verify that claim.
The data model
Study Space uses IndexedDB — a database built into your browser — with six stores:
| Store | Holds |
|---|---|
notes | Your notes (title, Markdown body, timestamps, folder links) |
files | Uploaded files: the file itself (as a Blob), name, size, MIME type, and any extracted text for search/preview |
folders | Folder organization for notes and files |
timetables | Saved timetable plans you generated with the timetable tool |
conversations | AI chat history (messages only — API keys are never stored here) |
kv | Small settings and tool state: tracker data, countdowns, flashcard decks (flashdecks:v1), quiz attempts (quizattempts:v1), non-secret provider configs |
The schema is versioned (currently v1); any future structural change will be applied through a migration, not by dropping your data. There is no sync, no account, no server copy — deleting your browser data deletes your study space.
Backup export/import
- Export downloads a single JSON file (
studypilot-backup-YYYYMMDD.json) containing every store. File blobs are converted todata:<mime>;base64,…strings so the whole backup is one portable text file. - Format:
{ app: "studypilot", schemaVersion: N, data: { notes: […], files: […], … } }— each section is a plain array of records keyed by its own id field. - Import modes: Merge (default) keeps your existing records and adds the backup’s — existing ids are left alone. Replace wipes all current data first and requires two confirmations: a tick-box plus a native confirm dialog. Export your current data before replacing.
- Validation before touching data. Imports are checked first: valid JSON, recognized app marker, readable schema version, no unknown sections, every record has its id, total under the 100 MB import cap. A backup made with a newer schema version is refused with an instruction to update the app — your current data is never touched by a failed import.
The format-stability promise
Your backup file is yours. The export format is versioned (schemaVersion), and future versions of the app will continue to read older backups — we will not ship an update that orphans your exported data. If the format ever changes, this page will document the migration path.
Quota and degraded mode
- Per-file cap: uploads are limited to 50 MB per file (rejected with a plain message, not a silent failure).
- Storage meter: the Study Space header shows how much browser storage you’re using versus your quota. There is also a “keep data” button that asks the browser for persistent storage so your data isn’t evicted under pressure.
- Degraded mode: if IndexedDB is unavailable (private browsing quirks, blocked storage), the page shows a banner and runs on an in-memory fallback with the identical API — everything works, but nothing persists past the tab. The banner says so plainly; the app never pretends to save when it can’t.
- Quota-full errors are translated into plain language (“browser storage is full — delete some files or export a backup, then try again”) instead of raw error codes.
File previews
Previews are rendered locally in your browser from the stored file:
- Images — shown directly (max width constrained).
- PDFs — shown in an embedded viewer.
- Text files (
.txt,.md,.csv, othertext/*) — first 500,000 characters, plain text. - Word documents (.docx) — text is extracted on upload; the preview shows the extracted text, or a “couldn’t extract” note with a download button.
- Everything else — no preview; a download button so you can open it in its own app.
Previews use temporary object URLs that are revoked when the preview closes. Text previews use textContent — file contents are never interpreted as HTML.
Privacy: everything local
- Notes, files, folders, timetables, chat history, decks, and quiz attempts never leave your device — except through the two paths you trigger: Send in the AI features (covered in the AI chat and AI workflows contracts) and backup export (a file you download).
- Plaintext API keys are never written to any store (see AI chat: your key). Non-secret provider configs (names, endpoints, model lists) are stored in
kv; encrypted key blobs only if you opt in. - There is no analytics, no tracking, and no account system anywhere in the app — nothing exists to report your data to.