# avelic5/ashe architecture

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

- Interactive diagram: https://gitdiagram.com/avelic5/ashe
- Repository: https://github.com/avelic5/ashe

## Overview

ASHE is an anonymous self-help web app: users settle in with onboarding exercises, explore an office-style hub and AI chat, choose a guided card or assessment flow, and receive a report with next steps; session booking is an optional verified path. The graph reflects the routes and component calls shown in excerpts or named by the source index, plus README-documented capabilities. Some features, including ambient music and feelings cards, are documented but their implementation wiring was not sampled.

Main entry points: [`src/App.tsx`](https://github.com/avelic5/ashe/blob/main/src/App.tsx) (App routes), [`src/components/BookingFlow.tsx`](https://github.com/avelic5/ashe/blob/main/src/components/BookingFlow.tsx) (Session booking), [`src/components/AnalysisReport.tsx`](https://github.com/avelic5/ashe/blob/main/src/components/AnalysisReport.tsx) (Analysis report), [`src/components/MainOffice.tsx`](https://github.com/avelic5/ashe/blob/main/src/components/MainOffice.tsx) (Main office)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App routes<br/>[App.tsx]"]
end

subgraph group_support["Support experience"]
  node_onboarding["Onboarding exercise"]
  node_office["Main office<br/>[MainOffice.tsx]"]
  node_mini_game["Grounding game<br/>[AmonUS.tsx]"]
  node_activity_cards["Activity cards<br/>[ActivityCard.tsx]"]
  node_ai_chat["AI chat<br/>[chatWithAI.ts]"]
end

subgraph group_guided["Guided activities"]
  node_problem_picker["Problem selection"]
  node_question_flow["Question flow<br/>[QuestionFlow.tsx]"]
  node_question_card["Question card<br/>[QuestionCard.tsx]"]
  node_question_generator["Custom questions"]
  node_assessment_flows["Wellbeing assessments<br/>[SelfEsteemTest.tsx]"]
  node_feelings_flow["Feelings check-in<br/>[WellBeingTest.tsx]"]
end

subgraph group_followup["Results and follow-up"]
  node_analysis["Analysis report<br/>[AnalysisReport.tsx]"]
  node_booking["Session booking<br/>[BookingFlow.tsx]"]
  node_verification["Identity verification"]
  node_dashboard["Wellbeing dashboard<br/>[Dashboard.tsx]"]
end

node_user(("User"))
node_openrouter{{"OpenRouter"}}

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_onboarding
node_app -->|"routes to"| node_office
node_app -->|"routes to"| node_problem_picker
node_app -->|"routes to"| node_question_flow
node_app -->|"routes to"| node_assessment_flows
node_app -->|"routes to"| node_feelings_flow
node_app -->|"routes to"| node_analysis
node_app -->|"routes to"| node_booking
node_app -->|"routes to"| node_dashboard
node_office -->|"renders"| node_activity_cards
node_office -->|"renders"| node_mini_game
node_office -->|"calls"| node_ai_chat
node_ai_chat -->|"requests completion"| node_openrouter
node_problem_picker -->|"generates custom prompts"| node_question_generator
node_question_flow -->|"renders"| node_question_card
node_question_flow -->|"loads custom prompts"| node_question_generator
node_question_generator -->|"requests prompts"| node_ai_chat
node_question_flow -.->|"continues to"| node_analysis
node_assessment_flows -->|"continues to"| node_analysis
node_feelings_flow -.->|"continues to"| node_analysis
node_booking -->|"opens verification"| node_verification
node_verification -->|"confirms identity"| node_booking
node_booking -->|"completes booking"| node_dashboard
node_analysis -->|"offers booking"| node_booking

click node_app "https://github.com/avelic5/ashe/blob/main/src/App.tsx"
click node_onboarding "https://github.com/avelic5/ashe/blob/main/src/components/LandingTrustExercise.tsx"
click node_office "https://github.com/avelic5/ashe/blob/main/src/components/MainOffice.tsx"
click node_mini_game "https://github.com/avelic5/ashe/blob/main/src/components/AmonUS.tsx"
click node_activity_cards "https://github.com/avelic5/ashe/blob/main/src/components/ActivityCard.tsx"
click node_ai_chat "https://github.com/avelic5/ashe/blob/main/src/utils/chatWithAI.ts"
click node_problem_picker "https://github.com/avelic5/ashe/blob/main/src/components/ProblemSelection.tsx"
click node_question_flow "https://github.com/avelic5/ashe/blob/main/src/components/QuestionFlow.tsx"
click node_question_card "https://github.com/avelic5/ashe/blob/main/src/components/QuestionCard.tsx"
click node_question_generator "https://github.com/avelic5/ashe/blob/main/src/utils/generateQuestions.ts"
click node_assessment_flows "https://github.com/avelic5/ashe/blob/main/src/components/SelfEsteemTest.tsx"
click node_feelings_flow "https://github.com/avelic5/ashe/blob/main/src/components/WellBeingTest.tsx"
click node_analysis "https://github.com/avelic5/ashe/blob/main/src/components/AnalysisReport.tsx"
click node_booking "https://github.com/avelic5/ashe/blob/main/src/components/BookingFlow.tsx"
click node_verification "https://github.com/avelic5/ashe/blob/main/src/components/IdentityVerification.tsx"
click node_dashboard "https://github.com/avelic5/ashe/blob/main/src/components/Dashboard.tsx"

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_user toneBlue
class node_onboarding,node_office,node_mini_game,node_activity_cards,node_ai_chat toneAmber
class node_problem_picker,node_question_flow,node_question_card,node_question_generator,node_assessment_flows,node_feelings_flow,node_openrouter toneMint
class node_analysis,node_booking,node_verification,node_dashboard toneRose
```

## Components

### App navigation

- [App routes](https://github.com/avelic5/ashe/blob/main/src/App.tsx): `src/App.tsx`

### Support experience

- [Onboarding exercise](https://github.com/avelic5/ashe/blob/main/src/components/LandingTrustExercise.tsx): `src/components/LandingTrustExercise.tsx`
- [Main office](https://github.com/avelic5/ashe/blob/main/src/components/MainOffice.tsx): `src/components/MainOffice.tsx`
- [Grounding game](https://github.com/avelic5/ashe/blob/main/src/components/AmonUS.tsx): `src/components/AmonUS.tsx`
- [Activity cards](https://github.com/avelic5/ashe/blob/main/src/components/ActivityCard.tsx): `src/components/ActivityCard.tsx`
- [AI chat](https://github.com/avelic5/ashe/blob/main/src/utils/chatWithAI.ts): `src/utils/chatWithAI.ts`

### Guided activities

- [Problem selection](https://github.com/avelic5/ashe/blob/main/src/components/ProblemSelection.tsx): `src/components/ProblemSelection.tsx`
- [Question flow](https://github.com/avelic5/ashe/blob/main/src/components/QuestionFlow.tsx): `src/components/QuestionFlow.tsx`
- [Question card](https://github.com/avelic5/ashe/blob/main/src/components/QuestionCard.tsx): `src/components/QuestionCard.tsx`
- [Custom questions](https://github.com/avelic5/ashe/blob/main/src/utils/generateQuestions.ts): `src/utils/generateQuestions.ts`
- [Wellbeing assessments](https://github.com/avelic5/ashe/blob/main/src/components/SelfEsteemTest.tsx): `src/components/SelfEsteemTest.tsx`
- [Feelings check-in](https://github.com/avelic5/ashe/blob/main/src/components/WellBeingTest.tsx): `src/components/WellBeingTest.tsx`

### Results and follow-up

- [Analysis report](https://github.com/avelic5/ashe/blob/main/src/components/AnalysisReport.tsx): `src/components/AnalysisReport.tsx`
- [Session booking](https://github.com/avelic5/ashe/blob/main/src/components/BookingFlow.tsx): `src/components/BookingFlow.tsx`
- [Identity verification](https://github.com/avelic5/ashe/blob/main/src/components/IdentityVerification.tsx): `src/components/IdentityVerification.tsx`
- [Wellbeing dashboard](https://github.com/avelic5/ashe/blob/main/src/components/Dashboard.tsx): `src/components/Dashboard.tsx`

### Other components

- **User**
- **OpenRouter**

## Connections

- User → App routes: opens
- App routes → Onboarding exercise: routes to (evidence: `src/App.tsx`)
- App routes → Main office: routes to (evidence: `src/App.tsx`)
- App routes → Problem selection: routes to (evidence: `src/App.tsx`)
- App routes → Question flow: routes to (evidence: `src/App.tsx`)
- App routes → Wellbeing assessments: routes to (evidence: `src/App.tsx`)
- App routes → Feelings check-in: routes to (evidence: `src/App.tsx`)
- App routes → Analysis report: routes to (evidence: `src/App.tsx`)
- App routes → Session booking: routes to (evidence: `src/App.tsx`)
- App routes → Wellbeing dashboard: routes to (evidence: `src/App.tsx`)
- Main office → Activity cards: renders (evidence: `src/components/MainOffice.tsx`)
- Main office → Grounding game: renders (evidence: `src/components/MainOffice.tsx`)
- Main office → AI chat: calls (evidence: `src/components/MainOffice.tsx`)
- AI chat → OpenRouter: requests completion (evidence: `src/utils/chatWithAI.ts`)
- Problem selection → Custom questions: generates custom prompts (evidence: `src/components/ProblemSelection.tsx`)
- Question flow → Question card: renders (evidence: `src/components/QuestionFlow.tsx`)
- Question flow → Custom questions: loads custom prompts (evidence: `src/components/QuestionFlow.tsx`)
- Custom questions → AI chat: requests prompts (evidence: `src/utils/generateQuestions.ts`)
- Question flow → Analysis report: continues to
- Wellbeing assessments → Analysis report: continues to (evidence: `src/App.tsx`)
- Feelings check-in → Analysis report: continues to
- Session booking → Identity verification: opens verification (evidence: `src/components/BookingFlow.tsx`)
- Identity verification → Session booking: confirms identity (evidence: `src/components/BookingFlow.tsx`)
- Session booking → Wellbeing dashboard: completes booking (evidence: `src/App.tsx`)
- Analysis report → Session booking: offers booking (evidence: `src/components/AnalysisReport.tsx`)
