How mihaeladivoiu/metro-express-app works
Metro Express is a full-stack metro subscription platform. Users register and activate accounts, request subscriptions (with document assistance for special categories), and complete simulated payments; administrators manage users, subscription decisions, support, and analytics. The React client calls a Node/Express API, which owns business operations and accesses MySQL; documented ML capabilities include document validation, predictions, and a hybrid chatbot. Edges reflect sampled calls and explicit README architecture/workflow statements; unsampled features are represented without speculative internal links.
Main entry points: index.js HTTP API · AppRoutes.jsx Role routes · db.js MySQL pool · subscriptionRoutes.js Subscription handling
Components 31
React client
- Role routes
client/src/routes/AppRoutes.jsx - Account access
client/src/pages/auth - Subscriptions & payment
client/src/pages/user - Admin console
client/src/pages/admin - Support
client/src/pages/user/support/Support.jsx - Chat widget
client/src/components/chatbot/ChatbotWidget.jsx - Auth service
client/src/services/authService.js - Subscription service
client/src/services/subscriptionService.js - Payment service
client/src/services/paymentService.js - Admin service
client/src/services/adminService.js - Support service
client/src/services/supportService.js - Chat service
client/src/services/chatbotService.js
Node API
- HTTP API
server/index.js - Registration & activation
server/routes/authRoutes.js - Subscription handling
server/routes/subscriptionRoutes.js - Simulated payments
server/routes/paymentRoutes.js - Admin operations & stats
server/routes/adminRoutes.js - Support requests
server/routes/supportRoutes.js - Notifications
server/routes/notificationRoutes.js - User account operations
server/routes/userRoutes.js - Chat endpoint
server/routes/chatbotRoutes.js
ML services
- FastAPI router
ml-service/app/main.py - Document assistance
ml-service/app/validation_assistance_service.py - Predictions
ml-service/app/prediction_service.py - Hybrid chatbot
ml-service/app/chatbot_service.py - Local knowledge base
ml-service/app/chatbot_knowledge_base.py
Persistence
- MySQL pool
server/db.js
Other components
- User
- Administrator
- MySQL
- OpenAI API
Connections 38
- User → Role routes: uses
README.md - Administrator → Role routes: uses
README.md - Role routes → Account access: routes to
client/src/routes/AppRoutes.jsx - Role routes → Subscriptions & payment: routes to
client/src/routes/AppRoutes.jsx - Role routes → Admin console: routes to
client/src/routes/AppRoutes.jsx - Account access → Auth service: calls
client/src/pages/auth/Login.jsx - Auth service → HTTP API: HTTP requests
client/src/services/authService.js - HTTP API → Registration & activation: dispatches
server/index.js - Subscriptions & payment → Subscription service: calls
client/src/pages/user/subscriptions/Subscriptions.jsx - Subscriptions & payment → Payment service: calls
client/src/pages/user/payment/Payment.jsx - Subscription service → HTTP API: HTTP requests
README.md - Payment service → HTTP API: HTTP requests
README.md - HTTP API → Subscription handling: dispatches
server/index.js - HTTP API → Simulated payments: dispatches
server/index.js - Subscription handling → Simulated payments: creates pending payment
server/routes/subscriptionRoutes.js - Subscription handling → Document assistance: requests validation
README.md - Admin console → Admin service: calls
client/src/pages/admin/stats/AdminStats.jsx - Admin service → HTTP API: HTTP requests
client/src/services/adminService.js - HTTP API → Admin operations & stats: dispatches
server/index.js - Admin operations & stats → Notifications: creates decision notices
README.md - Support → Support service: calls
client/src/pages/user/support/Support.jsx - Support service → HTTP API: HTTP requests
client/src/services/supportService.js - HTTP API → Support requests: dispatches
server/index.js - Chat widget → Chat service: calls
client/src/components/chatbot/ChatbotWidget.jsx - Chat service → HTTP API: HTTP requests
README.md - HTTP API → Chat endpoint: dispatches
server/index.js - Chat endpoint → FastAPI router: forwards questions
README.md - FastAPI router → Hybrid chatbot: registers router
ml-service/app/main.py - Hybrid chatbot → Local knowledge base: uses local answers
ml-service/app/chatbot_service.py - Hybrid chatbot → OpenAI API: optional fallback
README.md - FastAPI router → Document assistance: registers router
ml-service/app/main.py - FastAPI router → Predictions: registers router
ml-service/app/main.py - Admin operations & stats → Predictions: requests forecasts
README.md - Registration & activation → MySQL pool: queries
server/routes/authRoutes.js - Subscription handling → MySQL pool: queries
server/routes/subscriptionRoutes.js - Simulated payments → MySQL pool: queries
server/routes/paymentRoutes.js - Admin operations & stats → MySQL pool: queries
server/routes/adminRoutes.js - MySQL pool → MySQL: connects
server/db.js