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>
This commit is contained in:
James 2026-03-20 03:02:04 -04:00
parent d5393fd12e
commit 9694a30f6c
441 changed files with 24 additions and 16 deletions

4
.gitignore vendored
View File

@ -6,5 +6,5 @@ vault1984
*.env *.env
*.key *.key
*.pem *.pem
app/backups/ oss/app/backups/
website/vault1984-web commercial/website/vault1984-web

View File

@ -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. 5. **No unsolicited files.** No new docs, tests, or helpers unless explicitly asked.
6. **Mention concerns once, then execute.** Johan has reasons. Respect them. 6. **Mention concerns once, then execute.** Johan has reasons. Respect them.
## Architecture ## Repository Structure
``` ```
app/ — vault1984 server (Go, FIPS 140-3) docs/ — all design documentation (shared across OSS + commercial)
cli/ — v1984 CLI client oss/ — open source, published to GitHub
crypto/ — crypto primitives (BoringCrypto) app/ — vault1984 server (Go, FIPS 140-3)
website/ — vault1984.com marketing site cli/ — v1984 CLI client
docs/ — design documentation 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. **Build:** Always use `GOEXPERIMENT=boringcrypto` (set in Makefile). Required for FIPS 140-3.
```bash ```bash
cd oss/
make deploy # build + test + restart everything make deploy # build + test + restart everything
make deploy-app # app only make deploy-app # app only
make deploy-web # website only make deploy-web # website only
@ -60,7 +68,7 @@ make status # check what's running
## Data Access Architecture ## 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: Choke points:
- `EntryCreate/Get/Update/Delete/List/Search` — all credential entry operations - `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 - `isUnlocked()` checks sessionStorage — if false, user is logged out
**Shared JS (crypto/ directory):** **Shared JS (crypto/ directory):**
- `crypto/crypto.js` and `crypto/totp.js` are the source of truth - `oss/crypto/crypto.js` and `oss/crypto/totp.js` are the source of truth
- Makefile copies them to `app/cmd/vault1984/web/` before building - Makefile copies them to `oss/app/cmd/vault1984/web/` before building
- NEVER edit the copies in `web/` directly — edit `crypto/` and rebuild - NEVER edit the copies in `web/` directly — edit `oss/crypto/` and rebuild
- CLI (QuickJS) and browser (Web Crypto) use the same code - CLI (QuickJS) and browser (Web Crypto) use the same code
## Key Files ## 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 - `docs/` — architecture docs
- `app/cmd/vault1984` — main entry point - `oss/app/cmd/vault1984` — main entry point
- `crypto/` — shared JS crypto (source of truth for CLI + browser) - `oss/crypto/` — shared JS crypto (source of truth for CLI + browser)
- `cli/` — vault1984-cli (C + QuickJS + BearSSL) - `oss/cli/` — vault1984-cli (C + QuickJS + BearSSL)

View File

View File

Before

Width:  |  Height:  |  Size: 257 KiB

After

Width:  |  Height:  |  Size: 257 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 277 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 272 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 250 KiB

After

Width:  |  Height:  |  Size: 250 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 313 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 252 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 288 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 246 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 288 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 315 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 302 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 289 KiB

After

Width:  |  Height:  |  Size: 289 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 252 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 275 KiB

After

Width:  |  Height:  |  Size: 275 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 249 KiB

After

Width:  |  Height:  |  Size: 249 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 292 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 301 KiB

After

Width:  |  Height:  |  Size: 301 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 248 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 244 KiB

View File

Before

Width:  |  Height:  |  Size: 916 KiB

After

Width:  |  Height:  |  Size: 916 KiB

View File

Before

Width:  |  Height:  |  Size: 247 KiB

After

Width:  |  Height:  |  Size: 247 KiB

View File

Before

Width:  |  Height:  |  Size: 916 KiB

After

Width:  |  Height:  |  Size: 916 KiB

View File

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 292 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 248 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 335 KiB

After

Width:  |  Height:  |  Size: 335 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 381 KiB

After

Width:  |  Height:  |  Size: 381 KiB

View File

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 273 KiB

View File

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 285 KiB

View File

Before

Width:  |  Height:  |  Size: 996 KiB

After

Width:  |  Height:  |  Size: 996 KiB

View File

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 295 KiB

View File

Before

Width:  |  Height:  |  Size: 1006 KiB

After

Width:  |  Height:  |  Size: 1006 KiB

0
commercial/mgmt/.gitkeep Normal file
View File

View File

View File

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 355 B

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 118 B

View File

Before

Width:  |  Height:  |  Size: 87 B

After

Width:  |  Height:  |  Size: 87 B

View File

Before

Width:  |  Height:  |  Size: 100 B

After

Width:  |  Height:  |  Size: 100 B

Some files were not shown because too many files have changed in this diff Show More