How anup7-star/evault works
EVault is a wallet-authenticated secrets vault with administrator and member portals: administrators create encrypted vaults and grant expiring access; members sign in with SIWE and request authorized secrets. The tree and excerpts show a Next.js frontend, an Express/JSON-file backend, and a Rust/Postgres backend scaffold, while the README describes a co-located Next.js API. The Rust vault service is explicitly TODO, so its intended workflow is not drawn as implemented; no contract source is present in the tree.
Main entry points: page.tsx Admin console · apiClient.ts API client · server.js Vault and auth API · vaults.rs Rust API routes
Components 17
Web portals
- Admin console
app/admin/page.tsx - Member portal
app/user/page.tsx - Session state
components/SessionContext.tsx - API client
lib/apiClient.ts - Contract calls
lib/contract.ts
Express backend
- Vault and auth API
server.js - JSON vault store
server.js - Secret encryption
server.js
Rust backend
- Rust API routes
backend/src/api/vaults.rs - SIWE and sessions
backend/src/api/auth.rs - Contract client
backend/src/blockchain/contract_client.rs - Secret repository
backend/src/vault/repository.rs - Postgres
- Audit logging
backend/src/audit/mod.rs - Rust server setup
backend/src/main.rs
Other components
- Wallet signer
- Access contract
Connections 20
- Admin console → Wallet signer: signs messages
- Admin console → Contract calls: registers vaults
- Admin console → Contract calls: grants access
- Contract calls → Access contract: submits transactions
- Admin console → API client: syncs grants
- Member portal → Wallet signer: signs in
- Member portal → API client: requests secrets
- Admin console → API client: requests authentication
- API client → Vault and auth API: sends API requests
- Vault and auth API → JSON vault store: reads and writes
- Vault and auth API → Secret encryption: encrypts and decrypts
- API client → Session state: stores verified session
- Rust server setup → SIWE and sessions: mounts routes
- Rust server setup → Rust API routes: mounts routes
- SIWE and sessions → Postgres: stores nonces and sessions
- SIWE and sessions → Audit logging: records auth outcomes
- Rust API routes → Contract client: checks chain permissions
- Rust API routes → Secret repository: reads and stores secrets
- Secret repository → Postgres: reads and writes ciphertext
- Contract client → Access contract: queries permissions