How tedysuwega/my-dashboard-app works
AdminHub is a demo user-management dashboard with in-memory dummy data, not a database-backed service. An administrator views user records and summary cards, searches and paginates the table, then adds, edits, or deletes users through modal forms; the UI updates local state and displays toast feedback. The frontend fetches the user list and submits mutations to the API, served by Fastify locally or a Vercel function in production. The README documents these runtime modes; relationships to the API handlers are based on that documentation because their source was not excerpted.
Main entry points: App.jsx Dashboard App · users.js Vercel Users Function · AddUserModal.jsx Add User Form · EditUserModal.jsx Edit User Form
Components 15
Dashboard UI
- Dashboard App
frontend/src/App.jsx - Sidebar Navigation
frontend/src/components/Sidebar.jsx - Dashboard Header
frontend/src/components/Header.jsx - User Statistics
frontend/src/components/StatsGrid.jsx
User Operations
- User Table
frontend/src/components/UserTable.jsx - User Data Hook
frontend/src/hooks/useUsers.js - Add User Form
frontend/src/components/AddUserModal.jsx - Edit User Form
frontend/src/components/EditUserModal.jsx - Delete Confirmation
frontend/src/components/DeleteConfirmModal.jsx
API Services
- Local Fastify API
backend/server.js - Vercel Users Function
frontend/api/users.js - Root Users Function
api/users.js
Feedback
- Toast State Hook
frontend/src/hooks/useToast.js - Toast Notifications
frontend/src/components/Toast.jsx
Other components
- Administrator
Connections 29
- Administrator → Dashboard App: uses dashboard
README.md - Dashboard App → Sidebar Navigation: renders
frontend/src/App.jsx - Dashboard App → Dashboard Header: renders
frontend/src/App.jsx - Dashboard App → User Statistics: renders
frontend/src/App.jsx - Dashboard App → User Table: renders
frontend/src/App.jsx - Dashboard App → Add User Form: renders
frontend/src/App.jsx - Dashboard App → Edit User Form: renders
frontend/src/App.jsx - Dashboard App → Delete Confirmation: renders
frontend/src/App.jsx - Dashboard App → User Data Hook: loads and manages
frontend/src/App.jsx - Dashboard App → Toast State Hook: uses notifications
frontend/src/App.jsx - Dashboard App → Toast Notifications: renders
frontend/src/App.jsx - Dashboard App → Dashboard Header: passes user count
frontend/src/App.jsx - Dashboard App → User Statistics: passes users
frontend/src/App.jsx - Dashboard App → User Table: passes users and actions
frontend/src/App.jsx - User Table → Dashboard App: dispatches add edit delete
frontend/src/App.jsx - Add User Form → Dashboard App: returns new user
frontend/src/App.jsx - Edit User Form → Dashboard App: returns updated user
frontend/src/App.jsx - Delete Confirmation → Dashboard App: returns deleted user
frontend/src/App.jsx - Add User Form → Vercel Users Function: posts user
frontend/src/components/AddUserModal.jsx - Edit User Form → Vercel Users Function: updates user
frontend/src/components/EditUserModal.jsx - Delete Confirmation → Vercel Users Function: deletes user
frontend/src/components/DeleteConfirmModal.jsx - User Data Hook → Vercel Users Function: fetches users
frontend/src/hooks/useUsers.js - User Data Hook → Local Fastify API: fetches users locally
README.md - Add User Form → Local Fastify API: posts locally
- Edit User Form → Local Fastify API: updates locally
- Delete Confirmation → Local Fastify API: deletes locally
- Dashboard App → Toast State Hook: adds action feedback
frontend/src/App.jsx - Toast State Hook → Toast Notifications: provides toast state
frontend/src/App.jsx - Vercel Users Function → Root Users Function: deployment relationship unclear