# packtpublishing/react-projects-second-edition architecture

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

- Interactive diagram: https://gitdiagram.com/packtpublishing/react-projects-second-edition
- Repository: https://github.com/packtpublishing/react-projects-second-edition

## Overview

This repository is a book’s collection of React and React Native project examples, not one integrated product. Its principal workflows vary by chapter: users browse project, task, list, hotel, product, or post interfaces; some can submit reviews, posts, or list forms, while other examples provide a game or 3D scene. The graph highlights those distinct product stages and shared app-level routing or state layers. Several capabilities are represented from the README and file tree; where their source was not sampled, links are omitted rather than inferred.

Main entry points: [`Chapter05/src/context/AppContext.js`](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/context/AppContext.js) (List app context), [`Chapter02/src/pages/Projects.js`](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter02/src/pages/Projects.js) (Projects and profile), [`Chapter03/src/pages/Board/Board.js`](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter03/src/pages/Board/Board.js) (Task board), [`Chapter05/src/pages/Lists.js`](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/pages/Lists.js) (Lists)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web applications"]
  node_project_browser["Projects and profile<br/>[Projects.js]"]
  node_project_detail["Project detail<br/>[ProjectDetail.js]"]
  node_task_board["Task board<br/>[Board.js]"]
  node_backlog["Backlog<br/>[Backlog.js]"]
  node_task_data["Task data hook<br/>[useDataFetching.js]"]
  node_lists["Lists<br/>[Lists.js]"]
  node_list_detail["List detail<br/>[ListDetail.js]"]
  node_list_form["List form<br/>[ListForm.js]"]
  node_hotel_browse["Hotel browsing<br/>[Hotels.js]"]
  node_hotel_detail["Hotel detail<br/>[HotelDetail.js]"]
  node_review_form["Review submission<br/>[ReviewForm.js]"]
end

subgraph group_commerce["Commerce and Q&amp;A"]
  node_product_store["Product storefront<br/>[index.js]"]
  node_cart["Shopping cart<br/>[index.js]"]
  node_graphql_api{{"GraphQL API<br/>[index.js]"}}
end

subgraph group_native["Native applications"]
  node_posts["Post feed<br/>[Posts.js]"]
  node_post_detail["Post detail<br/>[PostDetail.js]"]
  node_post_form["Post submission<br/>[PostForm.js]"]
  node_login["Login and session<br/>[Login.js]"]
end

subgraph group_immersive["Interactive experiences"]
  node_game["Game screen<br/>[Game.js]"]
  node_game_result["Game result<br/>[Result.js]"]
  node_scene["3D scene composition<br/>[App.js]"]
end

subgraph group_shared["App state and navigation"]
  node_list_state["List app context<br/>[AppContext.js]"]
  node_review_state["Review state<br/>[ReviewsContext.js]"]
  node_post_state["Post state<br/>[PostsContext.js]"]
  node_user_state["User state<br/>[UserContext.js]"]
end

node_user(("User"))

node_user -->|"browses"| node_project_browser
node_project_browser -->|"opens route"| node_project_detail
node_user -.->|"views board"| node_task_board
node_task_board -->|"loads data"| node_task_data
node_backlog -->|"loads data"| node_task_data
node_user -->|"browses"| node_lists
node_user -->|"opens route"| node_list_detail
node_user -->|"opens form"| node_list_form
node_lists -.->|"uses context"| node_list_state
node_list_detail -.->|"uses context"| node_list_state
node_list_form -.->|"uses context"| node_list_state
node_user -->|"browses"| node_hotel_browse
node_user -->|"opens route"| node_hotel_detail
node_user -.->|"submits review"| node_review_form
node_review_form -->|"adds review"| node_review_state
node_user -.->|"browses products"| node_product_store
node_user -.->|"manages cart"| node_cart
node_product_store -.->|"requests data"| node_graphql_api
node_user -->|"plays"| node_game
node_game -.->|"navigates"| node_game_result
node_user -->|"browses"| node_posts
node_user -->|"opens route"| node_post_detail
node_user -->|"creates post"| node_post_form
node_user -->|"authenticates"| node_login
node_post_form -->|"uses context"| node_post_state
node_posts -.->|"uses context"| node_post_state
node_login -.->|"uses context"| node_user_state
node_user -.->|"views scene"| node_scene

click node_project_browser "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter02/src/pages/Projects.js"
click node_project_detail "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter02/src/pages/ProjectDetail.js"
click node_task_board "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter03/src/pages/Board/Board.js"
click node_backlog "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter03/src/pages/Backlog/Backlog.js"
click node_task_data "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter03/src/hooks/useDataFetching.js"
click node_lists "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/pages/Lists.js"
click node_list_detail "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/pages/ListDetail.js"
click node_list_form "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/pages/ListForm.js"
click node_list_state "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/context/AppContext.js"
click node_hotel_browse "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter06/src/pages/Hotels.js"
click node_hotel_detail "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter06/src/pages/HotelDetail.js"
click node_review_form "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter06/src/pages/ReviewForm.js"
click node_review_state "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter06/src/context/ReviewsContext.js"
click node_product_store "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter07/pages/products/index.js"
click node_cart "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter07/pages/cart/index.js"
click node_graphql_api "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter07/pages/api/graphql/index.js"
click node_game "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter08/screens/Game.js"
click node_game_result "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter08/screens/Result.js"
click node_posts "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/screens/Posts.js"
click node_post_detail "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/screens/PostDetail.js"
click node_post_form "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/screens/PostForm.js"
click node_login "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/screens/Login.js"
click node_post_state "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/context/PostsContext.js"
click node_user_state "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/context/UserContext.js"
click node_scene "https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter10/src/App.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_project_browser,node_project_detail,node_task_board,node_backlog,node_task_data,node_lists,node_list_detail,node_list_form,node_hotel_browse,node_hotel_detail,node_review_form,node_user toneBlue
class node_product_store,node_cart,node_graphql_api toneAmber
class node_posts,node_post_detail,node_post_form,node_login toneMint
class node_game,node_game_result,node_scene toneRose
class node_list_state,node_review_state,node_post_state,node_user_state toneIndigo
```

## Components

### Web applications

- [Projects and profile](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter02/src/pages/Projects.js): `Chapter02/src/pages/Projects.js`
- [Project detail](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter02/src/pages/ProjectDetail.js): `Chapter02/src/pages/ProjectDetail.js`
- [Task board](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter03/src/pages/Board/Board.js): `Chapter03/src/pages/Board/Board.js`
- [Backlog](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter03/src/pages/Backlog/Backlog.js): `Chapter03/src/pages/Backlog/Backlog.js`
- [Task data hook](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter03/src/hooks/useDataFetching.js): `Chapter03/src/hooks/useDataFetching.js`
- [Lists](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/pages/Lists.js): `Chapter05/src/pages/Lists.js`
- [List detail](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/pages/ListDetail.js): `Chapter05/src/pages/ListDetail.js`
- [List form](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/pages/ListForm.js): `Chapter05/src/pages/ListForm.js`
- [Hotel browsing](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter06/src/pages/Hotels.js): `Chapter06/src/pages/Hotels.js`
- [Hotel detail](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter06/src/pages/HotelDetail.js): `Chapter06/src/pages/HotelDetail.js`
- [Review submission](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter06/src/pages/ReviewForm.js): `Chapter06/src/pages/ReviewForm.js`

### Commerce and Q&A

- [Product storefront](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter07/pages/products/index.js): `Chapter07/pages/products/index.js`
- [Shopping cart](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter07/pages/cart/index.js): `Chapter07/pages/cart/index.js`
- [GraphQL API](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter07/pages/api/graphql/index.js): `Chapter07/pages/api/graphql/index.js`

### Native applications

- [Post feed](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/screens/Posts.js): `Chapter09/screens/Posts.js`
- [Post detail](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/screens/PostDetail.js): `Chapter09/screens/PostDetail.js`
- [Post submission](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/screens/PostForm.js): `Chapter09/screens/PostForm.js`
- [Login and session](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/screens/Login.js): `Chapter09/screens/Login.js`

### Interactive experiences

- [Game screen](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter08/screens/Game.js): `Chapter08/screens/Game.js`
- [Game result](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter08/screens/Result.js): `Chapter08/screens/Result.js`
- [3D scene composition](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter10/src/App.js): `Chapter10/src/App.js`

### App state and navigation

- [List app context](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter05/src/context/AppContext.js): `Chapter05/src/context/AppContext.js`
- [Review state](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter06/src/context/ReviewsContext.js): `Chapter06/src/context/ReviewsContext.js`
- [Post state](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/context/PostsContext.js): `Chapter09/context/PostsContext.js`
- [User state](https://github.com/packtpublishing/react-projects-second-edition/blob/main/Chapter09/context/UserContext.js): `Chapter09/context/UserContext.js`

### Other components

- **User**

## Connections

- User → Projects and profile: browses
- Projects and profile → Project detail: opens route (evidence: `Chapter02/src/App.js`)
- User → Task board: views board
- Task board → Task data hook: loads data (evidence: `Chapter03/src/pages/Board/Board.js`)
- Backlog → Task data hook: loads data (evidence: `Chapter03/src/pages/Backlog/Backlog.js`)
- User → Lists: browses
- User → List detail: opens route
- User → List form: opens form
- Lists → List app context: uses context
- List detail → List app context: uses context
- List form → List app context: uses context
- User → Hotel browsing: browses
- User → Hotel detail: opens route
- User → Review submission: submits review
- Review submission → Review state: adds review (evidence: `Chapter06/src/pages/ReviewForm.js`)
- User → Product storefront: browses products
- User → Shopping cart: manages cart
- Product storefront → GraphQL API: requests data
- User → Game screen: plays
- Game screen → Game result: navigates
- User → Post feed: browses
- User → Post detail: opens route
- User → Post submission: creates post
- User → Login and session: authenticates
- Post submission → Post state: uses context (evidence: `Chapter09/screens/PostForm.js`)
- Post feed → Post state: uses context
- Login and session → User state: uses context
- User → 3D scene composition: views scene
