How nazmul19/geofencing-app works
Geofencing App is a multi-tenant web application for managing organizations, users, geofences, routes, and field assignments. Users sign up or log in, then use role-gated dashboards to configure geofences and routes, assign work, check in, and view notifications. The frontend calls a NestJS API backed by PostgreSQL. The sampled source verifies route/geofence management and assignment-to-notification links; unsampled page and service connections are omitted where evidence is unavailable.
Main entry points: App.jsx App routes · orgApi.js Organization API client · ManageRoutes.jsx Route management · auth.service.ts Authentication logic
Components 26
Web experience
- App routes
frontend/src/App.jsx - Auth state
frontend/src/contexts/AuthContext.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Admin dashboard
frontend/src/pages/AdminDashboard.jsx - User management
frontend/src/pages/ManageUsers.jsx - Geofence management
frontend/src/pages/ManageGeofences.jsx - Route management
frontend/src/pages/ManageRoutes.jsx - Assignment management
frontend/src/pages/ManageAssignments.jsx - My assignments
frontend/src/pages/MyAssignments.jsx - Notifications
frontend/src/pages/Notifications.jsx - Organization API client
frontend/src/services/orgApi.js - Map view
frontend/src/components/MapComponent.jsx - Auth API client
frontend/src/services/api.js
Identity and tenancy
- Authentication endpoint
backend/src/auth/auth.controller.ts - Authentication logic
backend/src/auth/auth.service.ts - User service
backend/src/users/users.service.ts - Organization service
backend/src/organizations/organizations.service.ts
Geospatial operations
- Geofence endpoint
backend/src/geofences/geofences.controller.ts - Geofence service
backend/src/geofences/geofences.service.ts - Route endpoint
backend/src/routes/routes.controller.ts - Route service
backend/src/routes/routes.service.ts - Assignment endpoint
backend/src/route-assignments/route-assignments.controller.ts - Assignment service
backend/src/route-assignments/route-assignments.service.ts - Notification service
backend/src/notifications/notifications.service.ts
API and persistence
- PostgreSQL
Other components
- User
Connections 32
- User → App routes: uses
frontend/src/App.jsx - App routes → Auth state: provides auth
frontend/src/App.jsx - App routes → Dashboard: routes to
frontend/src/App.jsx - App routes → Admin dashboard: routes to
frontend/src/App.jsx - App routes → User management: routes to
frontend/src/App.jsx - App routes → Geofence management: routes to
frontend/src/App.jsx - App routes → Route management: routes to
frontend/src/App.jsx - App routes → Assignment management: routes to
frontend/src/App.jsx - App routes → My assignments: routes to
frontend/src/App.jsx - App routes → Notifications: routes to
frontend/src/App.jsx - Auth state → Auth API client: calls
frontend/src/contexts/AuthContext.jsx - Route management → Organization API client: calls
frontend/src/pages/ManageRoutes.jsx - Route management → Map view: renders
frontend/src/pages/ManageRoutes.jsx - Geofence management → Organization API client: calls
frontend/src/pages/ManageGeofences.jsx - Organization API client → Geofence endpoint: HTTP requests
frontend/src/services/orgApi.js - Organization API client → Route endpoint: HTTP requests
frontend/src/services/orgApi.js - Organization API client → Assignment endpoint: HTTP requests
frontend/src/services/orgApi.js - Auth API client → Authentication endpoint: HTTP requests
- Authentication endpoint → Authentication logic: delegates
backend/src/auth/auth.controller.ts - Authentication logic → User service: looks up users
backend/src/auth/auth.service.ts - Authentication logic → Organization service: finds or creates org
backend/src/auth/auth.service.ts - Geofence endpoint → Geofence service: delegates
backend/src/geofences/geofences.controller.ts - Route endpoint → Route service: delegates
backend/src/routes/routes.controller.ts - Route service → Geofence service: resolves geofences
backend/src/routes/routes.service.ts - Assignment endpoint → Assignment service: delegates
backend/src/route-assignments/route-assignments.controller.ts - Assignment service → Notification service: uses
backend/src/route-assignments/route-assignments.service.ts - Geofence service → PostgreSQL: reads and writes
- Route service → PostgreSQL: reads and writes
- User service → PostgreSQL: reads and writes
- Organization service → PostgreSQL: reads and writes
- Assignment service → PostgreSQL: reads and writes
- Notification service → PostgreSQL: reads and writes