How lintaojlu/submarine_cable_information works
1. This repository is a single RedwoodJS web application, not a full client/server app. The architecture is dominated by a static data-driven frontend that renders TeleGeography’s submarine cable map from files in web/public.
2. The primary “data layer” is the web/public/api/v3 tree. It contains prebuilt JSON resources for cables, landing points, countries, suppliers, statuses, ready-for-service years, and search/config metadata. These files are served as static assets from the same origin and are the app’s effective backend.
3. Two GeoJSON datasets are the core map inputs:
- web/public/api/v3/cable/cable-geo.json for cable routes
- web/public/api/v3/landing-point/landing-point-geo.json for landing stations
The README explains these were exported from Illustrator/MAPublisher, so the runtime app consumes curated geography rather than querying a live spatial service.
4. web/src/modules/SubmarineCableMap is the main visualization subsystem. It is the map engine that likely loads the GeoJSON, draws routes and landing points, and reacts to filters/selections. ZoomControl is a supporting map-specific UI component.
5. Application routing is centered in web/src/Routes.js and web/src/App.js. The app is organized into page-level views for the major lookup dimensions: HomePage, SubmarineCablePage, LandingPointPage, CountryPage, SupplierPage, StatusPage, ReadyForServicePage, MultiselectPage, plus error handling pages.
6. Shared state is split into three React contexts:
- MapContext for map viewport/interaction state
- ResultsContext for selected results and filtering/output state
- SearchContext for search and multi-select query state
These contexts are the main in-app data flow mechanism connecting the map, search, and result panels.
7. The “results/search” experience is a second major subsystem beside the map. Components like Search, Multiselect, SelectionList, ResultsHeader, LandingPointList, SubmarineCableList, SupplierList, and SelectAnotherCable work together to let users filter the dataset and browse entity lists.
8. Presentation is layered through reusable layouts:
- AppLayout provides the general shell
- ResultsLayout is used for filtered/detail-result views
Shared chrome components such as Header, Navigation, Share, Sponsors, About, and LastUpdated sit around the main content and make the app feel like a content product rather than a generic dashboard.
9. The repository is content-heavy and largely static at runtime. Individual entity pages almost certainly render from the JSON documents under web/public/api/v3/*, rather than calling external APIs. That means the main data flow is: static JSON → page/context state → map and lists.
10. The search.json and the directory-based entity JSON files imply client-side lookup/indexing. In architecture terms, search is not a remote service; it is a static dataset that the frontend can read and transform locally.
11. Styling/build tooling is standard RedwoodJS frontend infrastructure: Babel, Webpack, PostCSS, Tailwind, Jest, Prettier, and Redwood configuration files. These affect how the app is built and tested, but they do not add extra runtime services.
12. From a diagram perspective, the key boundary is between the static public data package and the interactive React app. Everything user-facing flows from those JSON assets into the route/page layer, through contexts, and into the map, lists, and detail views.
Main entry points: ResultsLayout.js Results shell · Routes.js Routes · SubmarineCableMap.js Cable map · AppLayout.js App shell
Components 34
Static data
Prebuilt JSON datasets served from web/public and consumed as the app's effective backend.
- Cable routes · Curated route geometry for submarine cable paths.
web/public/api/v3/cable/cable-geo.json - Landing points · Curated geometry for landing station points.
web/public/api/v3/landing-point/landing-point-geo.json - Search index · Client-side search metadata and lookup index.
web/public/api/v3/search.json - Config · Application configuration and dataset metadata.
web/public/api/v3/config.json - Countries · Per-country JSON resources.
web/public/api/v3/country - Cables · Per-cable JSON resources.
web/public/api/v3/cable - Landings · Per-landing-point JSON resources.
web/public/api/v3/landing-point - Statuses · Status lookup resources such as in-service and planned.
web/public/api/v3/status - RFS years · Ready-for-service year buckets.
web/public/api/v3/ready-for-service - Suppliers · Supplier lookup resources.
web/public/api/v3/supplier
App shell
RedwoodJS entrypoints, routing, layouts, and shared chrome.
- App · Top-level application composition and providers.
web/src/App.js - Routes · Route definitions and page wiring.
web/src/Routes.js - App shell · Global page chrome and application framing.
web/src/layouts/AppLayout/AppLayout.js - Results shell · Layout for filtered and detail-result views.
web/src/layouts/ResultsLayout/ResultsLayout.js - Header · Top-level branding and navigation entry point.
web/src/components/Header/Header.js - Navigation · Primary site navigation.
web/src/components/Navigation/Navigation.js - Search state · Search and multiselect query state.
web/src/contexts/SearchContext/SearchContext.js - Results state · Selected results and filtering/output state.
web/src/contexts/ResultsContext/ResultsContext.js - Map state · Viewport and map interaction state.
web/src/contexts/MapContext/MapContext.js
Map engine
The submarine cable visualization subsystem and its viewport controls.
- Cable map · Main map renderer for routes, landing points, and selection reactions.
web/src/modules/SubmarineCableMap/SubmarineCableMap.js - Zoom control · Map-specific zoom interaction control.
web/src/components/ZoomControl/ZoomControl.js
Browse and search
Filtering, selection, and list-based result exploration.
- Search · Dataset search interface.
web/src/components/Search/Search.js - Multiselect · Multi-entity selection and query builder.
web/src/components/Multiselect/Multiselect.js - Selection list · Current selected items and removals.
web/src/components/SelectionList/SelectionList.js - Results header · Controls and summary for result views.
web/src/components/ResultsHeader/ResultsHeader.js - Cable list · Browseable list of submarine cables.
web/src/components/SubmarineCableList/SubmarineCableList.js - Landing list · Browseable list of landing points.
web/src/components/LandingPointList/LandingPointList.js - Supplier list · Browseable list of suppliers.
web/src/components/SupplierList/SupplierList.js
Entity pages
Route-level views for the major lookup dimensions and error states.
- Home · Landing page and main entry into the map/product experience.
web/src/pages/HomePage/HomePage.js - Cable page · Cable detail and browsing view.
web/src/pages/SubmarineCablePage/SubmarineCablePage.js - Landing page · Landing point detail and browsing view.
web/src/pages/LandingPointPage/LandingPointPage.js - Country page · Country detail and browsing view.
web/src/pages/CountryPage/CountryPage.js - Supplier page · Supplier detail and browsing view.
web/src/pages/SupplierPage/SupplierPage.js - Status page · Status-based browsing view.
web/src/pages/StatusPage/StatusPage.js
Connections 41
- App → Routes: mounts · App composition hands off to route wiring.
- App → App shell: wraps · Global shell frames the routed content.
- App shell → Header: includes · Shell renders header chrome.
- App shell → Navigation: includes · Shell renders primary navigation.
- Routes → Home: routes to · Home is a primary entry page.
- Routes → Cable page: routes to · Cable detail route.
- Routes → Landing page: routes to · Landing point detail route.
- Routes → Country page: routes to · Country route.
- Routes → Supplier page: routes to · Supplier route.
- Routes → Status page: routes to · Status route.
- Routes → Results shell: uses · Filtered/detail routes share the results layout.
- Home → Cable map: renders · Home centers the interactive cable map.
- Cable page → Results shell: uses · Cable detail view uses the results shell.
- Landing page → Results shell: uses · Landing point detail view uses the results shell.
- Country page → Results shell: uses · Country detail view uses the results shell.
- Supplier page → Results shell: uses · Supplier detail view uses the results shell.
- Status page → Results shell: uses · Status browsing view uses the results shell.
- Results shell → Results header: includes · Result shell provides summary and controls.
- Results shell → Selection list: includes · Selected items panel is part of result views.
- Results shell → Cable list: includes · Cable browsing is part of result views.
- Results shell → Landing list: includes · Landing browsing is part of result views.
- Results shell → Supplier list: includes · Supplier browsing is part of result views.
- Search → Search state: reads/writes · Search UI drives query state.
- Multiselect → Search state: reads/writes · Multiselect UI shares query state.
- Selection list → Results state: reads/writes · Selection management updates results state.
- Results header → Results state: reads · Header summarizes filtered result state.
- Cable map → Map state: reads/writes · Map engine owns viewport and interaction state.
- Cable map → Results state: reads · Map reacts to selections and filter output.
- Cable map → Search state: reads · Map can respond to search/multiselect state.
- Cable map → Cable routes: loads · Cable geometry is a primary map input.
- Cable map → Landing points: loads · Landing point geometry is a primary map input.
- Cable map → Zoom control: includes · Map engine uses the zoom control.
- Search → Search index: loads · Search UI uses the static search index.
- Multiselect → Config: loads · Filtering behavior uses dataset metadata.
- Cable page → Cables: loads · Cable pages render from static cable JSON.
- Landing page → Landings: loads · Landing pages render from static landing-point JSON.
- Country page → Countries: loads · Country pages render from static country JSON.
- Supplier page → Suppliers: loads · Supplier pages render from static supplier JSON.
- Status page → Statuses: loads · Status pages render from static status JSON.
- Home → Config: loads · Home page uses application metadata.
- Results shell → RFS years: loads · Results views can use ready-for-service buckets.