How kottana-chakri/studentrepo_frontend works
This is a React student API tester. A user logs in, then uses the dashboard to list, look up, add, update, or delete students; add and update forms also load course choices. The UI components call a shared Axios client for student and course requests, while login uses a separate fetch request. The excerpts show these calls and configured endpoints; the backend implementation and persistence are outside this repository.
Main entry points: api.js API client · App.jsx Dashboard · Login.jsx Login form · main.jsx React entry
Components 15
Application shell
- React entry
src/main.jsx - Dashboard
src/App.jsx
Authentication
- Login form
src/components/Login.jsx - Browser token storage
Student operations
- List students
src/components/GetAllStudents.jsx - Find student
src/components/GetStudentById.jsx - Add student
src/components/AddStudent.jsx - Update student
src/components/UpdateStudent.jsx - Delete student
src/components/DeleteStudent.jsx
API integration
- API client
src/api.js - API configuration
src/config.js
Other components
- User
- Authentication API
- Student API
- Course API
Connections 21
- User → React entry: opens app
src/main.jsx - React entry → Dashboard: renders
src/main.jsx - Dashboard → Login form: shows when logged out
src/App.jsx - Dashboard → List students: renders when logged in
src/App.jsx - Dashboard → Find student: renders when logged in
src/App.jsx - Dashboard → Add student: renders when logged in
src/App.jsx - Dashboard → Update student: renders when logged in
src/App.jsx - Dashboard → Delete student: renders when logged in
src/App.jsx - Login form → Authentication API: posts credentials
src/components/Login.jsx - Login form → Browser token storage: stores token
src/components/Login.jsx - Dashboard → Browser token storage: removes token
src/App.jsx - List students → API client: requests students
src/components/GetAllStudents.jsx - Find student → API client: requests student
src/components/GetStudentById.jsx - Add student → API client: submits student; loads courses
src/components/AddStudent.jsx - Update student → API client: submits student; loads courses
src/components/UpdateStudent.jsx - Delete student → API client: checks and deletes student
src/components/DeleteStudent.jsx - API client → Student API: sends CRUD requests
src/api.js - API client → Course API: fetches courses
src/api.js - API client → API configuration: reads endpoint settings
src/api.js - Login form → API configuration: reads login endpoint
src/components/Login.jsx - API client → Browser token storage: reads bearer token
src/api.js