diff --git a/.notes/note-1768974247220-lblqt44tj.json b/.notes/note-1768974247220-lblqt44tj.json new file mode 100644 index 0000000..6a95d65 --- /dev/null +++ b/.notes/note-1768974247220-lblqt44tj.json @@ -0,0 +1,8 @@ +{ + "id": "note-1768974247220-lblqt44tj", + "title": "Server-Vault", + "content": "Vault Plugin Architecture Summary\n\n In gitcaddy-vault (plugin):\n\n | Component | Location | Purpose |\n |-----------------|-----------------------------|--------------------------------------------------------------------------------|\n | Routes/Handlers | routes/routes.go | Web UI and API endpoint handlers |\n | Services | services/*.go | Business logic (encryption, CRUD operations) |\n | Models | models/*.go | Database models (VaultSecret, VaultToken, VaultAuditEntry, VaultSecretVersion) |\n | Templates | templates/repo/vault/*.tmpl | HTML templates for web UI |\n | Locale | locale/*.ini, *.json | Translations |\n | Crypto | crypto/crypto.go | Encryption/decryption logic |\n | License | license/license.go | License validation |\n | Plugin Entry | plugin.go | Plugin registration, init |\n\n In gitcaddy-server (server):\n\n | Component | Location | Purpose |\n |------------------------|-------------------------|--------------------------------------------------------------------------------------------------------|\n | Plugin Interface Types | services/vault/vault.go | Shared types that plugin returns (e.g., Token, SecretVersion structs used in plugin service interface) |\n | Plugin Loading | Server's plugin system | Loads and registers the vault plugin |\n | Template Embedding | Build process | Vault templates get compiled into server binary |\n\n Key Rule:\n\n - Plugin defines behavior → vault plugin\n - Shared interface types that cross the plugin boundary → server's services/vault/\n\n Example:\n\n When you added CreatedUnix and UsedCount to Token:\n - The field definitions went in server/services/vault/vault.go (interface type)\n - The code that populates them went in vault/plugin_service.go (plugin implementation)", + "createdAt": 1768974247217, + "updatedAt": 1768974284744, + "tags": [] +} \ No newline at end of file