# vikas00413/loginflowdesign architecture

> Architecture diagram of the GitHub repository vikas00413/loginflowdesign, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vikas00413/loginflowdesign
- Repository: https://github.com/vikas00413/loginflowdesign

## Overview

LoginFlowDesign is a modular Android authentication app. The user enters through app launch and splash/session initialization, then follows login or optional biometric unlock to profile and settings; login persists tokens and user/session data, while authenticated requests can refresh tokens. The README also documents social sign-in and a debug data viewer. Source excerpts contain only build configuration, so runtime relationships below rely on README statements and diagrams; unsampled implementation details are represented at their known module or directory paths.

Main entry points: [`core-auth/src/main/java/com/example/loginflow/core/auth/data/AuthRepository.kt`](https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/data/AuthRepository.kt) (Auth repository), [`app/src/main/java/com/example/loginflow/navigation/AppAuthNavigator.kt`](https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/navigation/AppAuthNavigator.kt) (Auth navigator), [`app/src/main/java/com/example/loginflow/social/SocialSignInHelper.kt`](https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/social/SocialSignInHelper.kt) (Social sign-in), [`core-network/src/main/java/com/example/loginflow/core/network/di/NetworkModule.kt`](https://github.com/vikas00413/loginflowdesign/blob/main/core-network/src/main/java/com/example/loginflow/core/network/di/NetworkModule.kt) (Retrofit and OkHttp)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["Android app<br/>[MainActivity.kt]"]
  node_splash["Launch routing<br/>[SplashViewModel.kt]"]
  node_navigator["Auth navigator"]
  node_social["Social sign-in"]
end

subgraph group_features["User features"]
  node_login["Login flow<br/>[LoginViewModel.kt]"]
  node_biometric["Biometric unlock"]
  node_profile["Profile management"]
  node_settings["Settings<br/>[SettingsScreen.kt]"]
  node_debug["Debug data viewer<br/>[DebugDataScreen.kt]"]
end

subgraph group_auth["Authentication core"]
  node_manager["Auth manager<br/>[AuthManager.kt]"]
  node_repository["Auth repository<br/>[AuthRepository.kt]"]
  node_api["Auth API<br/>[AuthApi.kt]"]
  node_tokens["Token manager<br/>[TokenManager.kt]"]
end

subgraph group_network["Network access"]
  node_network["Retrofit and OkHttp<br/>[NetworkModule.kt]"]
  node_interceptor["Auth interceptor<br/>[AuthInterceptor.kt]"]
  node_authenticator["Token authenticator"]
end

subgraph group_storage["Encrypted storage"]
  node_database[("Encrypted Room DB<br/>[AppDatabase.kt]")]
  node_daos["User and session DAOs<br/>[Daos.kt]"]
  node_prefs["Encrypted preferences"]
end

node_user(("User"))
node_google["Google SDK"]
node_facebook["Facebook SDK"]
node_remote["DummyJSON API"]

node_user -->|"opens"| node_app
node_app -->|"starts"| node_splash
node_splash -->|"initializes"| node_manager
node_splash -->|"routes"| node_navigator
node_navigator -->|"shows login"| node_login
node_navigator -->|"routes conditionally"| node_biometric
node_navigator -->|"routes"| node_profile
node_user -->|"submits credentials"| node_login
node_login -->|"authenticates"| node_manager
node_manager -->|"delegates to"| node_repository
node_repository -->|"calls"| node_api
node_api -->|"uses"| node_network
node_network -->|"sends requests"| node_remote
node_repository -->|"persists tokens"| node_tokens
node_repository -->|"stores user session"| node_database
node_database -->|"exposes"| node_daos
node_repository -->|"stores auth data"| node_prefs
node_network -->|"configures"| node_interceptor
node_network -->|"configures"| node_authenticator
node_interceptor -->|"reads token"| node_tokens
node_authenticator -->|"refreshes token"| node_remote
node_authenticator -->|"saves token"| node_tokens
node_user -->|"chooses provider"| node_social
node_social -.->|"authenticates with"| node_google
node_social -.->|"authenticates with"| node_facebook
node_social -->|"maps to demo login"| node_manager
node_user -->|"unlocks"| node_biometric
node_user -->|"views profile"| node_profile
node_profile -->|"opens"| node_settings
node_settings -->|"opens viewer"| node_debug
node_debug -->|"inspects"| node_database
node_debug -->|"inspects snapshot"| node_prefs

click node_app "https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/MainActivity.kt"
click node_splash "https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/presentation/SplashViewModel.kt"
click node_navigator "https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/navigation/AppAuthNavigator.kt"
click node_social "https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/social/SocialSignInHelper.kt"
click node_login "https://github.com/vikas00413/loginflowdesign/blob/main/feature-auth/src/main/java/com/example/loginflow/feature/auth/presentation/login/LoginViewModel.kt"
click node_biometric "https://github.com/vikas00413/loginflowdesign/blob/main/feature-auth/src/main/java/com/example/loginflow/feature/auth/presentation/biometric/BiometricViewModel.kt"
click node_profile "https://github.com/vikas00413/loginflowdesign/blob/main/feature-profile/src/main/java/com/example/loginflow/feature/profile/presentation/profile/ProfileViewModel.kt"
click node_settings "https://github.com/vikas00413/loginflowdesign/blob/main/feature-profile/src/main/java/com/example/loginflow/feature/profile/ui/SettingsScreen.kt"
click node_debug "https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/debug/DebugDataScreen.kt"
click node_manager "https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/AuthManager.kt"
click node_repository "https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/data/AuthRepository.kt"
click node_api "https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/api/AuthApi.kt"
click node_tokens "https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/security/TokenManager.kt"
click node_network "https://github.com/vikas00413/loginflowdesign/blob/main/core-network/src/main/java/com/example/loginflow/core/network/di/NetworkModule.kt"
click node_interceptor "https://github.com/vikas00413/loginflowdesign/blob/main/core-network/src/main/java/com/example/loginflow/core/network/interceptor/AuthInterceptor.kt"
click node_authenticator "https://github.com/vikas00413/loginflowdesign/blob/main/core-network/src/main/java/com/example/loginflow/core/network/authenticator/TokenAuthenticator.kt"
click node_database "https://github.com/vikas00413/loginflowdesign/blob/main/core-database/src/main/java/com/example/loginflow/core/database/AppDatabase.kt"
click node_daos "https://github.com/vikas00413/loginflowdesign/blob/main/core-database/src/main/java/com/example/loginflow/core/database/dao/Daos.kt"
click node_prefs "https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/data/AuthLocalDataSource.kt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_splash,node_navigator,node_social,node_user toneBlue
class node_login,node_biometric,node_profile,node_settings,node_debug toneAmber
class node_manager,node_repository,node_api,node_tokens,node_remote toneMint
class node_network,node_interceptor,node_authenticator toneRose
class node_database,node_daos,node_prefs,node_google,node_facebook toneIndigo
```

## Components

### App shell

- [Android app](https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/MainActivity.kt): `app/src/main/java/com/example/loginflow/MainActivity.kt`
- [Launch routing](https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/presentation/SplashViewModel.kt): `app/src/main/java/com/example/loginflow/presentation/SplashViewModel.kt`
- [Auth navigator](https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/navigation/AppAuthNavigator.kt): `app/src/main/java/com/example/loginflow/navigation/AppAuthNavigator.kt`
- [Social sign-in](https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/social/SocialSignInHelper.kt): `app/src/main/java/com/example/loginflow/social/SocialSignInHelper.kt`

### User features

- [Login flow](https://github.com/vikas00413/loginflowdesign/blob/main/feature-auth/src/main/java/com/example/loginflow/feature/auth/presentation/login/LoginViewModel.kt): `feature-auth/src/main/java/com/example/loginflow/feature/auth/presentation/login/LoginViewModel.kt`
- [Biometric unlock](https://github.com/vikas00413/loginflowdesign/blob/main/feature-auth/src/main/java/com/example/loginflow/feature/auth/presentation/biometric/BiometricViewModel.kt): `feature-auth/src/main/java/com/example/loginflow/feature/auth/presentation/biometric/BiometricViewModel.kt`
- [Profile management](https://github.com/vikas00413/loginflowdesign/blob/main/feature-profile/src/main/java/com/example/loginflow/feature/profile/presentation/profile/ProfileViewModel.kt): `feature-profile/src/main/java/com/example/loginflow/feature/profile/presentation/profile/ProfileViewModel.kt`
- [Settings](https://github.com/vikas00413/loginflowdesign/blob/main/feature-profile/src/main/java/com/example/loginflow/feature/profile/ui/SettingsScreen.kt): `feature-profile/src/main/java/com/example/loginflow/feature/profile/ui/SettingsScreen.kt`
- [Debug data viewer](https://github.com/vikas00413/loginflowdesign/blob/main/app/src/main/java/com/example/loginflow/debug/DebugDataScreen.kt): `app/src/main/java/com/example/loginflow/debug/DebugDataScreen.kt`

### Authentication core

- [Auth manager](https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/AuthManager.kt): `core-auth/src/main/java/com/example/loginflow/core/auth/AuthManager.kt`
- [Auth repository](https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/data/AuthRepository.kt): `core-auth/src/main/java/com/example/loginflow/core/auth/data/AuthRepository.kt`
- [Auth API](https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/api/AuthApi.kt): `core-auth/src/main/java/com/example/loginflow/core/auth/api/AuthApi.kt`
- [Token manager](https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/security/TokenManager.kt): `core-auth/src/main/java/com/example/loginflow/core/auth/security/TokenManager.kt`

### Network access

- [Retrofit and OkHttp](https://github.com/vikas00413/loginflowdesign/blob/main/core-network/src/main/java/com/example/loginflow/core/network/di/NetworkModule.kt): `core-network/src/main/java/com/example/loginflow/core/network/di/NetworkModule.kt`
- [Auth interceptor](https://github.com/vikas00413/loginflowdesign/blob/main/core-network/src/main/java/com/example/loginflow/core/network/interceptor/AuthInterceptor.kt): `core-network/src/main/java/com/example/loginflow/core/network/interceptor/AuthInterceptor.kt`
- [Token authenticator](https://github.com/vikas00413/loginflowdesign/blob/main/core-network/src/main/java/com/example/loginflow/core/network/authenticator/TokenAuthenticator.kt): `core-network/src/main/java/com/example/loginflow/core/network/authenticator/TokenAuthenticator.kt`

### Encrypted storage

- [Encrypted Room DB](https://github.com/vikas00413/loginflowdesign/blob/main/core-database/src/main/java/com/example/loginflow/core/database/AppDatabase.kt): `core-database/src/main/java/com/example/loginflow/core/database/AppDatabase.kt`
- [User and session DAOs](https://github.com/vikas00413/loginflowdesign/blob/main/core-database/src/main/java/com/example/loginflow/core/database/dao/Daos.kt): `core-database/src/main/java/com/example/loginflow/core/database/dao/Daos.kt`
- [Encrypted preferences](https://github.com/vikas00413/loginflowdesign/blob/main/core-auth/src/main/java/com/example/loginflow/core/auth/data/AuthLocalDataSource.kt): `core-auth/src/main/java/com/example/loginflow/core/auth/data/AuthLocalDataSource.kt`

### Other components

- **User**
- **Google SDK**
- **Facebook SDK**
- **DummyJSON API**

## Connections

- User → Android app: opens (evidence: `README.md`)
- Android app → Launch routing: starts (evidence: `README.md`)
- Launch routing → Auth manager: initializes (evidence: `README.md`)
- Launch routing → Auth navigator: routes (evidence: `README.md`)
- Auth navigator → Login flow: shows login (evidence: `README.md`)
- Auth navigator → Biometric unlock: routes conditionally (evidence: `README.md`)
- Auth navigator → Profile management: routes (evidence: `README.md`)
- User → Login flow: submits credentials (evidence: `README.md`)
- Login flow → Auth manager: authenticates (evidence: `README.md`)
- Auth manager → Auth repository: delegates to (evidence: `README.md`)
- Auth repository → Auth API: calls (evidence: `README.md`)
- Auth API → Retrofit and OkHttp: uses (evidence: `README.md`)
- Retrofit and OkHttp → DummyJSON API: sends requests (evidence: `README.md`)
- Auth repository → Token manager: persists tokens (evidence: `README.md`)
- Auth repository → Encrypted Room DB: stores user session (evidence: `README.md`)
- Encrypted Room DB → User and session DAOs: exposes (evidence: `README.md`)
- Auth repository → Encrypted preferences: stores auth data (evidence: `README.md`)
- Retrofit and OkHttp → Auth interceptor: configures (evidence: `README.md`)
- Retrofit and OkHttp → Token authenticator: configures (evidence: `README.md`)
- Auth interceptor → Token manager: reads token (evidence: `README.md`)
- Token authenticator → DummyJSON API: refreshes token (evidence: `README.md`)
- Token authenticator → Token manager: saves token (evidence: `README.md`)
- User → Social sign-in: chooses provider (evidence: `README.md`)
- Social sign-in → Google SDK: authenticates with (evidence: `README.md`)
- Social sign-in → Facebook SDK: authenticates with (evidence: `README.md`)
- Social sign-in → Auth manager: maps to demo login (evidence: `README.md`)
- User → Biometric unlock: unlocks (evidence: `README.md`)
- User → Profile management: views profile (evidence: `README.md`)
- Profile management → Settings: opens (evidence: `README.md`)
- Settings → Debug data viewer: opens viewer (evidence: `README.md`)
- Debug data viewer → Encrypted Room DB: inspects (evidence: `README.md`)
- Debug data viewer → Encrypted preferences: inspects snapshot (evidence: `README.md`)
