A study app you run on your own device.
Animated docs Β· Dashboard Β· Install Β· Sync & backup Β· Admin Β· Database Β· Android APK
It includes:
- Focus timer
- Tasks and subjects
- Study sessions and stats
- Habits, exams, tests, and mock tests
- Optional Supabase login, backup, restore, and community features
Start here:
- Documentation home: https://isotopeai.dpdns.org/
- Documentation dashboard: https://isotopeai.dpdns.org/dashboard.html
- Getting started: https://isotopeai.dpdns.org/getting-started.html
- Configuration: https://isotopeai.dpdns.org/configuration.html
- Supabase setup: https://isotopeai.dpdns.org/supabase-setup.html
- Sync & backup: https://isotopeai.dpdns.org/sync-and-backup.html
- Architecture: https://isotopeai.dpdns.org/architecture.html
- API reference: https://isotopeai.dpdns.org/api-reference.html
- Database: https://isotopeai.dpdns.org/database.html
- CLI: https://isotopeai.dpdns.org/cli.html
- Android APK: https://isotopeai.dpdns.org/android-apk.html
- Admin console: https://isotopeai.dpdns.org/admin.html
- Troubleshooting: https://isotopeai.dpdns.org/troubleshooting.html
- Admin guide: ADMIN.md
- Sync, storage layout and backup CLI: https://isotopeai.dpdns.org/sync-and-backup.html
- Feature-to-Supabase map and SQL run order: https://isotopeai.dpdns.org/architecture.html
One-line installers pull the latest version from the main branch and set up the
isotope command for you.
Install Termux from F-Droid or GitHub, not the old Play Store app.
bash <(curl -fsSL https://raw.githubusercontent.com/Suydev/isotope-code/main/install-termux.sh)bash <(curl -fsSL https://raw.githubusercontent.com/Suydev/isotope-code/main/install.sh)irm https://raw.githubusercontent.com/Suydev/isotope-code/main/install.ps1 | iexgit clone https://github.com/Suydev/isotope-code.git
cd isotope-code
bash setup.sh # Windows: .\install.ps1 or setup.bat
isotope startAfter install, update anytime with:
isotope updateYou can also update from inside the app: when a newer build is detected an Update now pill appears at the bottom-right. It works without admin mode as long as the browser is on the same machine as the server (loopback); LAN and remote browsers are refused and should use the command above.
isotope update runs git pull. If you have uncommitted local changes it will
stash them β the in-app button warns you and names the file count first. Recover
stashed work with git stash pop.
Open:
http://127.0.0.1:3000
Setup checks for:
- Node.js 18 or newer
- npm
- Git
.env- required scripts
It then installs the isotope command.
The same isotope command works everywhere: Linux, macOS, Termux (bash CLI,
bin/isotope) and Windows (PowerShell bin/isotope.ps1 or CMD bin/isotope.bat).
isotope start # start the app
isotope stop # stop the app
isotope restart # restart the app
isotope open # open in browser
isotope update # update from GitHub (main branch by default)
isotope status # show status
isotope doctor # find problems
isotope logs # show logs
isotope version # print installed version
isotope repair # repair install
isotope setup # re-run setup
isotope reinstall-widgets # Android Termux widget shortcutsisotope update tracks the main branch by default. Set ISOTOPE_BRANCH
to override, e.g. to follow a different branch:
ISOTOPE_BRANCH=my-branch isotope updateThe app works best with your own Supabase project.
You need Supabase for:
- login
- sync
- cloud backup
- restore on a new device
- avatars
- groups and community features
Steps:
- Create a free project at https://supabase.com
- Open SQL Editor.
- Paste and run isotope-complete.sql.
- Create these Storage buckets if they do not already exist:
avatarsuser-contentnotes
- Copy your Project URL and anon key.
- Put them in
.env.
Upgrading an existing project? isotope-complete.sql is safe to re-run, but if
your project predates the leaderboard RLS change, also run
leaderboard-rls-fix.sql. The old policy blocked public
SELECT on user_stats_summary and daily_user_stats, which makes the leaderboard
render empty. Fresh installs do not need it.
Moving between Supabase projects? From the isotope-apk repo, run
./switch.sh clone --ref <new-ref> --source-ref <old-ref> --pat <PAT> to provision the
new project, migrate the 009-026 patches, then back up data (accounts, groups, study
sessions, avatars, user-content) and restore it into the target in one pass β the
leaderboard/heartbeat cache keys are ref-aware, so the moved app keeps its quota-saving
TTL (daily/weekly/monthly boundaries) without reconfiguration. See docs/switch.md in
the isotope-apk repo for the single-token and cross-account variants. The shipped APK's bundled backend is
iwckbhehmescrqjicbrz.supabase.co (do not reset that project without re-running
switch.sh clone or backup.sh restore).
Example:
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_ANON_KEY=your-anon-public-key
PORT=3000
ENABLE_ADMIN_MODE=falseDo not put a service-role key in the browser.
Do not commit .env.
.envis the preferred runtime env file.- If
.envis missing andyeh.envexists, setup copiesyeh.envto.env. - If
ISOTOPE_ENV_FILEis set, setup reads that file, copies it to.env, and uses the copied values. - Existing
SUPABASE_URL,SUPABASE_ANON_KEY, andENABLE_ADMIN_MODEvalues are preserved. - If
ENABLE_ADMIN_MODEis missing, setup writesENABLE_ADMIN_MODE=false.
The app now uses one backup system.
Main backup:
{userId}/backups/latest.json
Backup history:
{userId}/backups/history/{timestamp}-{hash}.json
Cloud mirror:
{userId}/cloud-snapshot/latest.json
Old folders are still read for safety:
{userId}/imports/latest.json
{userId}/exports/latest.json
{userId}/cloud-snapshot/latest.json
Important rule:
If this device is empty and cloud has a richer backup, upload is blocked. The app must restore cloud data first.
Blocked code:
BLOCKED_EMPTY_OVERWRITE
For full project backups (schema + auth + storage + all users), a standalone CLI is provided:
./backup.sh backup # create encrypted backup (sha256 sidecar + auto-verify)
./backup.sh restore <file> # restore with pre-flight integrity check
./backup.sh verify <file> # verify tables, row counts, auth, storage
./backup.sh info <file> # describe ONE backup file (it takes an argument)
./backup.sh ui # web console on 127.0.0.1:8000
./backup.sh status # progress + ETA of the detached backup job
./backup.sh stop # kill the detached jobui, status and stop manage long backups that run detached. Note that
info takes a backup file as its argument β there is no bare ./backup.sh info
that lists local backups.
See the sync & backup guide for key precedence, scheduling, and safety notes.
Keys are resolved from CLI flags (--supabase-url/--anon-key/--service-key/--pat) > environment variables > .backup_env (gitignored) > .env. .backup_env holds the keeper project credentials (separate from your working project in .env) so cloud backups never hit your live app DB.
If
.backup_envdoes not exist, keys fall back to.env..envonly has to carrySUPABASE_URLandSUPABASE_ANON_KEY;SUPABASE_SERVICE_ROLE_KEYandSUPABASE_ACCESS_TOKENare the two that actually authorise a backup, so without them a backup can only fall back to remote-fetches and will be slow or incomplete. Create.backup_env(chmod 600) before the first real backup.
Admin mode is optional.
Use it only on your own machine.
ENABLE_ADMIN_MODE=true
ADMIN_SECRET=<long-random-secret>
ADMIN_EMAIL=<your-email@example.com>Add SUPABASE_SERVICE_ROLE_KEY only in your private .env when you need admin repair tools.
Open:
http://127.0.0.1:3000/__admin
Useful admin pages:
/__admin/verify/__admin/sync/__admin/storage/__admin/roles/__admin/patch
Dry-run first:
node scripts/repair-user-backup.mjs --user <user-id> --dry-runApply only after the dry-run looks safe:
node scripts/repair-user-backup.mjs --user <user-id> --applyCheck backups:
node scripts/validate-backup-files.mjs --user <user-id>Preview cleanup:
node scripts/validate-storage-cleanup.mjs --user <user-id> --dry-run| Problem | Try this |
|---|---|
| App does not open | isotope start then open http://127.0.0.1:3000 |
| Port is busy | isotope stop or set PORT=3001 in .env |
| Login fails | Check SUPABASE_URL and SUPABASE_ANON_KEY |
| Sync is blocked | Restore the cloud backup first |
| Storage permission error | Re-run isotope-complete.sql |
| Android widget is missing | isotope reinstall-widgets |
| Update failed | isotope doctor, then isotope repair |
| App blank / React doesn't load offline | Clear browser caches: caches.keys().then(keys => Promise.all(keys.map(k => caches.delete(k)))).then(() => location.reload()) β the PWA shell now falls back to its precache for first-visit assets |
Do not test browser globals in the Node REPL. Node has no window, so typeof window.__isoLogin is not a valid Node check.
Use the browser console on http://127.0.0.1:3000/auth:
typeof window.__isoLogin
typeof window.__isoUpBoth should return "function".
Use the Node smoke test when a browser is not available:
npm run test:auth-bridgeTo prove the configured Supabase project can perform the Storage-backed sync path end to end:
npm run test:supabase-syncIf a stale PWA or browser cache is serving old runtime files, clear runtime caches from the browser console:
caches.keys().then(keys => Promise.all(keys.map(k => caches.delete(k)))).then(() => location.reload())If the top-right cloud sync button says Authentication required, the browser is not holding a valid Supabase session even if the app shell still looks logged in. Sign out, sign in again through /auth, then run:
typeof window.__isoGetValidJwtBefore changing sync, backup, auth, or SQL:
node --check server.mjs
node --check server/backup-manager.mjs
node --check public/sync/backup-normalizer.js
node --check public/sync/local-data-adapter.js
node scripts/validate-backup-files.mjs --user <user-id>
node scripts/repair-user-backup.mjs --user <user-id> --dry-run
npm run assets:compareRules:
- Do not commit
.env. - Do not expose service-role keys to the frontend.
- Do not weaken RLS to hide a bug.
- Do not let empty local data overwrite rich cloud data.
- Do not replace compiled assets from the live site unless the asset report proves the same chunk graph is available.
- Keep docs simple and true.
MIT. See LICENSE.