How darshanredkar11/visita works
VisitorPass is an offline-capable visitor-management platform spanning a Rust/Axum backend, web client, and Android/Kotlin Multiplatform app. Residents or admins authenticate, register or join an organization, and create signed visitor passes; guards verify QR passes on-device without a network round trip. Local entry events sync later, while the server handles organization, device, pass, and entry workflows. The graph reflects documented product capabilities, but many handler and infrastructure links are based on the README because their implementations were not sampled.
Main entry points: use_cases Pass and org use cases · router.rs Axum API · MainActivity.kt Android app · sync.rs Entry and sync endpoints
Components 25
Client applications
- Web app
web/src/App.tsx - Android app
mobile/androidApp/src/main/java/app/visitorpass/MainActivity.kt - Mobile navigation
mobile/shared/src/commonMain/kotlin/app/visitorpass/ui/RootNavigation.kt - Offline pass verification
mobile/shared/src/commonMain/kotlin/app/visitorpass/crypto/PassVerification.kt - Platform crypto
mobile/shared/src/commonMain/kotlin/app/visitorpass/crypto/CryptoService.kt - Local cache
mobile/shared/src/commonMain/kotlin/app/visitorpass/db/DatabaseHelper.kt - Mobile sync
mobile/shared/src/commonMain/kotlin/app/visitorpass/sync/SyncEngine.kt - Mobile HTTP client
mobile/shared/src/commonMain/kotlin/app/visitorpass/net/KtorClient.kt
HTTP API
- Axum API
crates/api/src/router.rs - Authentication
crates/api/src/handlers/auth.rs - Google authentication
crates/api/src/handlers/google_auth.rs - Pass endpoints
crates/api/src/handlers/passes.rs - Entry and sync endpoints
crates/api/src/handlers/sync.rs - Organization endpoints
crates/api/src/handlers/organizations.rs
Application and domain
- Pass and org use cases
crates/application/src/use_cases - Application ports
crates/application/src/ports/repositories.rs - Domain model
crates/domain/src/entities/visitor_pass.rs
Infrastructure
- Postgres repositories
crates/infrastructure/src/db/postgres - Backend crypto
crates/infrastructure/src/crypto/service.rs - Organization key provider
crates/infrastructure/src/key_provider/env_key_provider.rs - Pass sharing
crates/infrastructure/src/share
Other components
- Resident or admin
- Gate guard
- Google identity service
- Entry events
Connections 31
- Resident or admin → Web app: uses
README.md - Resident or admin → Android app: uses
README.md - Gate guard → Android app: scans passes
README.md - Web app → Axum API: calls
- Android app → Mobile navigation: renders
mobile/androidApp/src/main/java/app/visitorpass/MainActivity.kt - Android app → Platform crypto: sets provider
mobile/androidApp/src/main/java/app/visitorpass/MainActivity.kt - Android app → Local cache: initializes
mobile/androidApp/src/main/java/app/visitorpass/MainActivity.kt - Android app → Mobile HTTP client: initializes
mobile/androidApp/src/main/java/app/visitorpass/MainActivity.kt - Mobile navigation → Offline pass verification: verifies locally
- Offline pass verification → Platform crypto: checks signature
- Mobile sync → Local cache: reads and writes
mobile/shared/src/commonMain/kotlin/app/visitorpass/sync/SyncEngine.kt - Mobile sync → Mobile HTTP client: sends sync
mobile/shared/src/commonMain/kotlin/app/visitorpass/sync/SyncEngine.kt - Mobile HTTP client → Axum API: calls endpoints
mobile/shared/src/commonMain/kotlin/app/visitorpass/net/KtorClient.kt - Axum API → Authentication: routes auth
crates/api/src/router.rs - Axum API → Google authentication: routes Google auth
crates/api/src/router.rs - Axum API → Pass endpoints: routes passes
crates/api/src/router.rs - Axum API → Entry and sync endpoints: routes sync
crates/api/src/router.rs - Axum API → Organization endpoints: routes organizations
crates/api/src/router.rs - Google authentication → Google identity service: fetches signing keys
crates/api/src/handlers/google_auth.rs - Pass endpoints → Pass and org use cases: invokes
- Entry and sync endpoints → Pass and org use cases: invokes sync
- Organization endpoints → Pass and org use cases: invokes
- Pass and org use cases → Application ports: uses contracts
- Pass and org use cases → Domain model: applies rules
- Application ports → Postgres repositories: implemented by
- Pass and org use cases → Backend crypto: signs and verifies
- Pass and org use cases → Organization key provider: obtains keys
- Pass and org use cases → Pass sharing: shares passes
- Entry and sync endpoints → Entry events: syncs events
- Pass and org use cases → Entry events: records entries
README.md - Pass and org use cases → Android app: issues signed passes
README.md