How syafariarigayo/sdm-yayasan-app works
SDM Yayasan is a web app for managing foundation personnel records. Users sign in, then reach a dashboard summarizing personnel by unit and gender or manage SDM records, including PDF attachments. The frontend routes and guards these views; API requests reach an Express server, whose auth and SDM routes use JWT verification and a MySQL connection pool. The README documents the API and database capabilities; some frontend relationships rely on the SOURCE INDEX because not all source was excerpted.
Main entry points: App.jsx Routes and access · server.js Express server · sdm.js SDM endpoints · axios.js API client
Components 15
Web application
- Routes and access
frontend/src/App.jsx - Login screen
frontend/src/pages/Login.jsx - Auth state
frontend/src/context/AuthContext.jsx - Navigation layout
frontend/src/components/Layout.jsx - SDM dashboard
frontend/src/pages/Dashboard.jsx - SDM management
frontend/src/pages/DataSDM.jsx - API client
frontend/src/api/axios.js
Backend API
- Express server
backend/server.js - Auth endpoints
backend/routes/auth.js - SDM endpoints
backend/routes/sdm.js - JWT verification
backend/middleware/auth.js
Persistence
- MySQL connection pool
backend/db.js - MySQL database
PDF files
- Uploaded PDFs
backend/uploads
Other components
- Admin user
Connections 20
- Admin user → Routes and access: uses
frontend/src/App.jsx - Routes and access → Login screen: routes to
frontend/src/App.jsx - Routes and access → Navigation layout: routes to
frontend/src/App.jsx - Routes and access → SDM dashboard: routes to
frontend/src/App.jsx - Routes and access → SDM management: routes to
frontend/src/App.jsx - Routes and access → Auth state: provides auth
frontend/src/App.jsx - Login screen → API client: submits credentials
frontend/src/pages/Login.jsx - Login screen → Auth state: sets session
frontend/src/pages/Login.jsx - Navigation layout → Auth state: reads session
frontend/src/components/Layout.jsx - SDM dashboard → API client: requests SDM
frontend/src/pages/Dashboard.jsx - SDM management → API client: manages records
frontend/src/pages/DataSDM.jsx - API client → Express server: sends API requests
README.md - Express server → Auth endpoints: mounts /auth
backend/server.js - Express server → SDM endpoints: mounts /sdm
backend/server.js - Auth endpoints → MySQL connection pool: queries users
backend/routes/auth.js - SDM endpoints → JWT verification: verifies requests
backend/routes/sdm.js - SDM endpoints → MySQL connection pool: queries SDM
backend/routes/sdm.js - MySQL connection pool → MySQL database: connects to
backend/db.js - SDM endpoints → Uploaded PDFs: stores and deletes PDFs
backend/routes/sdm.js - Express server → Uploaded PDFs: serves uploads
backend/server.js