How datarishavrathore/fastapi-mysql-ecs works
This is a student-management web application: users view a dashboard, register students, and browse, search, edit, or delete records. The React interface routes these tasks to an Axios client, which communicates with a FastAPI service; the service validates student input and performs CRUD operations against a MySQL database through SQLAlchemy. The tree contains a second, largely duplicated frontend under frontend/src/src, with a different API host; it is shown as a parallel copy. Backend schema and some frontend behavior were not excerpted, so uncertain internal links are omitted.
Main entry points: src/App.jsx Page router · main.py FastAPI service · src/App.jsx Copy page router · api.js HTTP client
Components 18
Web interface
- React entry
frontend/src/main.jsx - Page router
frontend/src/App.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Student registration
frontend/src/pages/CreateStudent.jsx - Student directory
frontend/src/pages/AllStudents.jsx - HTTP client
frontend/src/api/api.js - Copy React entry
frontend/src/src/main.jsx - Copy page router
frontend/src/src/App.jsx - Copy dashboard
frontend/src/src/pages/Dashboard.jsx - Copy registration
frontend/src/src/pages/CreateStudent.jsx - Copy directory
frontend/src/src/pages/AllStudents.jsx - Copy HTTP client
frontend/src/src/api/api.js
Student API
- FastAPI service
backend/app/main.py - Input schema
backend/app/schema.py
Persistence
- Student model
backend/app/models.py - DB session setup
backend/app/database.py - MySQL database
backend/app/database.py
Other components
- User
Connections 22
- User → Page router: uses
- React entry → Page router: renders
frontend/src/main.jsx - Page router → Dashboard: routes to
frontend/src/App.jsx - Page router → Student registration: routes to
frontend/src/App.jsx - Page router → Student directory: routes to
frontend/src/App.jsx - Dashboard → HTTP client: fetches records
frontend/src/pages/Dashboard.jsx - Student registration → HTTP client: submits student
frontend/src/pages/CreateStudent.jsx - Student directory → HTTP client: fetches, deletes
frontend/src/pages/AllStudents.jsx - HTTP client → FastAPI service: HTTP requests
frontend/src/api/api.js - Copy React entry → Copy page router: renders
frontend/src/src/main.jsx - Copy page router → Copy dashboard: routes to
frontend/src/src/App.jsx - Copy page router → Copy registration: routes to
frontend/src/src/App.jsx - Copy page router → Copy directory: routes to
frontend/src/src/App.jsx - Copy dashboard → Copy HTTP client: fetches records
frontend/src/src/pages/Dashboard.jsx - Copy registration → Copy HTTP client: submits student
frontend/src/src/pages/CreateStudent.jsx - Copy directory → Copy HTTP client: fetches records
frontend/src/src/pages/AllStudents.jsx - Copy HTTP client → FastAPI service: HTTP requests
- FastAPI service → Input schema: validates input
backend/app/main.py - FastAPI service → Student model: queries and writes
backend/app/main.py - Student model → DB session setup: uses base
backend/app/models.py - FastAPI service → DB session setup: opens sessions
backend/app/main.py - DB session setup → MySQL database: connects
backend/app/database.py