# pranathiireddy/cat-personality-test architecture

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

- Interactive diagram: https://gitdiagram.com/pranathiireddy/cat-personality-test
- Repository: https://github.com/pranathiireddy/cat-personality-test

## Overview

This is a browser-based cat-personality quiz and cat-discovery experience. Users start at the landing view, answer a 31-question quiz, receive a calculated cat personality, and can continue through match results and a prompt to meet the full cat roster. The main app coordinates view state and result calculation; data modules supply quiz content and personality profiles, while shared UI and audio modules support the experience. Source excerpts show the principal workflow, but not every view-to-view callback or persistence detail.

Main entry points: [`src/App.tsx`](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/App.tsx) (App coordinator), [`src/components/MeetAllCatsView.tsx`](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/MeetAllCatsView.tsx) (All cats view), [`src/components/ResultDealView.tsx`](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/ResultDealView.tsx) (Personality result), [`src/components/CatAvatar.tsx`](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/CatAvatar.tsx) (Cat avatar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Quiz experience"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_landing["Landing view<br/>[LandingView.tsx]"]
  node_quiz["Quiz view<br/>[QuizView.tsx]"]
  node_deal["Personality result<br/>[ResultDealView.tsx]"]
  node_matches["Match results"]
  node_prompt["Meet prompt<br/>[MeetPromptView.tsx]"]
  node_allcats["All cats view"]
end

subgraph group_content["Quiz and cat content"]
  node_questions["Quiz questions<br/>[questions.ts]"]
  node_personalities["Personality profiles<br/>[personalities.ts]"]
  node_assets["Cat asset map<br/>[catAssets.ts]"]
  node_types["Domain types<br/>[types.ts]"]
end

subgraph group_shared["Shared interface and audio"]
  node_nav["Top navigation<br/>[TopNavBar.tsx]"]
  node_background["Cat background"]
  node_avatar["Cat avatar<br/>[CatAvatar.tsx]"]
  node_typing["Typing cat<br/>[TypingCat.tsx]"]
  node_button["Retro button"]
  node_audio["Sound engine<br/>[audio.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"starts and navigates"| node_app
node_app -->|"renders"| node_landing
node_app -->|"renders"| node_quiz
node_app -->|"renders"| node_deal
node_app -->|"renders"| node_matches
node_app -->|"renders"| node_prompt
node_app -->|"renders"| node_allcats
node_app -->|"calculates result"| node_questions
node_app -->|"reads mute state"| node_audio
node_app -->|"renders"| node_nav
node_app -->|"renders"| node_background
node_landing -->|"renders"| node_typing
node_quiz -->|"renders"| node_typing
node_quiz -->|"renders"| node_button
node_deal -->|"renders"| node_avatar
node_deal -->|"renders"| node_button
node_matches -->|"uses image map"| node_avatar
node_matches -->|"uses trait slider"| node_deal
node_matches -->|"renders"| node_button
node_prompt -->|"uses image map"| node_avatar
node_prompt -->|"renders"| node_typing
node_allcats -->|"displays profiles"| node_personalities
node_allcats -->|"uses image map"| node_avatar
node_allcats -->|"uses trait slider"| node_deal
node_allcats -->|"renders"| node_button
node_avatar -->|"plays cat sounds"| node_audio
node_typing -->|"plays cat sounds"| node_audio
node_button -->|"plays click sounds"| node_audio
node_questions -->|"uses domain types"| node_types
node_personalities -->|"uses domain types"| node_types
node_assets -->|"uses domain types"| node_types

click node_app "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/App.tsx"
click node_landing "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/LandingView.tsx"
click node_quiz "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/QuizView.tsx"
click node_deal "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/ResultDealView.tsx"
click node_matches "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/ResultMatchesView.tsx"
click node_prompt "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/MeetPromptView.tsx"
click node_allcats "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/MeetAllCatsView.tsx"
click node_questions "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/data/questions.ts"
click node_personalities "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/data/personalities.ts"
click node_assets "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/data/catAssets.ts"
click node_types "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/types.ts"
click node_nav "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/TopNavBar.tsx"
click node_background "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/CatBackgroundPattern.tsx"
click node_avatar "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/CatAvatar.tsx"
click node_typing "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/TypingCat.tsx"
click node_button "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/RetroImageButton.tsx"
click node_audio "https://github.com/pranathiireddy/cat-personality-test/blob/main/src/utils/audio.ts"

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_landing,node_quiz,node_deal,node_matches,node_prompt,node_allcats toneBlue
class node_questions,node_personalities,node_assets,node_types toneAmber
class node_nav,node_background,node_avatar,node_typing,node_button,node_audio toneMint
class node_visitor toneIndigo
```

## Components

### Quiz experience

- [App coordinator](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/App.tsx): `src/App.tsx`
- [Landing view](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/LandingView.tsx): `src/components/LandingView.tsx`
- [Quiz view](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/QuizView.tsx): `src/components/QuizView.tsx`
- [Personality result](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/ResultDealView.tsx): `src/components/ResultDealView.tsx`
- [Match results](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/ResultMatchesView.tsx): `src/components/ResultMatchesView.tsx`
- [Meet prompt](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/MeetPromptView.tsx): `src/components/MeetPromptView.tsx`
- [All cats view](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/MeetAllCatsView.tsx): `src/components/MeetAllCatsView.tsx`

### Quiz and cat content

- [Quiz questions](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/data/questions.ts): `src/data/questions.ts`
- [Personality profiles](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/data/personalities.ts): `src/data/personalities.ts`
- [Cat asset map](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/data/catAssets.ts): `src/data/catAssets.ts`
- [Domain types](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/types.ts): `src/types.ts`

### Shared interface and audio

- [Top navigation](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/TopNavBar.tsx): `src/components/TopNavBar.tsx`
- [Cat background](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/CatBackgroundPattern.tsx): `src/components/CatBackgroundPattern.tsx`
- [Cat avatar](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/CatAvatar.tsx): `src/components/CatAvatar.tsx`
- [Typing cat](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/TypingCat.tsx): `src/components/TypingCat.tsx`
- [Retro button](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/components/RetroImageButton.tsx): `src/components/RetroImageButton.tsx`
- [Sound engine](https://github.com/pranathiireddy/cat-personality-test/blob/main/src/utils/audio.ts): `src/utils/audio.ts`

### Other components

- **Visitor**

## Connections

- Visitor → App coordinator: starts and navigates
- App coordinator → Landing view: renders (evidence: `src/App.tsx`)
- App coordinator → Quiz view: renders (evidence: `src/App.tsx`)
- App coordinator → Personality result: renders (evidence: `src/App.tsx`)
- App coordinator → Match results: renders (evidence: `src/App.tsx`)
- App coordinator → Meet prompt: renders (evidence: `src/App.tsx`)
- App coordinator → All cats view: renders (evidence: `src/App.tsx`)
- App coordinator → Quiz questions: calculates result (evidence: `src/App.tsx`)
- App coordinator → Sound engine: reads mute state (evidence: `src/App.tsx`)
- App coordinator → Top navigation: renders (evidence: `src/App.tsx`)
- App coordinator → Cat background: renders (evidence: `src/App.tsx`)
- Landing view → Typing cat: renders (evidence: `src/components/LandingView.tsx`)
- Quiz view → Typing cat: renders (evidence: `src/components/QuizView.tsx`)
- Quiz view → Retro button: renders (evidence: `src/components/QuizView.tsx`)
- Personality result → Cat avatar: renders (evidence: `src/components/ResultDealView.tsx`)
- Personality result → Retro button: renders (evidence: `src/components/ResultDealView.tsx`)
- Match results → Cat avatar: uses image map (evidence: `src/components/ResultMatchesView.tsx`)
- Match results → Personality result: uses trait slider (evidence: `src/components/ResultMatchesView.tsx`)
- Match results → Retro button: renders (evidence: `src/components/ResultMatchesView.tsx`)
- Meet prompt → Cat avatar: uses image map (evidence: `src/components/MeetPromptView.tsx`)
- Meet prompt → Typing cat: renders (evidence: `src/components/MeetPromptView.tsx`)
- All cats view → Personality profiles: displays profiles (evidence: `src/components/MeetAllCatsView.tsx`)
- All cats view → Cat avatar: uses image map (evidence: `src/components/MeetAllCatsView.tsx`)
- All cats view → Personality result: uses trait slider (evidence: `src/components/MeetAllCatsView.tsx`)
- All cats view → Retro button: renders (evidence: `src/components/MeetAllCatsView.tsx`)
- Cat avatar → Sound engine: plays cat sounds (evidence: `src/components/CatAvatar.tsx`)
- Typing cat → Sound engine: plays cat sounds (evidence: `src/components/TypingCat.tsx`)
- Retro button → Sound engine: plays click sounds (evidence: `src/components/RetroImageButton.tsx`)
- Quiz questions → Domain types: uses domain types (evidence: `src/data/questions.ts`)
- Personality profiles → Domain types: uses domain types (evidence: `src/data/personalities.ts`)
- Cat asset map → Domain types: uses domain types (evidence: `src/data/catAssets.ts`)
