How shanmukhapriyab/hydrogentrackernew works
Hydrogen Tracker is a role-based application for tracking hydrogen production, storage, orders, shipments, and deliveries. Users sign in, enter a role-specific dashboard, and use operational pages that call the API; the backend persists records in MongoDB and exposes analytics, notifications, and live resource-change events. The graph preserves the major domain areas visible in the tree and index. Some page-to-API links are supported by the SOURCE INDEX rather than inspected source excerpts; unsampled behavior is not inferred beyond those references.
Main entry points: App.tsx Page router · api.ts HTTP API client · server.js API and event server · Layout.tsx Application layout
Components 34
User interface
- Page router
frontend/src/App.tsx - Sign-in
frontend/src/pages/Login.tsx - Application layout
frontend/src/components/Layout.tsx - Producer dashboard
frontend/src/pages/ProducerDashboard.tsx - Production management
frontend/src/pages/ProductionManagement.tsx - Storage management
frontend/src/pages/StorageManagement.tsx - Logistics dashboard
frontend/src/pages/LogisticsDashboard.tsx - Shipment details
frontend/src/pages/ShipmentDetails.tsx - Delivery management
frontend/src/pages/DeliveryManagement.tsx - Customer dashboard
frontend/src/pages/CustomerDashboard.tsx - Admin dashboard
frontend/src/pages/AdminDashboard.tsx - Reports analytics
frontend/src/pages/ReportsAnalytics.tsx - Profile settings
frontend/src/pages/ProfileSettings.tsx - Notifications
frontend/src/pages/Notifications.tsx - HTTP API client
frontend/src/lib/api.ts - Realtime client
frontend/src/lib/realtime.ts
API services
- API and event server
backend/server.js - Production routes
backend/routes/production.js - Storage routes
backend/routes/storage.js - Shipment routes
backend/routes/shipments.js - Analytics routes
backend/routes/analytics.js - Shared resource routes
backend/routes/resource.js - User routes
backend/routes/users.js
Hydrogen operations
- Production records
backend/models/Production.js - Storage records
backend/models/Storage.js - Shipment records
backend/models/Shipment.js - Order records
backend/models/Order.js - Delivery records
backend/models/Delivery.js - Notification records
backend/models/Notification.js
Identity and live data
- Authentication middleware
backend/middleware/auth.js - Authentication routes
backend/routes/auth.js - User records
backend/models/User.js - MongoDB
Other components
- Role-based user
Connections 48
- Role-based user → Sign-in: signs in
- Page router → Sign-in: renders
frontend/src/App.tsx - Page router → Application layout: wraps pages
frontend/src/App.tsx - Page router → Producer dashboard: routes role
frontend/src/App.tsx - Page router → Production management: routes page
frontend/src/App.tsx - Page router → Storage management: routes page
frontend/src/App.tsx - Page router → Logistics dashboard: routes page
frontend/src/App.tsx - Page router → Shipment details: routes page
frontend/src/App.tsx - Page router → Delivery management: routes page
frontend/src/App.tsx - Page router → Customer dashboard: routes role
frontend/src/App.tsx - Page router → Admin dashboard: routes role
frontend/src/App.tsx - Page router → Reports analytics: routes page
frontend/src/App.tsx - Page router → Profile settings: routes page
frontend/src/App.tsx - Page router → Notifications: routes page
frontend/src/App.tsx - Role-based user → Application layout: uses
frontend/src/components/Layout.tsx - Application layout → HTTP API client: requests data
frontend/src/components/Layout.tsx - Application layout → Realtime client: subscribes
frontend/src/components/Layout.tsx - Sign-in → HTTP API client: authenticates
frontend/src/pages/Login.tsx - Producer dashboard → HTTP API client: requests data
frontend/src/pages/ProducerDashboard.tsx - Production management → HTTP API client: requests data
frontend/src/pages/ProductionManagement.tsx - Storage management → HTTP API client: manages tanks
frontend/src/pages/StorageManagement.tsx - Storage management → Realtime client: subscribes
frontend/src/pages/StorageManagement.tsx - Logistics dashboard → HTTP API client: requests data
frontend/src/pages/LogisticsDashboard.tsx - Shipment details → HTTP API client: requests data
frontend/src/pages/ShipmentDetails.tsx - Delivery management → HTTP API client: requests data
frontend/src/pages/DeliveryManagement.tsx - Customer dashboard → HTTP API client: requests data
frontend/src/pages/CustomerDashboard.tsx - Admin dashboard → HTTP API client: requests data
frontend/src/pages/AdminDashboard.tsx - Reports analytics → HTTP API client: requests data
frontend/src/pages/ReportsAnalytics.tsx - Profile settings → HTTP API client: requests data
- Notifications → HTTP API client: requests data
frontend/src/pages/Notifications.tsx - HTTP API client → API and event server: sends HTTP
frontend/src/lib/api.ts - Realtime client → API and event server: opens socket
frontend/src/lib/realtime.ts - API and event server → Authentication routes: mounts routes
backend/server.js - API and event server → Production routes: mounts routes
backend/server.js - API and event server → Storage routes: mounts routes
backend/server.js - API and event server → Shipment routes: mounts routes
backend/server.js - API and event server → Shared resource routes: mounts routes
backend/server.js - API and event server → User routes: mounts routes
backend/server.js - API and event server → Analytics routes: mounts routes
backend/server.js - API and event server → Authentication middleware: protects routes
backend/server.js - Authentication routes → User records: reads users
backend/routes/auth.js - User routes → User records: uses users
backend/routes/users.js - Production routes → Production records: accesses records
backend/routes/production.js - Storage routes → Storage records: reads writes
backend/routes/storage.js - Storage routes → Notification records: creates alerts
backend/routes/storage.js - Shipment routes → Shipment records: accesses records
backend/routes/shipments.js - Analytics routes → Production records: queries
backend/routes/analytics.js - Analytics routes → Storage records: queries
backend/routes/analytics.js