How sterben-209/logistic works
1. Repo shape
- This repository is not a single application; it contains two mostly separate front-end/code-generation workspaces:
- port_zoning_map/ — a React/Vite geospatial app.
- stitch_ai_yard_pathfinding_system/ — a static HTML/SPA assembly workspace with many generated UI variants and patch scripts.
- The root README.md is effectively empty, so the directory structure is the best source of truth.
2. port_zoning_map runtime
- This is a browser SPA built with React + Vite.
- The runtime entrypoints are src/main.jsx and src/App.jsx, with styling in src/App.css and src/index.css.
- The app centers on two UI components:
- PortZoningMap.jsx for map/zoning visualization.
- FreePortDigitizer.jsx for digitizing or editing port-related geometry.
3. port_zoning_map service boundary
- Business logic is pushed into src/services/, which acts as the integration boundary:
- mapService.js for map-related interactions.
- osmService.js for OpenStreetMap data access.
- routingService.js for route/path calculations.
- supabaseService.js for backend persistence/auth/data access.
- turfService.js for geospatial operations using Turf-style geometry helpers.
- This separation suggests a flow of UI → service layer → external APIs/data store → UI update.
4. port_zoning_map external dependencies
- The main external systems implied by the file tree are:
- OpenStreetMap for basemap or geographic data.
- Supabase as the backend/database boundary.
- Geospatial libraries for computation and shape manipulation.
- supabase_schema.sql defines the database contract, and test_supabase.js / test_route.js indicate validation against those integrations.
5. port_zoning_map data assets
- public/dummy_*.json files provide local sample data for development/demo flows.
- These dummy datasets likely stand in for vehicle, traffic, and CHE/container-handling equipment inputs.
- src/oldViews.js and extract_views.py suggest a migration or refactor path from older UI views into the current component structure.
6. port_zoning_map architectural intent
- The app appears focused on port zoning and spatial digitization rather than generic CRUD.
- The core architectural boundary is between:
- interactive map editing / visualization in the browser, and
- persisted geospatial state in Supabase plus route/OSM services.
7. stitch_ai_yard_pathfinding_system runtime style
- This workspace is more of a static SPA generator / UI assembly toolkit than a conventional app server.
- It contains index.html, map_digitizer.html, dev_server.py, and build_spa.py, suggesting a locally served static site that can be rebuilt or patched.
- The primary output artifacts are the many nexus_terminal_* directories, each containing a code.html snapshot.
8. stitch_ai_yard_pathfinding_system generation pipeline
- The Python scripts (inject_*.py, rewrite_*.py, merge_login.py, fix_*.py) indicate a workflow of programmatic HTML/UI modification.
- These scripts likely:
- inject CRUD/editing logic,
- add Supabase wiring,
- normalize layout/styling,
- and merge or repair feature-specific pages.
- This is a build-time transformation boundary, not a runtime service boundary.
9. stitch_ai_yard_pathfinding_system feature slices
- The nexus_terminal_* folders represent distinct product views or modules:
- admin login / request access,
- analytics,
- container management,
- inventory,
- logistics,
- operations command,
- map digitizer,
- and a 3D stacking heatmap yard UI.
- Architecturally, these look like page-level variants sharing a common design system and data model rather than separately deployed apps.
10. Shared backend theme
- Both subprojects point toward Supabase-backed data persistence and browser-side geospatial/ops tooling.
- There is no obvious custom server-side API in the repository; instead, the architecture is mostly:
- client/UI layer,
- lightweight script/build layer,
- Supabase and other external services.
11. What to draw as the main boundaries
- For an architecture diagram, the key boxes are:
- React/Vite port zoning SPA with service adapters to OSM, routing, Turf, and Supabase.
- Static UI generation workspace that produces multiple terminal-style pages from editable HTML templates.
- Supabase database as the persistence boundary.
- External geospatial/routing sources as read-side dependencies.
12. Overall interpretation
- This repo looks like a logistics/port operations product family with one focused interactive geospatial app and one broader yard/terminal UI prototyping system.
- The main architectural theme is browser-based operational tooling with geospatial logic and Supabase-backed state, supported by a set of scripts for generating and patching UI variants.
Main entry points: services Service layer · nexus_terminal Terminal views · App.jsx Port Zoning SPA · PortZoningMap.jsx Port map
Components 22
port_zoning_map
React/Vite geospatial SPA for port zoning and digitization
- Port Zoning SPA · Browser app for port zoning, map visualization, and geometry editing
port_zoning_map/src/App.jsx - App entry · Main browser entrypoint and app initialization
port_zoning_map/src/main.jsx - Port map · Primary zoning visualization and interaction surface
port_zoning_map/src/components/PortZoningMap.jsx - Digitizer · Geometry capture and port feature editing component
port_zoning_map/src/components/FreePortDigitizer.jsx - Service layer · Client-side adapters for mapping, routing, geospatial logic, and persistence
port_zoning_map/src/services - OSM service · OpenStreetMap access and geographic data lookup
port_zoning_map/src/services/osmService.js - Routing service · Route and path calculation logic
port_zoning_map/src/services/routingService.js - Supabase service · Authentication, persistence, and data access bridge
port_zoning_map/src/services/supabaseService.js - Turf service · Geospatial helpers for geometry and spatial operations
port_zoning_map/src/services/turfService.js - Sample data · Local JSON fixtures for vehicles, traffic, and CHE inputs
port_zoning_map/public/dummy_vehicles.json
stitch_ai_yard_pathfinding_system
Static SPA assembly workspace with generated terminal views and patch scripts
- UI assembly · Static HTML workspace for assembling and serving generated terminal pages
stitch_ai_yard_pathfinding_system/index.html - Dev server · Local static server for previewing the generated SPA
stitch_ai_yard_pathfinding_system/dev_server.py - Build script · Rebuilds or assembles SPA artifacts from templates and patches
stitch_ai_yard_pathfinding_system/build_spa.py - Patch scripts · Injected and rewrite scripts for CRUD, login, editing, layout, and Supabase wiring
stitch_ai_yard_pathfinding_system/inject_supabase.py - Terminal views · Collection of page-level UI variants for operations, analytics, inventory, logistics, and digitizer flows
stitch_ai_yard_pathfinding_system/nexus_terminal - Map digitizer · Standalone digitizer page variant in the terminal UI family
stitch_ai_yard_pathfinding_system/map_digitizer.html - Operations UI · Operations command and spatial yard views among the generated terminal pages
stitch_ai_yard_pathfinding_system/nexus_terminal_operations_command/code.html - Supabase wiring · Generated frontend integration for Supabase-backed workflows
stitch_ai_yard_pathfinding_system/inject_supabase.py
external systems
Databases and third-party geospatial/routing dependencies
- DB schema · Supabase schema and database shape for the port app
port_zoning_map/supabase_schema.sql - Supabase · Shared persistence and authentication boundary
- OpenStreetMap · External geographic basemap and data source
- Geospatial libs · External geometry and turf-style spatial processing libraries
Connections 22
- App entry → Port Zoning SPA: boots · Browser entry initializes the React app
- Port Zoning SPA → Port map: renders · Primary app surface is the zoning map
- Port Zoning SPA → Digitizer: renders · App also exposes digitizing/editing workflows
- Port map → Service layer: uses · Map UI delegates data and spatial work to services
- Digitizer → Service layer: uses · Digitizer relies on integration services for geometry and persistence
- Service layer → OSM service: reads · Service layer fetches map/geographic data
- Service layer → Routing service: calculates · Service layer computes routes and paths
- Service layer → Turf service: processes · Service layer performs geospatial operations
- Service layer → Supabase service: persists · Service layer stores and retrieves app state
- Supabase service → Supabase: connects · Supabase service is the backend boundary
- OSM service → OpenStreetMap: connects · OSM adapter reads external geographic data
- Turf service → Geospatial libs: uses · Geospatial helpers depend on spatial computation libraries
- DB schema → Supabase: defines · SQL schema defines the persistence contract
- Sample data → Port map: seeds · Local JSON fixtures support development and demos
- Dev server → UI assembly: serves · Local server previews the static workspace
- Build script → Terminal views: builds · Build step produces the page variants
- Patch scripts → Terminal views: modifies · Patch scripts rewrite and enrich generated UI pages
- UI assembly → Terminal views: contains · Workspace centers on many generated terminal views
- Map digitizer → Terminal views: belongs to · Digitizer page is one of the generated view variants
- Operations UI → Terminal views: belongs to · Operations command page is one generated variant
- Supabase wiring → Supabase: connects · Generated pages use Supabase for persistence flows
- Terminal views → Supabase wiring: wires · Terminal views are patched with backend integration