# nikolajohnny94/react-fastapi-mysql architecture

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

- Interactive diagram: https://gitdiagram.com/nikolajohnny94/react-fastapi-mysql
- Repository: https://github.com/nikolajohnny94/react-fastapi-mysql

## Overview

This is a React/Redux user-management CRUD application backed by FastAPI and MySQL. Users browse and search records, create or edit a user, inspect details, delete records, and export user data as CSV. The browser routes pages; UI components dispatch Redux actions, which call the API and update client state, while FastAPI validates requests and performs database operations. The README documents the stack and CRUD product; some frontend-to-backend HTTP wiring and database details are not shown, so those links are marked unverified or omitted.

Main entry points: [`frontend/src/App.js`](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/App.js) (Routes and shell), [`frontend/src/actions/userAction.js`](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/actions/userAction.js) (User actions), [`backend/main.py`](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/main.py) (FastAPI CRUD), [`frontend/src/layout/pages/CreateUser.js`](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/CreateUser.js) (Create user form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_app["Routes and shell<br/>[App.js]"]
  node_home["User listing<br/>[Home.js]"]
  node_create["Create user form<br/>[CreateUser.js]"]
  node_update["Update user form<br/>[UpdateUser.js]"]
  node_details["User details<br/>[UserPage.js]"]
  node_nav["Navigation and search<br/>[NavComponent.js]"]
  node_footer["Footer<br/>[Footer.js]"]
  node_table["User table<br/>[TableComponent.js]"]
  node_row["User row actions<br/>[TableRow.js]"]
  node_emailcheck["Email validation<br/>[checkEmail.js]"]
  node_csv["CSV export<br/>[csvExport.js]"]
end

subgraph group_state["Client state and actions"]
  node_actions["User actions<br/>[userAction.js]"]
  node_reducer["User state reducer<br/>[userReducer.js]"]
  node_store["Redux store<br/>[store.js]"]
end

subgraph group_api["API and persistence"]
  node_api["FastAPI CRUD<br/>[main.py]"]
  node_schemas["Request and response schemas<br/>[schemas.py]"]
  node_model["User ORM model<br/>[models.py]"]
  node_session["Database session<br/>[db_set.py]"]
  node_dburl["MySQL connection URL"]
  node_mysql[("MySQL database")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_update
node_app -->|"routes to"| node_details
node_app -->|"renders"| node_nav
node_app -->|"renders"| node_footer
node_home -->|"renders"| node_table
node_table -->|"renders"| node_row
node_create -->|"checks email"| node_emailcheck
node_create -->|"dispatches create"| node_actions
node_update -->|"checks email"| node_emailcheck
node_update -->|"dispatches update"| node_actions
node_row -->|"dispatches delete"| node_actions
node_nav -->|"dispatches search"| node_actions
node_nav -->|"exports data"| node_csv
node_actions -.->|"dispatches actions"| node_reducer
node_store -->|"configures"| node_reducer
node_app -->|"provides"| node_store
node_actions -.->|"HTTP CRUD calls"| node_api
node_api -->|"validates responses"| node_schemas
node_api -->|"queries and mutates"| node_model
node_api -->|"uses session"| node_session
node_session -->|"loads URL"| node_dburl
node_api -.->|"reads and writes"| node_mysql

click node_app "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/App.js"
click node_home "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/Home.js"
click node_create "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/CreateUser.js"
click node_update "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/UpdateUser.js"
click node_details "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/UserPage.js"
click node_nav "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/NavComponent.js"
click node_footer "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/Footer.js"
click node_table "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/components/TableComponent.js"
click node_row "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/components/TableRow.js"
click node_emailcheck "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/methods/checkEmail.js"
click node_csv "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/methods/csvExport.js"
click node_actions "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/actions/userAction.js"
click node_reducer "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/reducers/userReducer.js"
click node_store "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/store.js"
click node_api "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/main.py"
click node_schemas "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/schemas.py"
click node_model "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/models.py"
click node_session "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/db_set.py"
click node_dburl "https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/db_connection_url.py"

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_create,node_update,node_details,node_nav,node_footer,node_table,node_row,node_emailcheck,node_csv,node_user toneBlue
class node_actions,node_reducer,node_store toneAmber
class node_api,node_schemas,node_model,node_session,node_dburl,node_mysql toneMint
```

## Components

### User interface

- [Routes and shell](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/App.js): `frontend/src/App.js`
- [User listing](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/Home.js): `frontend/src/layout/pages/Home.js`
- [Create user form](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/CreateUser.js): `frontend/src/layout/pages/CreateUser.js`
- [Update user form](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/UpdateUser.js): `frontend/src/layout/pages/UpdateUser.js`
- [User details](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/pages/UserPage.js): `frontend/src/layout/pages/UserPage.js`
- [Navigation and search](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/NavComponent.js): `frontend/src/layout/NavComponent.js`
- [Footer](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/layout/Footer.js): `frontend/src/layout/Footer.js`
- [User table](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/components/TableComponent.js): `frontend/src/components/TableComponent.js`
- [User row actions](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/components/TableRow.js): `frontend/src/components/TableRow.js`
- [Email validation](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/methods/checkEmail.js): `frontend/src/methods/checkEmail.js`
- [CSV export](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/methods/csvExport.js): `frontend/src/methods/csvExport.js`

### Client state and actions

- [User actions](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/actions/userAction.js): `frontend/src/actions/userAction.js`
- [User state reducer](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/reducers/userReducer.js): `frontend/src/reducers/userReducer.js`
- [Redux store](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/frontend/src/store.js): `frontend/src/store.js`

### API and persistence

- [FastAPI CRUD](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/main.py): `backend/main.py`
- [Request and response schemas](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/schemas.py): `backend/schemas.py`
- [User ORM model](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/models.py): `backend/models.py`
- [Database session](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/db_set.py): `backend/db_set.py`
- [MySQL connection URL](https://github.com/nikolajohnny94/react-fastapi-mysql/blob/master/backend/db_connection_url.py): `backend/db_connection_url.py`
- **MySQL database**

### Other components

- **User**

## Connections

- User → Routes and shell: uses (evidence: `frontend/src/App.js`)
- Routes and shell → User listing: routes to (evidence: `frontend/src/App.js`)
- Routes and shell → Create user form: routes to (evidence: `frontend/src/App.js`)
- Routes and shell → Update user form: routes to (evidence: `frontend/src/App.js`)
- Routes and shell → User details: routes to (evidence: `frontend/src/App.js`)
- Routes and shell → Navigation and search: renders (evidence: `frontend/src/App.js`)
- Routes and shell → Footer: renders (evidence: `frontend/src/App.js`)
- User listing → User table: renders (evidence: `frontend/src/layout/pages/Home.js`)
- User table → User row actions: renders (evidence: `frontend/src/components/TableComponent.js`)
- Create user form → Email validation: checks email (evidence: `frontend/src/layout/pages/CreateUser.js`)
- Create user form → User actions: dispatches create (evidence: `frontend/src/layout/pages/CreateUser.js`)
- Update user form → Email validation: checks email (evidence: `frontend/src/layout/pages/UpdateUser.js`)
- Update user form → User actions: dispatches update (evidence: `frontend/src/layout/pages/UpdateUser.js`)
- User row actions → User actions: dispatches delete (evidence: `frontend/src/components/TableRow.js`)
- Navigation and search → User actions: dispatches search (evidence: `frontend/src/layout/NavComponent.js`)
- Navigation and search → CSV export: exports data (evidence: `frontend/src/layout/NavComponent.js`)
- User actions → User state reducer: dispatches actions
- Redux store → User state reducer: configures (evidence: `frontend/src/store.js`)
- Routes and shell → Redux store: provides (evidence: `frontend/src/App.js`)
- User actions → FastAPI CRUD: HTTP CRUD calls
- FastAPI CRUD → Request and response schemas: validates responses (evidence: `backend/main.py`)
- FastAPI CRUD → User ORM model: queries and mutates (evidence: `backend/main.py`)
- FastAPI CRUD → Database session: uses session (evidence: `backend/main.py`)
- Database session → MySQL connection URL: loads URL (evidence: `backend/db_set.py`)
- FastAPI CRUD → MySQL database: reads and writes
