# piotrwitek/react-redux-typescript-guide architecture

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

- Interactive diagram: https://gitdiagram.com/piotrwitek/react-redux-typescript-guide
- Repository: https://github.com/piotrwitek/react-redux-typescript-guide

## Overview

This repository is a TypeScript/React guide with a runnable playground, not a standalone production service. The playground’s user-facing route demonstrates component patterns, while separate examples cover hooks, context, higher-order components, and Redux patterns; feature modules include counter and todo examples, with a mock todo API. The graph emphasizes these documented learning areas and the visible app/store wiring. Some feature implementations are unsampled, so their internal call relationships are not inferred.

Main entry points: [`playground/src/app.tsx`](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/app.tsx) (App and routes), [`playground/src/routes/home.tsx`](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/routes/home.tsx) (Pattern showcase), [`playground/src/hooks/use-theme-context.tsx`](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hooks/use-theme-context.tsx) (Theme hook), [`playground/src/connected/fc-counter-connected.tsx`](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/connected/fc-counter-connected.tsx) (Connected components)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Playground app"]
  node_app["App and routes<br/>[app.tsx]"]
  node_home["Pattern showcase<br/>[home.tsx]"]
  node_layout["Page layout<br/>[layout.tsx]"]
end

subgraph group_react["React patterns"]
  node_counter_examples["Counter components"]
  node_class_examples["Class components"]
  node_generic_list["Generic list"]
  node_hoc_examples["Higher-order components<br/>[with-state.tsx]"]
  node_context["Theme context<br/>[theme-context.ts]"]
  node_theme_hook["Theme hook"]
  node_hooks["React hooks<br/>[use-reducer.tsx]"]
end

subgraph group_redux["Redux examples"]
  node_connected["Connected components"]
  node_counter_feature["Counter feature<br/>[reducer.ts]"]
  node_store["Redux store<br/>[store.ts]"]
  node_router["Router integration<br/>[redux-router.ts]"]
end

subgraph group_data["Todo data"]
  node_todo_feature["Todo features<br/>[epics.ts]"]
  node_typed_todo["Typed todo feature<br/>[actions.ts]"]
  node_todo_api["Todo mock API<br/>[todos.ts]"]
end

node_learner(("Playground user"))

node_learner -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"renders"| node_layout
node_home -->|"renders"| node_counter_examples
node_home -->|"renders"| node_class_examples
node_home -->|"renders"| node_generic_list
node_home -->|"renders"| node_hoc_examples
node_theme_hook -->|"reads context"| node_context
node_connected -->|"uses actions"| node_counter_feature
node_app -->|"provides store"| node_store
node_app -->|"configures router"| node_router

click node_app "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/app.tsx"
click node_home "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/routes/home.tsx"
click node_layout "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/layout/layout.tsx"
click node_counter_examples "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/components/fc-counter.usage.tsx"
click node_class_examples "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/components/class-counter.usage.tsx"
click node_generic_list "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/components/generic-list.usage.tsx"
click node_hoc_examples "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hoc/with-state.tsx"
click node_context "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/context/theme-context.ts"
click node_theme_hook "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hooks/use-theme-context.tsx"
click node_hooks "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hooks/use-reducer.tsx"
click node_connected "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/connected/fc-counter-connected.tsx"
click node_counter_feature "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/features/counters/reducer.ts"
click node_store "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/store/store.ts"
click node_router "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/store/redux-router.ts"
click node_todo_feature "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/features/todos/epics.ts"
click node_typed_todo "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/features/todos-typesafe/actions.ts"
click node_todo_api "https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/api/todos.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_home,node_layout,node_learner toneBlue
class node_counter_examples,node_class_examples,node_generic_list,node_hoc_examples,node_context,node_theme_hook,node_hooks toneAmber
class node_connected,node_counter_feature,node_store,node_router toneMint
class node_todo_feature,node_typed_todo,node_todo_api toneRose
```

## Components

### Playground app

- [App and routes](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/app.tsx): `playground/src/app.tsx`
- [Pattern showcase](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/routes/home.tsx): `playground/src/routes/home.tsx`
- [Page layout](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/layout/layout.tsx): `playground/src/layout/layout.tsx`

### React patterns

- [Counter components](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/components/fc-counter.usage.tsx): `playground/src/components/fc-counter.usage.tsx`
- [Class components](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/components/class-counter.usage.tsx): `playground/src/components/class-counter.usage.tsx`
- [Generic list](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/components/generic-list.usage.tsx): `playground/src/components/generic-list.usage.tsx`
- [Higher-order components](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hoc/with-state.tsx): `playground/src/hoc/with-state.tsx`
- [Theme context](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/context/theme-context.ts): `playground/src/context/theme-context.ts`
- [Theme hook](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hooks/use-theme-context.tsx): `playground/src/hooks/use-theme-context.tsx`
- [React hooks](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/hooks/use-reducer.tsx): `playground/src/hooks/use-reducer.tsx`

### Redux examples

- [Connected components](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/connected/fc-counter-connected.tsx): `playground/src/connected/fc-counter-connected.tsx`
- [Counter feature](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/features/counters/reducer.ts): `playground/src/features/counters/reducer.ts`
- [Redux store](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/store/store.ts): `playground/src/store/store.ts`
- [Router integration](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/store/redux-router.ts): `playground/src/store/redux-router.ts`

### Todo data

- [Todo features](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/features/todos/epics.ts): `playground/src/features/todos/epics.ts`
- [Typed todo feature](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/features/todos-typesafe/actions.ts): `playground/src/features/todos-typesafe/actions.ts`
- [Todo mock API](https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/api/todos.ts): `playground/src/api/todos.ts`

### Other components

- **Playground user**

## Connections

- Playground user → App and routes: opens (evidence: `README.md`)
- App and routes → Pattern showcase: routes to (evidence: `playground/src/app.tsx`)
- App and routes → Page layout: renders (evidence: `playground/src/app.tsx`)
- Pattern showcase → Counter components: renders (evidence: `playground/src/routes/home.tsx`)
- Pattern showcase → Class components: renders (evidence: `playground/src/routes/home.tsx`)
- Pattern showcase → Generic list: renders (evidence: `playground/src/routes/home.tsx`)
- Pattern showcase → Higher-order components: renders (evidence: `playground/src/routes/home.tsx`)
- Theme hook → Theme context: reads context (evidence: `playground/src/hooks/use-theme-context.tsx`)
- Connected components → Counter feature: uses actions
- App and routes → Redux store: provides store (evidence: `playground/src/app.tsx`)
- App and routes → Router integration: configures router (evidence: `playground/src/app.tsx`)
