This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Anchored (formerly URL Notes) is a browser extension and web app for domain/URL-specific note-taking with zero-knowledge encryption. The project features a glassmorphism ocean-themed UI, local-first architecture with cloud sync, and a $2.50/month premium tier.
supabase start # Start local Supabase
supabase db push # Deploy schema changes
supabase db reset # Reset local database
supabase gen types typescript --local > types/database.ts
supabase functions deploy # Deploy all Edge Functions
supabase functions serve # Local development
supabase functions logs <name> # View production logs
# Load /extension/ folder in chrome://extensions/ → "Load unpacked"
# No build system - code runs directly in browser
npm run cache:bust # Update cache version
npm run cache:deploy # Deploy with cache bust
npm run cache:deploy:commit # Deploy and commit
/extension/ folder onlywindow.ModuleName = {}, no ES6 modulesgithub.com) for site-wide notesgithub.com/user/repo) for page-specific notesUser Action → popup.js → Module → storage.js → IndexedDB
↓
Background: sync.js → api.js → Supabase (encrypted)
/extension/lib/)All UI components must use ocean-themed glassmorphism:
backdrop-filter: blur(10px);
background: rgba(255,255,255,0.1);
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
border: 1px solid rgba(255,255,255,0.2);
#1B4F72, #2E86AB (depth and stability)#A8DADC, #457B9D (highlights)Located in .kiro/specs/premium-features/:
[[Note Title]] linksAll premium features must:
/extension-firefox//extension-edge/Use browser.* APIs instead of chrome.* where possible for cross-browser compatibility:
// Good
const tabs = await browser.tabs.query({ active: true });
// Avoid (Chrome-specific)
const tabs = await chrome.tabs.query({ active: true });
// Encrypt before cloud storage
const encrypted = await window.noteEncryption.encryptData(data, userKey);
// Decrypt after retrieval
const decrypted = await window.noteEncryption.decryptData(encrypted, userKey);
window.ModuleName pattern/extension/: All extension code goes here/supabase/migrations//supabase/functions/supabase db pushsupabase functions deploy/extension/ # Browser extension (Manifest V3)
/popup/ # Popup UI and modules
popup.js # Main orchestrator
/modules/ # Feature modules (notes, editor, settings)
/css/ # Glassmorphism styles
/lib/ # Pure functions, no DOM dependencies
storage.js # IndexedDB wrapper
sync.js # Supabase sync
encryption.js # AES-256-GCM encryption
api.js # Supabase client
manifest.json # Extension configuration
/supabase/ # Backend infrastructure
/migrations/ # Database schema (add new only)
/functions/ # TypeScript Edge Functions
/docs/ # Documentation
/.kiro/ # Amazon Kiro steering files
/steering/ # Product, structure, tech guidelines
/specs/ # Feature requirements and design