# kailash-sivakumar24/starbridge architecture

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

- Interactive diagram: https://gitdiagram.com/kailash-sivakumar24/starbridge
- Repository: https://github.com/kailash-sivakumar24/starbridge

## Overview

Starbridge is a browser-based learning game about interpreting social situations and emotions. Players start or resume a game, explore a map of places, enter place-specific interactions, select correct answers, and earn stars that unlock further places and interactions. The React router owns navigation and persists completed interactions in local storage; page components render the map, place, and quiz stages using shared game data. The graph covers the sampled runtime flow and documented-by-code capabilities; unsampled help and not-found pages are included as routed screens, but their internal behavior is not inferred.

Main entry points: [`frontend/src/components/App.js`](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/App.js) (App router), [`frontend/src/components/MapPage/MapPage.js`](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/MapPage/MapPage.js) (Game map), [`frontend/src/components/PlacePage/PlacePage.js`](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/PlacePage/PlacePage.js) (Place screen), [`frontend/src/components/reusable/RouterLink.js`](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/reusable/RouterLink.js) (Route links)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App router<br/>[App.js]"]
  node_home["Home screen<br/>[HomePage.js]"]
  node_help["Help screen<br/>[HelpPage.js]"]
  node_notfound["Not-found screen<br/>[FourOFour.js]"]
end

subgraph group_gameplay["Game progression"]
  node_map["Game map<br/>[MapPage.js]"]
  node_placecircle["Place markers<br/>[PlaceCircle.js]"]
  node_place["Place screen<br/>[PlacePage.js]"]
  node_interactioncircle["Interaction markers"]
  node_quiz["Interaction quiz<br/>[InteractionPage.js]"]
end

subgraph group_content["Game content"]
  node_gamedata["Game definitions<br/>[data.js]"]
  node_progression["Level progression<br/>[findNextLevel.js]"]
  node_totalstars["Total star count<br/>[findTotalStars.js]"]
  node_starcount["Place star count<br/>[starsCounting.js]"]
end

subgraph group_shared["Shared interface"]
  node_helper["Helper avatar<br/>[HelperAvatar.js]"]
  node_stars["Star display<br/>[Stars.js]"]
  node_links["Route links<br/>[RouterLink.js]"]
  node_progressstore[("Saved progress")]
end

node_player(("Player"))

node_player -->|"opens"| node_app
node_app -->|"loads and saves"| node_progressstore
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_help
node_app -->|"routes to"| node_map
node_app -->|"routes to"| node_place
node_app -->|"routes to"| node_quiz
node_app -->|"routes to"| node_notfound
node_home -->|"starts or resumes"| node_map
node_home -->|"renders"| node_helper
node_home -->|"renders"| node_links
node_map -->|"reads places"| node_gamedata
node_map -->|"renders"| node_placecircle
node_map -->|"checks next level"| node_progression
node_map -->|"checks completion"| node_totalstars
node_map -->|"renders"| node_helper
node_map -->|"renders"| node_links
node_placecircle -->|"counts place stars"| node_starcount
node_placecircle -->|"renders"| node_stars
node_placecircle -->|"renders"| node_links
node_place -->|"reads place content"| node_gamedata
node_place -->|"renders"| node_interactioncircle
node_place -->|"counts place stars"| node_starcount
node_place -->|"renders"| node_stars
node_place -->|"renders"| node_helper
node_place -->|"renders"| node_links
node_interactioncircle -->|"renders"| node_stars
node_interactioncircle -->|"renders"| node_links
node_quiz -->|"reads quiz content"| node_gamedata
node_quiz -->|"updates completed"| node_progressstore
node_quiz -->|"renders hints"| node_helper
node_quiz -->|"renders"| node_links
node_progression -->|"reads levels"| node_gamedata
node_totalstars -->|"reads places"| node_gamedata
node_starcount -->|"reads interactions"| node_gamedata
node_help -->|"renders"| node_links
node_notfound -->|"renders"| node_links
node_notfound -->|"renders"| node_helper

click node_app "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/App.js"
click node_home "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/HomePage/HomePage.js"
click node_help "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/HelpPage/HelpPage.js"
click node_notfound "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/FourOFour/FourOFour.js"
click node_map "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/MapPage/MapPage.js"
click node_placecircle "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/MapPage/PlaceCircle.js"
click node_place "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/PlacePage/PlacePage.js"
click node_interactioncircle "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/PlacePage/InteractionCircle.js"
click node_quiz "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/InteractionPage/InteractionPage.js"
click node_gamedata "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/data/data.js"
click node_progression "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/utils/findNextLevel.js"
click node_totalstars "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/utils/findTotalStars.js"
click node_starcount "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/utils/starsCounting.js"
click node_helper "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/reusable/HelperAvatar.js"
click node_stars "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/reusable/Stars.js"
click node_links "https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/reusable/RouterLink.js"

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_home,node_help,node_notfound toneBlue
class node_map,node_placecircle,node_place,node_interactioncircle,node_quiz toneAmber
class node_gamedata,node_progression,node_totalstars,node_starcount toneMint
class node_helper,node_stars,node_links,node_progressstore toneRose
class node_player toneIndigo
```

## Components

### App navigation

- [App router](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/App.js): `frontend/src/components/App.js`
- [Home screen](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/HomePage/HomePage.js): `frontend/src/components/HomePage/HomePage.js`
- [Help screen](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/HelpPage/HelpPage.js): `frontend/src/components/HelpPage/HelpPage.js`
- [Not-found screen](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/FourOFour/FourOFour.js): `frontend/src/components/FourOFour/FourOFour.js`

### Game progression

- [Game map](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/MapPage/MapPage.js): `frontend/src/components/MapPage/MapPage.js`
- [Place markers](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/MapPage/PlaceCircle.js): `frontend/src/components/MapPage/PlaceCircle.js`
- [Place screen](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/PlacePage/PlacePage.js): `frontend/src/components/PlacePage/PlacePage.js`
- [Interaction markers](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/PlacePage/InteractionCircle.js): `frontend/src/components/PlacePage/InteractionCircle.js`
- [Interaction quiz](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/InteractionPage/InteractionPage.js): `frontend/src/components/InteractionPage/InteractionPage.js`

### Game content

- [Game definitions](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/data/data.js): `frontend/src/data/data.js`
- [Level progression](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/utils/findNextLevel.js): `frontend/src/utils/findNextLevel.js`
- [Total star count](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/utils/findTotalStars.js): `frontend/src/utils/findTotalStars.js`
- [Place star count](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/utils/starsCounting.js): `frontend/src/utils/starsCounting.js`

### Shared interface

- [Helper avatar](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/reusable/HelperAvatar.js): `frontend/src/components/reusable/HelperAvatar.js`
- [Star display](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/reusable/Stars.js): `frontend/src/components/reusable/Stars.js`
- [Route links](https://github.com/kailash-sivakumar24/starbridge/blob/main/frontend/src/components/reusable/RouterLink.js): `frontend/src/components/reusable/RouterLink.js`
- **Saved progress**

### Other components

- **Player**

## Connections

- Player → App router: opens (evidence: `frontend/src/components/App.js`)
- App router → Saved progress: loads and saves (evidence: `frontend/src/components/App.js`)
- App router → Home screen: routes to (evidence: `frontend/src/components/App.js`)
- App router → Help screen: routes to (evidence: `frontend/src/components/App.js`)
- App router → Game map: routes to (evidence: `frontend/src/components/App.js`)
- App router → Place screen: routes to (evidence: `frontend/src/components/App.js`)
- App router → Interaction quiz: routes to (evidence: `frontend/src/components/App.js`)
- App router → Not-found screen: routes to (evidence: `frontend/src/components/App.js`)
- Home screen → Game map: starts or resumes (evidence: `frontend/src/components/HomePage/HomePage.js`)
- Home screen → Helper avatar: renders (evidence: `frontend/src/components/HomePage/HomePage.js`)
- Home screen → Route links: renders (evidence: `frontend/src/components/HomePage/HomePage.js`)
- Game map → Game definitions: reads places (evidence: `frontend/src/components/MapPage/MapPage.js`)
- Game map → Place markers: renders (evidence: `frontend/src/components/MapPage/MapPage.js`)
- Game map → Level progression: checks next level (evidence: `frontend/src/components/MapPage/MapPage.js`)
- Game map → Total star count: checks completion (evidence: `frontend/src/components/MapPage/MapPage.js`)
- Game map → Helper avatar: renders (evidence: `frontend/src/components/MapPage/MapPage.js`)
- Game map → Route links: renders (evidence: `frontend/src/components/MapPage/MapPage.js`)
- Place markers → Place star count: counts place stars (evidence: `frontend/src/components/MapPage/PlaceCircle.js`)
- Place markers → Star display: renders (evidence: `frontend/src/components/MapPage/PlaceCircle.js`)
- Place markers → Route links: renders (evidence: `frontend/src/components/MapPage/PlaceCircle.js`)
- Place screen → Game definitions: reads place content (evidence: `frontend/src/components/PlacePage/PlacePage.js`)
- Place screen → Interaction markers: renders (evidence: `frontend/src/components/PlacePage/PlacePage.js`)
- Place screen → Place star count: counts place stars (evidence: `frontend/src/components/PlacePage/PlacePage.js`)
- Place screen → Star display: renders (evidence: `frontend/src/components/PlacePage/PlacePage.js`)
- Place screen → Helper avatar: renders (evidence: `frontend/src/components/PlacePage/PlacePage.js`)
- Place screen → Route links: renders (evidence: `frontend/src/components/PlacePage/PlacePage.js`)
- Interaction markers → Star display: renders (evidence: `frontend/src/components/PlacePage/InteractionCircle.js`)
- Interaction markers → Route links: renders (evidence: `frontend/src/components/PlacePage/InteractionCircle.js`)
- Interaction quiz → Game definitions: reads quiz content (evidence: `frontend/src/components/InteractionPage/InteractionPage.js`)
- Interaction quiz → Saved progress: updates completed (evidence: `frontend/src/components/InteractionPage/InteractionPage.js`)
- Interaction quiz → Helper avatar: renders hints (evidence: `frontend/src/components/InteractionPage/InteractionPage.js`)
- Interaction quiz → Route links: renders (evidence: `frontend/src/components/InteractionPage/InteractionPage.js`)
- Level progression → Game definitions: reads levels (evidence: `frontend/src/utils/findNextLevel.js`)
- Total star count → Game definitions: reads places (evidence: `frontend/src/utils/findTotalStars.js`)
- Place star count → Game definitions: reads interactions (evidence: `frontend/src/utils/starsCounting.js`)
- Help screen → Route links: renders (evidence: `frontend/src/components/HelpPage/HelpPage.js`)
- Not-found screen → Route links: renders (evidence: `frontend/src/components/FourOFour/FourOFour.js`)
- Not-found screen → Helper avatar: renders (evidence: `frontend/src/components/FourOFour/FourOFour.js`)
