# podetivenkatakoushik/routineforge-ai architecture

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

- Interactive diagram: https://gitdiagram.com/podetivenkatakoushik/routineforge-ai
- Repository: https://github.com/podetivenkatakoushik/routineforge-ai

## Overview

RoutineForge AI is a phone-first workflow automation app: users record a repetitive task, review the captured actions, generate a routine with AI, approve and save it, then preview and run it. The graph also shows routine storage, execution, and productivity analytics as distinct stages. The README documents the overall teach-review-reuse flow; source excerpts confirm several review and execution calls. Other screens and integrations are represented from the tree, with unverified links omitted or dashed.

Main entry points: [`app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt`](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt) (Review controller), [`app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt`](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt) (Execution engine), [`app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceViewModel.kt`](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceViewModel.kt) (Recording controller), [`app/src/main/java/com/routineforge/app/ai/GenerateRoutineUseCase.kt`](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/GenerateRoutineUseCase.kt) (Routine generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App entry<br/>[MainActivity.kt]"]
  node_navigation["Navigation<br/>[NavGraph.kt]"]
end

subgraph group_capture["Workflow capture"]
  node_recording_ui["Recording workspace"]
  node_recording_vm["Recording controller"]
  node_recorder["Action recorder<br/>[ActionRecorder.kt]"]
  node_capture_source["Action capture"]
  node_review_ui["Workflow review"]
  node_review_vm["Review controller"]
  node_recording_store[("Session store")]
  node_candidate_repo[("Candidate repository")]
end

subgraph group_routine["Routine creation"]
  node_generate["Routine generation"]
  node_ai_provider["AI provider<br/>[AIProvider.kt]"]
  node_gemini["Gemini service"]
  node_proposal_store[("Proposal store")]
  node_validator["Proposal validator"]
  node_approval["Routine approval"]
  node_editor["Routine editor"]
end

subgraph group_runtime["Execution and insights"]
  node_preview["Execution preview"]
  node_execution_ui["Execution screens"]
  node_engine["Execution engine"]
  node_adapter["Execution adapter"]
  node_execution_repo[("Execution results")]
  node_analytics[("Productivity analytics")]
  node_insights["Insights screen<br/>[InsightsScreen.kt]"]
end

subgraph group_domain["Domain and data"]
  node_routine_repo[("Routine repository")]
  node_routine_model["Routine domain"]
end

node_user(("Phone user"))

node_user -.->|"opens"| node_app
node_app -.->|"starts"| node_navigation
node_user -->|"demonstrates workflow"| node_recording_ui
node_recording_ui -->|"renders state"| node_recording_vm
node_recording_vm -.->|"controls recording"| node_recorder
node_recorder -.->|"captures actions"| node_capture_source
node_recording_vm -.->|"updates session"| node_recording_store
node_user -->|"reviews actions"| node_review_ui
node_review_ui -->|"renders state"| node_review_vm
node_review_vm -->|"reads and clears"| node_recording_store
node_review_vm -->|"saves candidate"| node_candidate_repo
node_review_vm -->|"generates routine"| node_generate
node_generate -.->|"requests generation"| node_ai_provider
node_ai_provider -.->|"uses provider"| node_gemini
node_generate -.->|"validates proposal"| node_validator
node_review_vm -->|"stores proposal"| node_proposal_store
node_user -->|"approves routine"| node_approval
node_approval -.->|"saves routine"| node_routine_repo
node_user -.->|"edits routine"| node_editor
node_user -->|"selects routine"| node_preview
node_preview -->|"starts simulation"| node_execution_ui
node_execution_ui -.->|"prepares execution"| node_engine
node_engine -->|"executes steps"| node_adapter
node_engine -->|"saves results"| node_execution_repo
node_engine -->|"records execution"| node_analytics
node_engine -->|"loads routines"| node_routine_repo
node_user -.->|"views productivity"| node_insights
node_insights -.->|"reads summaries"| node_analytics

click node_app "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/MainActivity.kt"
click node_navigation "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/navigation/NavGraph.kt"
click node_recording_ui "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceScreen.kt"
click node_recording_vm "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceViewModel.kt"
click node_recorder "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/recorder/ActionRecorder.kt"
click node_capture_source "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/recorder/ActionCaptureSource.kt"
click node_review_ui "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewScreen.kt"
click node_review_vm "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt"
click node_recording_store "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/recorder/RecordingSessionStore.kt"
click node_candidate_repo "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/recorder/WorkflowCandidateRepository.kt"
click node_generate "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/GenerateRoutineUseCase.kt"
click node_ai_provider "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/AIProvider.kt"
click node_gemini "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/GeminiAIProvider.kt"
click node_proposal_store "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/RoutineProposalStore.kt"
click node_validator "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/RoutineProposalValidator.kt"
click node_approval "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/approval/RoutineApprovalScreen.kt"
click node_editor "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/editor/RoutineEditorScreen.kt"
click node_routine_repo "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/data/repository/InMemoryRoutineRepository.kt"
click node_routine_model "https://github.com/podetivenkatakoushik/routineforge-ai/tree/main/app/src/main/java/com/routineforge/app/domain/model"
click node_preview "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/execution/ExecutionPreviewScreen.kt"
click node_execution_ui "https://github.com/podetivenkatakoushik/routineforge-ai/tree/main/app/src/main/java/com/routineforge/app/ui/screens/execution"
click node_engine "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt"
click node_adapter "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/execution/SimulationExecutionAdapter.kt"
click node_execution_repo "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/execution/ExecutionRepository.kt"
click node_analytics "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/analytics/AnalyticsRepository.kt"
click node_insights "https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/insights/InsightsScreen.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_navigation,node_user toneBlue
class node_recording_ui,node_recording_vm,node_recorder,node_capture_source,node_review_ui,node_review_vm,node_recording_store,node_candidate_repo toneAmber
class node_generate,node_ai_provider,node_gemini,node_proposal_store,node_validator,node_approval,node_editor toneMint
class node_preview,node_execution_ui,node_engine,node_adapter,node_execution_repo,node_analytics,node_insights toneRose
class node_routine_repo,node_routine_model toneIndigo
```

## Components

### App experience

- [App entry](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/MainActivity.kt): `app/src/main/java/com/routineforge/app/MainActivity.kt`
- [Navigation](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/navigation/NavGraph.kt): `app/src/main/java/com/routineforge/app/ui/navigation/NavGraph.kt`

### Workflow capture

- [Recording workspace](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceScreen.kt): `app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceScreen.kt`
- [Recording controller](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceViewModel.kt): `app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceViewModel.kt`
- [Action recorder](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/recorder/ActionRecorder.kt): `app/src/main/java/com/routineforge/app/recorder/ActionRecorder.kt`
- [Action capture](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/recorder/ActionCaptureSource.kt): `app/src/main/java/com/routineforge/app/recorder/ActionCaptureSource.kt`
- [Workflow review](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewScreen.kt): `app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewScreen.kt`
- [Review controller](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt): `app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt`
- [Session store](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/recorder/RecordingSessionStore.kt): `app/src/main/java/com/routineforge/app/recorder/RecordingSessionStore.kt`
- [Candidate repository](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/recorder/WorkflowCandidateRepository.kt): `app/src/main/java/com/routineforge/app/recorder/WorkflowCandidateRepository.kt`

### Routine creation

- [Routine generation](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/GenerateRoutineUseCase.kt): `app/src/main/java/com/routineforge/app/ai/GenerateRoutineUseCase.kt`
- [AI provider](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/AIProvider.kt): `app/src/main/java/com/routineforge/app/ai/AIProvider.kt`
- [Gemini service](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/GeminiAIProvider.kt): `app/src/main/java/com/routineforge/app/ai/GeminiAIProvider.kt`
- [Proposal store](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/RoutineProposalStore.kt): `app/src/main/java/com/routineforge/app/ai/RoutineProposalStore.kt`
- [Proposal validator](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ai/RoutineProposalValidator.kt): `app/src/main/java/com/routineforge/app/ai/RoutineProposalValidator.kt`
- [Routine approval](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/approval/RoutineApprovalScreen.kt): `app/src/main/java/com/routineforge/app/ui/screens/approval/RoutineApprovalScreen.kt`
- [Routine editor](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/editor/RoutineEditorScreen.kt): `app/src/main/java/com/routineforge/app/ui/screens/editor/RoutineEditorScreen.kt`

### Execution and insights

- [Execution preview](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/execution/ExecutionPreviewScreen.kt): `app/src/main/java/com/routineforge/app/ui/screens/execution/ExecutionPreviewScreen.kt`
- [Execution screens](https://github.com/podetivenkatakoushik/routineforge-ai/tree/main/app/src/main/java/com/routineforge/app/ui/screens/execution): `app/src/main/java/com/routineforge/app/ui/screens/execution`
- [Execution engine](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt): `app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt`
- [Execution adapter](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/execution/SimulationExecutionAdapter.kt): `app/src/main/java/com/routineforge/app/domain/execution/SimulationExecutionAdapter.kt`
- [Execution results](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/execution/ExecutionRepository.kt): `app/src/main/java/com/routineforge/app/domain/execution/ExecutionRepository.kt`
- [Productivity analytics](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/domain/analytics/AnalyticsRepository.kt): `app/src/main/java/com/routineforge/app/domain/analytics/AnalyticsRepository.kt`
- [Insights screen](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/ui/screens/insights/InsightsScreen.kt): `app/src/main/java/com/routineforge/app/ui/screens/insights/InsightsScreen.kt`

### Domain and data

- [Routine repository](https://github.com/podetivenkatakoushik/routineforge-ai/blob/main/app/src/main/java/com/routineforge/app/data/repository/InMemoryRoutineRepository.kt): `app/src/main/java/com/routineforge/app/data/repository/InMemoryRoutineRepository.kt`
- [Routine domain](https://github.com/podetivenkatakoushik/routineforge-ai/tree/main/app/src/main/java/com/routineforge/app/domain/model): `app/src/main/java/com/routineforge/app/domain/model`

### Other components

- **Phone user**

## Connections

- Phone user → App entry: opens
- App entry → Navigation: starts
- Phone user → Recording workspace: demonstrates workflow (evidence: `README.md`)
- Recording workspace → Recording controller: renders state (evidence: `app/src/main/java/com/routineforge/app/ui/screens/recording/RecordingWorkspaceScreen.kt`)
- Recording controller → Action recorder: controls recording
- Action recorder → Action capture: captures actions
- Recording controller → Session store: updates session
- Phone user → Workflow review: reviews actions (evidence: `README.md`)
- Workflow review → Review controller: renders state (evidence: `app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewScreen.kt`)
- Review controller → Session store: reads and clears (evidence: `app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt`)
- Review controller → Candidate repository: saves candidate (evidence: `app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt`)
- Review controller → Routine generation: generates routine (evidence: `app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt`)
- Routine generation → AI provider: requests generation
- AI provider → Gemini service: uses provider
- Routine generation → Proposal validator: validates proposal
- Review controller → Proposal store: stores proposal (evidence: `app/src/main/java/com/routineforge/app/ui/screens/review/WorkflowReviewViewModel.kt`)
- Phone user → Routine approval: approves routine (evidence: `README.md`)
- Routine approval → Routine repository: saves routine
- Phone user → Routine editor: edits routine
- Phone user → Execution preview: selects routine (evidence: `app/src/main/java/com/routineforge/app/ui/screens/execution/ExecutionPreviewScreen.kt`)
- Execution preview → Execution screens: starts simulation (evidence: `app/src/main/java/com/routineforge/app/ui/screens/execution/ExecutionPreviewScreen.kt`)
- Execution screens → Execution engine: prepares execution
- Execution engine → Execution adapter: executes steps (evidence: `app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt`)
- Execution engine → Execution results: saves results (evidence: `app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt`)
- Execution engine → Productivity analytics: records execution (evidence: `app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt`)
- Execution engine → Routine repository: loads routines (evidence: `app/src/main/java/com/routineforge/app/domain/execution/RoutineExecutionEngine.kt`)
- Phone user → Insights screen: views productivity
- Insights screen → Productivity analytics: reads summaries
