# redward42/web102_unit7lab architecture

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

- Interactive diagram: https://gitdiagram.com/redward42/web102_unit7lab
- Repository: https://github.com/redward42/web102_unit7lab

## Overview

This is a small React challenge-board UI, not a backed application: the app routes among a seeded challenge list, a creation form, and an edit form. Browsing renders cards with a local bet counter and an edit link; the forms keep input in component state, but the sampled code shows no submit, update, delete, or persistence behavior. The route and component relationships are visible in the excerpts; interactions that depend on browser use are shown as unverified.

Main entry points: [`src/App.jsx`](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/App.jsx) (Routes and seed data), [`src/pages/ReadPosts.jsx`](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/pages/ReadPosts.jsx) (Challenge list), [`src/components/Card.jsx`](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/components/Card.jsx) (Challenge card), [`src/pages/EditPost.jsx`](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/pages/EditPost.jsx) (Edit form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_entry["React entry<br/>[index.jsx]"]
  node_app["Routes and seed data<br/>[App.jsx]"]
end

subgraph group_browse["Challenge browsing"]
  node_browse_page["Challenge list<br/>[ReadPosts.jsx]"]
  node_card["Challenge card<br/>[Card.jsx]"]
end

subgraph group_author["Challenge authoring"]
  node_create["Create form<br/>[CreatePost.jsx]"]
  node_edit["Edit form<br/>[EditPost.jsx]"]
end

node_visitor(("Visitor"))

node_entry -->|"renders"| node_app
node_visitor -.->|"uses routes"| node_app
node_app -->|"routes to"| node_browse_page
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_edit
node_app -->|"passes seed data"| node_browse_page
node_app -->|"passes seed data"| node_edit
node_browse_page -->|"renders"| node_card
node_visitor -.->|"bets locally"| node_card

click node_entry "https://github.com/RedWARd42/web102_unit7lab/blob/main/src/index.jsx"
click node_app "https://github.com/RedWARd42/web102_unit7lab/blob/main/src/App.jsx"
click node_browse_page "https://github.com/RedWARd42/web102_unit7lab/blob/main/src/pages/ReadPosts.jsx"
click node_card "https://github.com/RedWARd42/web102_unit7lab/blob/main/src/components/Card.jsx"
click node_create "https://github.com/RedWARd42/web102_unit7lab/blob/main/src/pages/CreatePost.jsx"
click node_edit "https://github.com/RedWARd42/web102_unit7lab/blob/main/src/pages/EditPost.jsx"

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_entry,node_app toneBlue
class node_browse_page,node_card toneAmber
class node_create,node_edit toneMint
class node_visitor toneIndigo
```

## Components

### App shell

- [React entry](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/index.jsx): `src/index.jsx`
- [Routes and seed data](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/App.jsx): `src/App.jsx`

### Challenge browsing

- [Challenge list](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/pages/ReadPosts.jsx): `src/pages/ReadPosts.jsx`
- [Challenge card](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/components/Card.jsx): `src/components/Card.jsx`

### Challenge authoring

- [Create form](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/pages/CreatePost.jsx): `src/pages/CreatePost.jsx`
- [Edit form](https://github.com/RedWARd42/web102_unit7lab/blob/main/src/pages/EditPost.jsx): `src/pages/EditPost.jsx`

### Other components

- **Visitor**

## Connections

- React entry → Routes and seed data: renders (evidence: `src/index.jsx`)
- Visitor → Routes and seed data: uses routes
- Routes and seed data → Challenge list: routes to (evidence: `src/App.jsx`)
- Routes and seed data → Create form: routes to (evidence: `src/App.jsx`)
- Routes and seed data → Edit form: routes to (evidence: `src/App.jsx`)
- Routes and seed data → Challenge list: passes seed data (evidence: `src/App.jsx`)
- Routes and seed data → Edit form: passes seed data (evidence: `src/App.jsx`)
- Challenge list → Challenge card: renders (evidence: `src/pages/ReadPosts.jsx`)
- Visitor → Challenge card: bets locally
