Reorganize repo: oss/ + commercial/ + shared docs/
- oss/ — open source (app, cli, crypto, Makefile) → published to GitHub - commercial/ — proprietary (account, mgmt sidecar, website, marketing, tailscale) → Zürich only - docs/ — shared design documentation, visible to both - Move L2_AGENT_ENCRYPTION.md to docs/ - Update CLAUDE.md paths to reflect new structure Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
@ -6,5 +6,5 @@ vault1984
|
|||
*.env
|
||||
*.key
|
||||
*.pem
|
||||
app/backups/
|
||||
website/vault1984-web
|
||||
oss/app/backups/
|
||||
commercial/website/vault1984-web
|
||||
|
|
|
|||
36
CLAUDE.md
|
|
@ -13,19 +13,27 @@ Johan is the architect. You are the collaborator. Same principles as inou:
|
|||
5. **No unsolicited files.** No new docs, tests, or helpers unless explicitly asked.
|
||||
6. **Mention concerns once, then execute.** Johan has reasons. Respect them.
|
||||
|
||||
## Architecture
|
||||
## Repository Structure
|
||||
|
||||
```
|
||||
app/ — vault1984 server (Go, FIPS 140-3)
|
||||
cli/ — v1984 CLI client
|
||||
crypto/ — crypto primitives (BoringCrypto)
|
||||
website/ — vault1984.com marketing site
|
||||
docs/ — design documentation
|
||||
docs/ — all design documentation (shared across OSS + commercial)
|
||||
oss/ — open source, published to GitHub
|
||||
app/ — vault1984 server (Go, FIPS 140-3)
|
||||
cli/ — v1984 CLI client
|
||||
crypto/ — crypto primitives (BoringCrypto)
|
||||
Makefile — build system
|
||||
commercial/ — proprietary, Zürich only, never on GitHub
|
||||
account/ — account system (billing, vault credits)
|
||||
mgmt/ — POP management sidecar
|
||||
website/ — vault1984.com (marketing + account management)
|
||||
marketing/ — marketing assets
|
||||
tailscale/ — ACL config
|
||||
```
|
||||
|
||||
**Build:** Always use `GOEXPERIMENT=boringcrypto` (set in Makefile). Required for FIPS 140-3.
|
||||
|
||||
```bash
|
||||
cd oss/
|
||||
make deploy # build + test + restart everything
|
||||
make deploy-app # app only
|
||||
make deploy-web # website only
|
||||
|
|
@ -60,7 +68,7 @@ make status # check what's running
|
|||
|
||||
## Data Access Architecture
|
||||
|
||||
All DB operations go through named functions in `app/lib/dbcore.go`. **No direct SQL outside dbcore.go.**
|
||||
All DB operations go through named functions in `oss/app/lib/dbcore.go`. **No direct SQL outside dbcore.go.**
|
||||
|
||||
Choke points:
|
||||
- `EntryCreate/Get/Update/Delete/List/Search` — all credential entry operations
|
||||
|
|
@ -94,15 +102,15 @@ Choke points:
|
|||
- `isUnlocked()` checks sessionStorage — if false, user is logged out
|
||||
|
||||
**Shared JS (crypto/ directory):**
|
||||
- `crypto/crypto.js` and `crypto/totp.js` are the source of truth
|
||||
- Makefile copies them to `app/cmd/vault1984/web/` before building
|
||||
- NEVER edit the copies in `web/` directly — edit `crypto/` and rebuild
|
||||
- `oss/crypto/crypto.js` and `oss/crypto/totp.js` are the source of truth
|
||||
- Makefile copies them to `oss/app/cmd/vault1984/web/` before building
|
||||
- NEVER edit the copies in `web/` directly — edit `oss/crypto/` and rebuild
|
||||
- CLI (QuickJS) and browser (Web Crypto) use the same code
|
||||
|
||||
## Key Files
|
||||
|
||||
- `L2_AGENT_ENCRYPTION.md` — WebAuthn L2 encryption spec (SUPERSEDED by truncation model)
|
||||
- `docs/L2_AGENT_ENCRYPTION.md` — WebAuthn L2 encryption spec (SUPERSEDED by truncation model)
|
||||
- `docs/` — architecture docs
|
||||
- `app/cmd/vault1984` — main entry point
|
||||
- `crypto/` — shared JS crypto (source of truth for CLI + browser)
|
||||
- `cli/` — vault1984-cli (C + QuickJS + BearSSL)
|
||||
- `oss/app/cmd/vault1984` — main entry point
|
||||
- `oss/crypto/` — shared JS crypto (source of truth for CLI + browser)
|
||||
- `oss/cli/` — vault1984-cli (C + QuickJS + BearSSL)
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 257 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 277 KiB After Width: | Height: | Size: 277 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 272 KiB After Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 250 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 313 KiB After Width: | Height: | Size: 313 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 288 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 288 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 315 KiB After Width: | Height: | Size: 315 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 289 KiB After Width: | Height: | Size: 289 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 275 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 292 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 301 KiB After Width: | Height: | Size: 301 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 248 KiB After Width: | Height: | Size: 248 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 916 KiB After Width: | Height: | Size: 916 KiB |
|
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 247 KiB |
|
Before Width: | Height: | Size: 916 KiB After Width: | Height: | Size: 916 KiB |
|
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 292 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 248 KiB After Width: | Height: | Size: 248 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 335 KiB After Width: | Height: | Size: 335 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 381 KiB After Width: | Height: | Size: 381 KiB |
|
Before Width: | Height: | Size: 273 KiB After Width: | Height: | Size: 273 KiB |
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 285 KiB |
|
Before Width: | Height: | Size: 996 KiB After Width: | Height: | Size: 996 KiB |
|
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 295 KiB |
|
Before Width: | Height: | Size: 1006 KiB After Width: | Height: | Size: 1006 KiB |
|
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 118 B After Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 87 B After Width: | Height: | Size: 87 B |
|
Before Width: | Height: | Size: 100 B After Width: | Height: | Size: 100 B |