Encryption Architecture
XChaCha20-Poly1305 implementation, key derivation, zero-knowledge architecture details Read more →
Stack: Go 1.23 backend (Fiber), React 18 frontend (TypeScript, Vite), PostgreSQL 15, Redis 7
Encryption: XChaCha20-Poly1305 (client-side E2EE), Argon2id (64MB, 3 iterations, 4 parallelism)
Zero-Knowledge: Server stores encrypted blobs only, no plaintext access to user data
Encryption Architecture
XChaCha20-Poly1305 implementation, key derivation, zero-knowledge architecture details Read more →
API Reference
REST API endpoints, WebSocket protocol, request/response schemas, authentication flow Read more →
Database Schema
PostgreSQL tables, indexes, triggers, encryption columns, relationships Read more →
Environment Variables
Complete configuration reference, security settings, deployment parameters Read more →
# Clone repositorygit clone https://github.com/RelativeSure/LeafLockcd LeafLock
# Start with Docker Composedocker compose up -d
# Or with Podmanmake up
# Access applicationopen http://localhost:3000Default admin: admin@leaflock.app / Configure via DEFAULT_ADMIN_PASSWORD
docker-compose.yml with PostgreSQL, Redis, backend, frontendhelm/leaflock/Backend (backend/):
main.go - HTTP server, routeshandlers/ - API endpointscrypto/ - Argon2id password hashingdatabase/ - PostgreSQL schema, migrationsmiddleware/ - JWT validation, CORS, rate limitingFrontend (frontend/src/):
App.tsx - CryptoService (libsodium encryption)components/ - React UI componentsservices/ - API clientsDatabase:
BYTEA (ChaCha20-Poly1305 or XChaCha20-Poly1305)BYTEA (SHA-256) or TEXT (Argon2id)Threat Model: Zero-knowledge protects against server compromise and database dumps. Does not protect against client-side XSS or phishing.
Recommendations: