How nikolajohnny94/react-fastapi-mysql works
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: App.js Routes and shell · userAction.js User actions · main.py FastAPI CRUD · CreateUser.js Create user form
Components 21
User interface
- Routes and shell
frontend/src/App.js - User listing
frontend/src/layout/pages/Home.js - Create user form
frontend/src/layout/pages/CreateUser.js - Update user form
frontend/src/layout/pages/UpdateUser.js - User details
frontend/src/layout/pages/UserPage.js - Navigation and search
frontend/src/layout/NavComponent.js - Footer
frontend/src/layout/Footer.js - User table
frontend/src/components/TableComponent.js - User row actions
frontend/src/components/TableRow.js - Email validation
frontend/src/methods/checkEmail.js - CSV export
frontend/src/methods/csvExport.js
Client state and actions
- User actions
frontend/src/actions/userAction.js - User state reducer
frontend/src/reducers/userReducer.js - Redux store
frontend/src/store.js
API and persistence
- FastAPI CRUD
backend/main.py - Request and response schemas
backend/schemas.py - User ORM model
backend/models.py - Database session
backend/db_set.py - MySQL connection URL
backend/db_connection_url.py - MySQL database
Other components
- User
Connections 25
- User → Routes and shell: uses
frontend/src/App.js - Routes and shell → User listing: routes to
frontend/src/App.js - Routes and shell → Create user form: routes to
frontend/src/App.js - Routes and shell → Update user form: routes to
frontend/src/App.js - Routes and shell → User details: routes to
frontend/src/App.js - Routes and shell → Navigation and search: renders
frontend/src/App.js - Routes and shell → Footer: renders
frontend/src/App.js - User listing → User table: renders
frontend/src/layout/pages/Home.js - User table → User row actions: renders
frontend/src/components/TableComponent.js - Create user form → Email validation: checks email
frontend/src/layout/pages/CreateUser.js - Create user form → User actions: dispatches create
frontend/src/layout/pages/CreateUser.js - Update user form → Email validation: checks email
frontend/src/layout/pages/UpdateUser.js - Update user form → User actions: dispatches update
frontend/src/layout/pages/UpdateUser.js - User row actions → User actions: dispatches delete
frontend/src/components/TableRow.js - Navigation and search → User actions: dispatches search
frontend/src/layout/NavComponent.js - Navigation and search → CSV export: exports data
frontend/src/layout/NavComponent.js - User actions → User state reducer: dispatches actions
- Redux store → User state reducer: configures
frontend/src/store.js - Routes and shell → Redux store: provides
frontend/src/App.js - User actions → FastAPI CRUD: HTTP CRUD calls
- FastAPI CRUD → Request and response schemas: validates responses
backend/main.py - FastAPI CRUD → User ORM model: queries and mutates
backend/main.py - FastAPI CRUD → Database session: uses session
backend/main.py - Database session → MySQL connection URL: loads URL
backend/db_set.py - FastAPI CRUD → MySQL database: reads and writes