How neta-rose/delivery-app-pathfinding works
Main System Components
a. Frontend (Client Layer):
• Views (OrderPage, HistoryPage)
• Components (Grid, Menu, Navbar, Sidebar)
• Context Providers (Grid, OrderDetails, SelectedRestaurant, Settings)
• API Service Layer
b. Backend (Server Layer):
• Controllers (Customer, DeliveryMan, Menu, Order, Restaurant)
• Services Layer (including Pathfinding Algorithms)
• Data Structures (MinHeapQueue)
• Middleware (Error Handler, Logger)
c. Database Layer:
• Person (base entity)
• Customer
• DeliveryMan
• Restaurant
• Order
• Menu
• Item
Component Relationships and Data Flow
• Frontend to Backend: Use REST API calls (show with HTTP methods)
• Backend to Database: Show TypeORM interactions
• Pathfinding Visualization Flow:
• Grid Component → Pathfinding Algorithms (A*, Dijkstra)
• Algorithm Results → Grid Visualization
Special Architectural Elements
• Pathfinding Algorithm Components:
• A* Implementation
• Dijkstra Implementation
• Grid Structure
• Node Entity
Technical Stack Indicators
• React + TypeScript (Frontend)
• Node.js + Express (Backend)
• PostgreSQL (Database)
• TypeORM (ORM Layer)
• Vite (Build Tool)
Specific Implementation Details
• Grid Visualization Implementation
• Algorithm Selection Mechanism
• Order Processing Flow
• Restaurant-Customer-DeliveryMan Relationship