How hmsmiraz/kesec works
Kesec is a self-hosted credential vault. The main workflow is account registration or login, followed by authenticated viewing and CRUD of vault entries; users can also generate, reveal, and copy passwords and search entries. The backend separates auth and secret API routes from shared security and persistence layers. The README documents encryption at rest and the UI capabilities; the secrets router and dashboard implementation were not excerpted, so those relationships are limited to documented behavior rather than inferred calls.
Main entry points: page.tsx Vault dashboard · main.py FastAPI application · auth.py Auth routes · secrets.py Secret routes
Components 18
Vault interface
- Login and register
frontend/app/login/page.tsx - Registration page
frontend/app/register/page.tsx - Session context
frontend/lib/auth.tsx - API client
frontend/lib/api.ts - Vault dashboard
frontend/app/dashboard/page.tsx - Credential card
frontend/components/SecretCard.tsx - Credential editor
frontend/components/SecretFormModal.tsx - Password tools
frontend/lib/generatePassword.ts
REST API
- FastAPI application
backend/app/main.py - Auth routes
backend/app/routers/auth.py - Secret routes
backend/app/routers/secrets.py
Security services
- Auth dependencies
backend/app/deps.py - Password and JWT security
backend/app/security.py - Credential encryption
backend/app/crypto.py - Runtime configuration
backend/app/config.py
Persistence
- User and vault models
backend/app/models.py - Database session
backend/app/database.py
Other components
- Vault user
Connections 25
- Vault user → Login and register: signs in
README.md - Vault user → Registration page: registers
README.md - Vault user → Vault dashboard: manages vault
README.md - Session context → API client: calls
frontend/lib/auth.tsx - Login and register → Session context: uses session
- Registration page → API client: registers through
- Vault dashboard → API client: uses CRUD
- Vault dashboard → Credential card: shows entries
- Vault dashboard → Credential editor: edits entries
- Vault dashboard → Password tools: generates passwords
- API client → FastAPI application: sends REST requests
README.md - FastAPI application → Auth routes: registers router
backend/app/main.py - FastAPI application → Secret routes: registers router
backend/app/main.py - Auth routes → Auth dependencies: uses dependencies
backend/app/routers/auth.py - Auth routes → Password and JWT security: hashes and signs
backend/app/routers/auth.py - Auth routes → User and vault models: queries and stores
backend/app/routers/auth.py - Secret routes → Auth dependencies: authenticates requests
- Secret routes → Credential encryption: encrypts credentials
- Secret routes → User and vault models: persists entries
- Auth dependencies → Password and JWT security: validates tokens
backend/app/deps.py - Auth dependencies → User and vault models: loads sessions and users
backend/app/deps.py - User and vault models → Database session: uses ORM base
backend/app/models.py - FastAPI application → Database session: creates tables
backend/app/main.py - Password and JWT security → Runtime configuration: reads settings
backend/app/security.py - Credential encryption → Runtime configuration: reads key settings
backend/app/crypto.py