Skip to content
initializeSecurity() runs from main.tsx.
- Providers are created in
App.tsx.
- Router renders
SelfHostedDashboard for /.
hasCustomSupabaseCredentials() checks local storage.
- If missing, the database configuration UI is shown.
- Credentials are tested and then persisted to local storage.
- Supabase client is refreshed with new credentials.
PassphraseGate checks whether user is first-time (vault_config exists or not).
- First-time: creates vault (
raw_dek + bcrypt_hash).
- Existing user: verifies passphrase via bcrypt for new format or unwraps legacy DEK.
- On unlock, dashboard interactions can encrypt/decrypt secrets.
- Add/edit modal captures metadata and secret fields.
- Secret fields are encrypted via
useEncryption().encryptCredential().
- Row is inserted/updated in
credentials with secret_blob and encrypted_at.
- Edit flow can decrypt
secret_blob via useEncryption().decryptCredential() to prefill fields.
- The current detail modal still renders legacy plaintext fields (
password, api_key, etc.) and does not yet decrypt secret_blob for display.
- Vault auto-lock timeout defaults to 15 minutes.
- Timer resets on vault activity.
- Lock clears in-memory key references and returns app to locked state.