How kaiftaslim7-lang/ibm-project works
PassTrack Pro is a visitor-management web app for reception and security teams. Staff authenticate, then use a dashboard to register and find visitors, edit or remove records, toggle check-in status, inspect details, print badges, view occupancy statistics, and export CSV. The React app calls an Express API; controllers apply visitor and account logic through Mongoose models backed by MongoDB, with an in-memory fallback. Edges reflect sampled calls and documented capabilities; some UI feature wiring is documented but not visible in the sampled App excerpt.
Main entry points: App.jsx Dashboard state · server.js Express API server · authRoutes.js Auth routes · api.js API client
Components 21
Web client
- Dashboard state
frontend/src/App.jsx - Login and signup
frontend/src/components/AuthPage.jsx - API client
frontend/src/services/api.js - Visitor list and filters
frontend/src/components/VisitorList.jsx - Visitor edit form
frontend/src/components/VisitorFormModal.jsx - Visitor details
frontend/src/components/VisitorDetailsModal.jsx - Printable badge
frontend/src/components/VisitorBadgeModal.jsx - Delete confirmation
frontend/src/components/DeleteConfirmModal.jsx - KPI cards
frontend/src/components/StatsOverview.jsx - Navigation and export
frontend/src/components/Navbar.jsx
API and access
- Auth routes
backend/routes/authRoutes.js - Account authentication
backend/controllers/authController.js - JWT protection
backend/middleware/authMiddleware.js - Visitor routes
backend/routes/visitorRoutes.js - Express API server
backend/server.js
Visitor operations
- Visitor records and stats
backend/controllers/visitorController.js
Persistence
- Visitor schema
backend/models/Visitor.js - User schema
backend/models/User.js - MongoDB connection
backend/config/db.js
Other components
- Reception / security staff
- MongoDB or memory DB
Connections 26
- Reception / security staff → Login and signup: signs in
frontend/src/components/AuthPage.jsx - Reception / security staff → Dashboard state: manages visits
README.md - Login and signup → API client: submits credentials
frontend/src/components/AuthPage.jsx - Dashboard state → API client: requests visitor data
frontend/src/App.jsx - Dashboard state → Visitor list and filters: renders
frontend/src/App.jsx - Dashboard state → Visitor edit form: renders
frontend/src/App.jsx - Dashboard state → Visitor details: renders
frontend/src/App.jsx - Dashboard state → Printable badge: renders
frontend/src/App.jsx - Dashboard state → Delete confirmation: renders
frontend/src/App.jsx - Dashboard state → KPI cards: renders
frontend/src/App.jsx - Dashboard state → Navigation and export: renders
frontend/src/App.jsx - Visitor list and filters → Dashboard state: sends actions
frontend/src/App.jsx - Visitor edit form → Dashboard state: submits edits
frontend/src/App.jsx - Delete confirmation → Dashboard state: confirms deletion
frontend/src/App.jsx - Navigation and export → Dashboard state: requests export
frontend/src/App.jsx - API client → Express API server: HTTP requests
frontend/src/services/api.js - Express API server → Auth routes: mounts auth routes
backend/server.js - Express API server → Visitor routes: mounts visitor routes
backend/server.js - Auth routes → Account authentication: dispatches auth
backend/routes/authRoutes.js - Auth routes → JWT protection: protects current user
backend/routes/authRoutes.js - Visitor routes → Visitor records and stats: dispatches visitor requests
backend/routes/visitorRoutes.js - Account authentication → User schema: reads and writes users
backend/controllers/authController.js - JWT protection → User schema: loads account
backend/middleware/authMiddleware.js - Visitor records and stats → Visitor schema: queries and updates
backend/controllers/visitorController.js - Express API server → MongoDB connection: connects database
backend/server.js - MongoDB connection → MongoDB or memory DB: connects or falls back
backend/config/db.js