How b-acharekar/trustvault works
TrustVault Phase 1 is an Android authentication client backed by a FastAPI gateway and auth service with MongoDB persistence. The main user flow is register or log in, retain the issued token securely, restore the session through /auth/me, and reach the dashboard or log out. The backend also exposes password-reset and account-deletion operations. The README marks file, sharing, activity, blockchain, storage, and detection capabilities as reserved; their implementation relationships are not evidenced here. Arrows cite shown calls or README statements; unsampled areas are left unconnected.
Main entry points: auth_service/main.py Auth routes · service.py Auth operations · AuthRepository.kt Auth repository · gateway/main.py HTTP proxy
Components 21
Android client
- Auth and dashboard
android-app/app/src/main/java/com/trustvault/MainActivity.kt - Auth state
android-app/app/src/main/java/com/trustvault/ui/auth/AuthViewModel.kt - Auth repository
android-app/app/src/main/java/com/trustvault/data/repository/AuthRepository.kt - Auth API client
android-app/app/src/main/java/com/trustvault/data/api/AuthApi.kt - Secure token store
android-app/app/src/main/java/com/trustvault/data/local/TokenStore.kt
API gateway
- HTTP proxy
backend/gateway/main.py
Authentication service
- Auth routes
backend/auth_service/main.py - Auth operations
backend/auth_service/service.py - Request and response schemas
backend/auth_service/schemas.py - Auth settings
backend/auth_service/config.py - API error handling
backend/common/errors.py - Auth event logging
backend/common/logging.py
Identity storage
- User repository
backend/auth_service/repository.py - MongoDB users
Reserved capabilities
- File service
backend/file-service - Sharing service
backend/sharing-service - Activity service
backend/activity-service - Blockchain verification
blockchain - File storage
storage - Suspicious activity detection
detection
Other components
- User
Connections 18
- User → Auth and dashboard: uses
README.md - Auth and dashboard → Auth state: invokes
android-app/app/src/main/java/com/trustvault/MainActivity.kt - Auth state → Auth repository: calls
android-app/app/src/main/java/com/trustvault/ui/auth/AuthViewModel.kt - Auth repository → Auth API client: calls
android-app/app/src/main/java/com/trustvault/data/repository/AuthRepository.kt - Auth repository → Secure token store: reads and writes
android-app/app/src/main/java/com/trustvault/data/repository/AuthRepository.kt - Auth API client → HTTP proxy: sends auth requests
README.md - HTTP proxy → Auth routes: proxies auth routes
backend/gateway/main.py - Auth routes → Auth operations: dispatches
backend/auth_service/main.py - Auth routes → Request and response schemas: validates and shapes
backend/auth_service/main.py - Auth routes → User repository: initializes
backend/auth_service/main.py - Auth routes → MongoDB users: connects to
backend/auth_service/main.py - Auth routes → API error handling: installs handlers
backend/auth_service/main.py - HTTP proxy → API error handling: installs handlers
backend/gateway/main.py - Auth operations → User repository: calls
backend/auth_service/service.py - Auth operations → Request and response schemas: returns user schema
backend/auth_service/service.py - Auth operations → Auth event logging: records events
backend/auth_service/service.py - User repository → MongoDB users: reads and writes
backend/auth_service/repository.py - Auth routes → Auth settings: loads configuration
backend/auth_service/main.py