Important
THIS PROJECT IS A PRODUCT OF VIBE CODING AND TESTING AI/LLMS.
LeafLock is a privacy-first notes application with end-to-end encryption, real-time collaboration, and a Go backend. Everything can be self-hosted and kept under your control.
- Modern Authentication: Pure Clerk authentication with social logins, MFA, and enterprise features
- End-to-end encryption handled on the client
- Zero-knowledge architecture for the backend
- Real-time collaboration with WebSockets
- Rich text editor with Markdown and code blocks
- Offline support with automatic sync when connectivity returns
- Docker or Podman with Compose support
- Linux, macOS, or Windows with WSL2
- At least 2GB RAM (4GB recommended)
- Go toolchain (if you develop the backend)
- Node.js 18+ and pnpm 10 (if you develop the frontend)
-
Clone the repository:
git clone https://github.com/RelativeSure/LeafLock.git cd LeafLock -
(Optional) Override defaults:
cp .env.example .env # tweak anything you want and docker compose will pick it up automatically -
Start the full stack:
docker compose up --build
- Frontend UI: http://localhost:3000
- Backend API: http://localhost:8080
- API health check: http://localhost:8080/api/v1/health
- Built assets are rebuilt automatically each time you rerun with
--build
-
Stop everything when finished:
docker compose down
-
Set up Clerk Authentication:
- Get your Clerk keys from Clerk Dashboard
- Add to your
.envfile:VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_key_here CLERK_PUBLISHABLE_KEY=pk_test_your_key_here CLERK_SECRET_KEY=sk_test_your_key_here
- Visit
/loginto access Clerk's authentication components - Create your first account or sign in
Note: Clerk handles all authentication - no default admin account is created.
backend/: Go service, tests, and supporting Make targetsfrontend/: Vite + React app managed with pnpmdocs/: User and operator documentationhelm/: Helm charts for Kubernetes deploymentsscripts/: Local tooling, including git hook setup
- Format and lint:
make -C backend fmtandmake -C backend vet - Run tests:
make -C backend test - Coverage check:
make -C backend test-coverage-check
-
Install dependencies with pnpm:
cd frontend corepack use pnpm@10 pnpm install -
Start the dev server:
pnpm dev
-
Run the test suite:
pnpm test
Return to the repository root before using make targets again: cd ...
- Install git hooks once per machine:
pre-commit install - Build container images locally:
make build
- Run
docker compose up --build(ormake up) for local deployments - Helm charts under
helm/support Kubernetes clusters
- docs/ADMIN.md: operational guide for provisioning, upgrades, and backups
- docs/admin-panel.md: UI walkthrough for administrators
- docs/rbac.md and docs/rate-limiting.md: security controls and traffic management
- docs/swagger.md: OpenAPI generation and API reference pointers
- docs/SCRIPTS.md: utility scripts used by automation and CI tasks
- Inspect logs for all services:
make logs - Check backend health:
curl http://localhost:8080/api/v1/health - Recreate containers if needed: run
make downfollowed bydocker compose build --no-cacheorpodman compose build --no-cache
We welcome contributions of any size. Review CONTRIBUTING.md and run the provided checks before opening a pull request. Discussions and issues are tracked in GitHub.
LeafLock is released under the PolyForm Noncommercial License 1.0.0. See LICENSE for details.