How hannakot62/mci works
MCI is a full-stack tool for generating mock transport cargo, identifying MCI units in its packaging hierarchy, and tracking transport through dispatch and delivery. The main workflow runs from setup configuration in the React UI through the Fastify setup API and cargo-generation domain into persistent transport data; users can then inspect the transport tree and update its status. Separate UI branches visualize the cargo hierarchy and expose timing metrics. The tree and sampled files support the route and client connections shown; some internal service-to-repository wiring is not shown where source was unsampled.
Main entry points: App.tsx App shell · setup.routes.ts Setup routes · client.ts API client · createApp.ts Fastify server
Components 20
React interface
- App shell
front/src/App.tsx - Setup panel
front/src/features/setup/useSetupPanel.ts - Transport actions
front/src/features/action-bar/useTransportActions.ts - Cargo tree
front/src/features/cargo-tree/CargoTree.tsx - Timing log
front/src/features/timing-log/useTimingLog.ts - API client
front/src/api/client.ts
Fastify API
- Setup routes
back/src/modules/setup/setup.routes.ts - Transport routes
back/src/modules/transport/transport.routes.ts - Fastify server
back/src/bootstrap/createApp.ts
Transport domain
- Mock cargo generator
back/src/modules/setup/mockCargo.service.ts - Setup validation
back/src/modules/setup/setup.validation.ts - Transport service
back/src/modules/transport/transport.service.ts - Packaging tree builder
back/src/modules/transport/packagingTree.builder.ts - MCI service
back/src/modules/mci/mci.service.ts - MCI repository
back/src/modules/mci/mci.repository.ts - Transport repository
back/src/modules/transport/transport.repository.ts
Timing metrics
- Metrics routes
back/src/modules/metrics/metrics.routes.ts - Timing store
back/src/modules/metrics/timer.store.ts
Other components
- User
- SQLite database
back/src/infrastructure/db/prisma.ts
Connections 23
- User → App shell: uses
- App shell → Setup panel: renders
- App shell → Transport actions: renders
- App shell → Cargo tree: renders
- App shell → Timing log: renders
- Setup panel → API client: requests setup
- Transport actions → API client: requests status
- Cargo tree → API client: loads transport
- Timing log → API client: loads metrics
- API client → Fastify server: sends API requests
- Fastify server → Setup routes: dispatches
- Fastify server → Transport routes: dispatches
- Fastify server → Metrics routes: dispatches
- Setup routes → Setup validation: validates groups
- Setup routes → Mock cargo generator: generates cargo
- Setup routes → SQLite database: reads products
- Setup routes → Transport service: loads locations
- Transport routes → Transport service: loads transports
- Transport routes → MCI service: updates MCI status
- Transport service → Packaging tree builder: builds tree
- Metrics routes → Timing store: reads and clears
- MCI repository → SQLite database: queries and updates
- Transport repository → SQLite database: queries and updates