Is There an API for gods-eye-view? Exploring the Data Architecture

No, gods-eye-view does not expose a public REST or GraphQL API; instead, it is a client-side web application that uses internal Vite proxy endpoints under /api/ to fetch and forward data from external services like OpenSky and CCTV catalogs.

The bilawalsidhu/gods-eye-view repository is a web-based visualization tool for live aviation, traffic, and CCTV data. While it presents a unified interface for tracking aircraft and camera feeds, it does not provide a standalone API for gods-eye-view intended for external developers. The project implements a proxy pattern through its development server to route requests to third-party data sources and avoid CORS restrictions.

Architecture Overview: Frontend-Only with Proxy Middleware

Why There Is No Public API

The application is built as a single-page application (SPA) using Vite. All data fetching occurs in the browser through internal endpoints that are neither documented nor versioned for public consumption. As implemented in bilawalsidhu/gods-eye-view, these routes exist solely to circumvent CORS restrictions and aggregate multiple external sources without exposing a backend service.

The Role of vite.config.js

The proxy configuration resides in vite.config.js. This file defines the mapping between the /api/* routes and their upstream targets, including the OpenSky Network, ADS-B exchange endpoints, and various CCTV JSON feeds. These proxies are active only during the Vite dev server session and are not deployed as standalone API services.

Internal Proxy Endpoints (Not for External Use)

The application exposes several /api/ prefixed routes during development, but these are tightly coupled to the UI and not a public API for gods-eye-view:

  • /api/opensky – Proxies aircraft state vectors from the OpenSky Network
  • /api/cctv – Fetches CCTV metadata and availability catalogs
  • /api/cctv-image – Retrieves actual image blobs from camera URLs via query parameters
  • /api/adsb – Routes ADS-B telemetry requests to upstream providers

These endpoints lack authentication layers, rate limiting documentation, and versioning schemes required for public APIs. They are intermediate pipes between the browser client and external data providers.

Key Source Files and Implementation Details

vite.config.js – Proxy Configuration

This file contains the Vite server middleware setup that intercepts requests beginning with /api/ and forwards them to external hosts. It handles timeouts—typically 8 seconds for OpenSky and 10 seconds for CCTV imagery—along with path rewrites necessary for the OpenSky and CCTV integrations.

src/worldFocus.js and src/camera.js

These modules orchestrate the user interface interactions. In src/worldFocus.js, the application logic triggers data fetches when users change focus regions or select aircraft. The src/camera.js module specifically manages camera imagery retrieval by calling the internal proxy endpoints with dynamic query parameters, then rendering the returned blobs in the viewport.

src/cctvFocusRequest.js

This utility file constructs the specific request URLs for CCTV data. It demonstrates how the client builds queries to /api/cctv with coordinate boundaries and camera IDs, then processes the JSON responses to populate the map interface. This file confirms that the CCTV integration is client-side logic dependent on the proxy infrastructure.

scripts/opensky-import-client.sh

A shell script in the repository demonstrates the server-side import pattern from OpenSky, showing the raw API structure that the proxy ultimately consumes. This script helps developers understand the underlying data schema when building direct integrations outside of the gods-eye-view ecosystem.

Practical Code Examples

The following snippets illustrate how the application accesses its internal proxies. These examples demonstrate the request flow but confirm that the endpoints are designed for internal UI consumption only.

Fetching OpenSky state vectors via the proxy:

// Pattern reflecting logic in src/worldFocus.js
async function fetchOpenSkyStates() {
  // Proxied through Vite dev server to OpenSky Network
  const res = await fetch('/api/opensky', {
    headers: { Accept: 'application/json' },
    signal: AbortSignal.timeout(8000) // 8s timeout defined in vite.config.js
  });
  if (!res.ok) throw new Error('OpenSky fetch failed');
  return await res.json(); // Returns { time, states: [...] }
}

Retrieving CCTV imagery through the image proxy:

// Pattern used in src/camera.js
async function fetchCctvImage(url) {
  // URL parameter passed to internal image proxy
  const proxyUrl = `/api/cctv-image?src=${encodeURIComponent(url)}`;
  const res = await fetch(proxyUrl, {
    signal: AbortSignal.timeout(10000) // 10s timeout
  });
  if (!res.ok) throw new Error('CCTV image fetch failed');
  return await res.blob(); // Returns image blob for <img> tags
}

Accessing Data Without the gods-eye-view API

Since no public API for gods-eye-view exists, developers must interact directly with the underlying sources:

  1. OpenSky Network – Use the official OpenSky REST API at https://opensky-network.org/api/ for aircraft states and tracks instead of the internal /api/opensky proxy.
  2. CCTV Data – Consume the raw JSON catalogs referenced in src/cctvFocusRequest.js directly from their original municipal or highway authority sources.
  3. ADS-B Feeds – Connect to ADS-B exchange APIs or local dump1090 instances rather than routing through the application's proxy layer.

Summary

  • gods-eye-view is a frontend visualization tool, not an API service or backend platform.
  • Data access occurs through internal Vite proxies at /api/* routes that are not documented, versioned, or intended for external use.
  • The proxy configuration lives in vite.config.js and routes to OpenSky, CCTV catalogs, and ADS-B sources with specific timeouts.
  • Client modules like src/camera.js and src/worldFocus.js consume these internal endpoints to render the visualization.
  • Developers seeking programmatic access should use the external data sources directly rather than the application's internal proxies.

Frequently Asked Questions

Does gods-eye-view have a public API endpoint?

No. The application does not expose a documented, versioned public API. The /api/ paths visible in the browser's network tab are development proxies meant solely for the web UI to communicate with external services while avoiding CORS issues. They are defined in vite.config.js and are not stable interfaces.

Can I use the /api/ routes from gods-eye-view in my own application?

No. These routes are internal implementation details. They require the Vite dev server context, may change without notice, and often depend on specific headers or cookies set by the web application. For production use, integrate directly with OpenSky, CelesTrak, or the relevant CCTV data providers instead of relying on these proxies.

How does gods-eye-view fetch live aircraft data?

The application uses the internal /api/opensky proxy endpoint during development, which forwards requests to the OpenSky Network API. The logic in src/worldFocus.js invokes this endpoint with an 8-second timeout to retrieve real-time state vectors for aircraft visualization, parsing the JSON response to update the interface.

Where can I find the backend code for gods-eye-view?

There is no separate backend codebase or server-side API implementation. The server-side logic is limited to the Vite development proxy configuration in vite.config.js and utility scripts such as scripts/opensky-import-client.sh. The architecture is primarily client-side JavaScript running in the browser, making API requests to third-party services through the development proxy.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →