This is a stripped-down version of SafeMonk containing only the core functionality needed to verify the client-side encryption and zero-knowledge architecture.
src/lib/crypto.ts- The heart of client-side encryption/decryptionsrc/lib/supabase.ts- Database connection and encrypted data storagesrc/lib/rateLimit.ts- Server-side security controls
src/app/page.tsx- Secret creation interfacesrc/app/f/[id]/page.tsx- File reveal pagesrc/app/n/[id]/page.tsx- Note reveal page
src/components/SecretCreatorForm.tsx- Demonstrates crypto.ts usagesrc/components/RevealFlow.tsx,RevealFile.tsx,RevealNote.tsx- Secret decryption flowsrc/components/ui/- Essential UI components
src/app/api/- Complete API showing server only handles encrypted data
database/- Complete schema including atomic burn-after-read functions
-
Install dependencies:
npm install
-
Set up environment variables (copy from
env.example) -
Run the development server:
npm run dev
- Client-side encryption: Check
src/lib/crypto.tsfor all encryption logic - Server blindness: Review
src/app/api/routes - server never sees plaintext - Database storage: Examine
database/schema.sqlfor encrypted data structure - Zero-knowledge: Follow data flow from form → encryption → API → database
This minimal build proves the core security claims while removing all non-essential features, documentation, and marketing content.