TSP Algorithm Lab is split into three modules with clear responsibilities.
flowchart TB
subgraph Frontend
PAGES[React pages]
GRAPH[Euclidean graph views]
MAP[Leaflet geographical views]
BATTLE[LLM Battle comparison]
CLIENT[Generated TypeScript API client]
end
subgraph Backend
CONTROLLERS[REST controllers]
SERVICES[Resource and algorithm services]
ALGORITHMS[TSP algorithms]
ADAPTER[OwnTsplibAdapter]
end
subgraph ParserLibrary
PARSER[OwnTsplibParser]
MODEL[TSPLIB data model]
RESOURCES[Benchmark instances and tours]
end
PAGES --> CLIENT
GRAPH --> PAGES
MAP --> PAGES
BATTLE --> PAGES
CLIENT --> CONTROLLERS
CONTROLLERS --> SERVICES
SERVICES --> ALGORITHMS
CONTROLLERS --> ADAPTER
ADAPTER --> PARSER
PARSER --> MODEL
PARSER --> RESOURCES
- The frontend requests instance metadata, an instance, a known tour, or an algorithm result.
- A Spring REST controller validates the route parameters.
ResourceServicediscovers bundled.tspand.tourresources.OwnTsplibAdapterdelegates parsing to the custom parser library.GraphMapperconverts parsed data into the internal graph representation.TspAlgorithmServiceselects the registered Spring algorithm component.- The algorithm returns a
TspSolutioncontaining tour length, path, and runtime. - The frontend visualizes the response as a graph, table, modal, or map.
| Page | Responsibility |
|---|---|
| Home | Project context and navigation |
| Algorithms | Educational comparison of algorithm concepts |
| LLM Battle | Side-by-side comparison of Simulated Annealing implementations |
| Euclidean Instances | Instance table, graph rendering, tours, and algorithm execution |
| Geographical Instances | Leaflet maps, route overlays, and geographic data |
The frontend produces static assets in ealg-react-frontend/assets/. During a full Maven build, the application module copies those assets into the Spring Boot static resource directory inside the generated application artifact.