Thank you for taking the time to contribute! This guide covers everything you need to make a great pull request.
# 1. Fork the repo, then clone your fork
git clone https://github.com/YOUR_USERNAME/isotope-code.git
cd isotope-code
# 2. Set up the app
bash setup.sh
# 3. Create a feature/fix branch
git checkout -b fix/your-description # for bug fixes
git checkout -b feat/your-feature # for new features
git checkout -b docs/update-readme # for documentation- Never commit
.envor any secret β API keys, service-role keys, tokens, passwords - Never weaken RLS policies to make UI pass β fix the query or the policy logic instead
- Never fake sync success β "Synced β" means the Supabase row actually changed
- Update
isotope-complete.sqlif you add/change any DB table, column, index, RLS, trigger, or function - Test sync end-to-end: browser action β Supabase row/storage β clear browser cache β login again β data restores
| File/Dir | What it is |
|---|---|
server.mjs |
Main Node.js server β all routes and Supabase proxying |
isotope-complete.sql |
Authoritative DB schema β idempotent, run on fresh Supabase |
public/assets/ |
Compiled React frontend β do not edit these files directly |
public/sw.js |
Service worker β PWA caching |
public/update-checker.js |
In-app update banner |
bin/isotope |
Linux/macOS/Termux CLI |
bin/isotope.bat |
Windows CLI |
CHANGELOG.md |
All notable changes β update this with your PR |
If your change touches the database:
- Write the change in
isotope-complete.sqlusingCREATE OR REPLACE/IF NOT EXISTSguards - Also update any relevant
DROP POLICY IF EXISTS/CREATE POLICYblocks - Test it by running
isotope-complete.sqlon a clean Supabase project - Mention the schema change in your PR description
Before marking your PR ready, verify:
β‘ browser action
β‘ β Supabase row/storage actually changed (check Supabase Table Editor)
β‘ β clear localStorage + IndexedDB (DevTools β Application β Storage β Clear)
β‘ β log in again
β‘ β data restored correctly from Supabase
When you open a PR, the template auto-fills. Fill every section β incomplete PRs may be closed.
Use the Bug Report template.
Include:
- OS + Node.js version
- Steps to reproduce (exact commands)
- Expected vs actual behaviour
- Relevant server logs (
isotope logs) - Whether
isotope doctorpasses
Use the Feature Request template.
- Use
const/let, nevervar - No
console.login server code β usereq.login routes - Keep route handlers under 60 lines; extract helpers
- SQL: uppercase keywords, snake_case identifiers,
SECURITY DEFINERon all functions
Every bug fix, feature, and doc improvement helps thousands of students study better.
If you found IsotopeAI useful, please β the repo and share it!