How erenozkan3/adsb-sim-graph works
Main Components
• Frontend (Client):
• Located in the "client" folder, this contains the React application.
• Key directories include “client/src/components” (with MapComponent, ModificationComponent, SliderComponent) and “client/src/pages” (App.jsx, GraphPage.jsx, SimulationPage.jsx).
• This is responsible for the user interface, data visualization (graph and map), and making API calls to the backend.
• Backend (Server):
• Found in the "src" folder, where “App.py” serves as the Flask application entry point.
• Modules like "DataManipulation.py", "DataTypes.py", and "FlightFetcher.py" indicate backend logic for processing simulation parameters, handling flight data, and interacting with the external flight data API.
• The “requirements.txt” document lists dependencies like Flask, Requests, and PyTest, which further confirm the backend functionalities.
• External Flight Data API:
• Simulation and Visualization:
• Although not separate components per se, the simulation logic (altering flight trajectories based on given filters and rate adjustments) runs on the backend, while visualization is handled in the frontend.
Relationships and Data Flow
• The Frontend (React App) sends user input (filters, ICAO24 flight ID, latitude/longitude ranges, etc.) via HTTP requests (probably through Axios) to backend endpoints exposed by the Flask application.
• The Flask Backend receives these API requests, processes the simulation parameters, potentially pulls live data from the adsb.fi API, and returns the simulation outcomes.
• The frontend updates the display, using components like MapComponent for map views and GraphPage/SimulationPage for graphical representations of flight trajectories.
Architectural Patterns and Technologies
• API Communication: Emphasize the REST API interaction between the frontend and backend.
• Microservice-like External Integration: Represent the adsb.fi API as an external service with which the backend communicates.
• Technologies:
• Frontend: React, Axios, Recharts.
• Backend: Flask, Requests (for external API), Python (modules for data manipulation and flight fetching).