# isro/api architecture

> Architecture diagram of the GitHub repository isro/api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/isro/api
- Repository: https://github.com/isro/api

## Overview

ISRO API serves five documented, read-only catalog endpoints for spacecraft, launchers, customer satellites, centres, and spacecraft missions. Each endpoint loads its corresponding JSON file and sends that data as the HTTP response; the principal workflow is therefore a client request, endpoint handling, and returned catalog data. A separate handler sends an API welcome message. The sampled code shows direct file-backed responses, not a database or a scraping runtime; the notebook’s role is not established by the excerpts.

Main entry points: [`api/spacecrafts.js`](https://github.com/isro/api/blob/master/api/spacecrafts.js) (Spacecraft endpoint), [`api/launchers.js`](https://github.com/isro/api/blob/master/api/launchers.js) (Launchers endpoint), [`api/customer_satellites.js`](https://github.com/isro/api/blob/master/api/customer_satellites.js) (Customer satellites endpoint), [`api/centres.js`](https://github.com/isro/api/blob/master/api/centres.js) (Centres endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API handlers"]
  node_welcome["Welcome handler<br/>[index.js]"]
  node_spacecrafts["Spacecraft endpoint<br/>[spacecrafts.js]"]
  node_launchers["Launchers endpoint<br/>[launchers.js]"]
  node_satellites["Customer satellites endpoint"]
  node_centres["Centres endpoint<br/>[centres.js]"]
  node_missions["Missions endpoint"]
end

subgraph group_catalogs["Catalog data"]
  node_spacecraft_data["Spacecraft records<br/>[spacecrafts.json]"]
  node_launcher_data["Launcher records<br/>[launchers.json]"]
  node_satellite_data["Customer satellite records"]
  node_centre_data["Centre records<br/>[centres.json]"]
  node_mission_data["Mission records"]
end

node_client(("API client"))

node_client -->|"requests"| node_spacecrafts
node_client -->|"requests"| node_launchers
node_client -->|"requests"| node_satellites
node_client -->|"requests"| node_centres
node_client -->|"requests"| node_missions
node_spacecrafts -->|"loads"| node_spacecraft_data
node_launchers -->|"loads"| node_launcher_data
node_satellites -->|"loads"| node_satellite_data
node_centres -->|"loads"| node_centre_data
node_missions -->|"loads"| node_mission_data
node_spacecrafts -->|"sends response"| node_client
node_launchers -->|"sends response"| node_client
node_satellites -->|"sends response"| node_client
node_centres -->|"sends response"| node_client
node_missions -->|"sends response"| node_client

click node_welcome "https://github.com/isro/api/blob/master/api/index.js"
click node_spacecrafts "https://github.com/isro/api/blob/master/api/spacecrafts.js"
click node_launchers "https://github.com/isro/api/blob/master/api/launchers.js"
click node_satellites "https://github.com/isro/api/blob/master/api/customer_satellites.js"
click node_centres "https://github.com/isro/api/blob/master/api/centres.js"
click node_missions "https://github.com/isro/api/blob/master/api/spacecraft_missions.js"
click node_spacecraft_data "https://github.com/isro/api/blob/master/data/spacecrafts.json"
click node_launcher_data "https://github.com/isro/api/blob/master/data/launchers.json"
click node_satellite_data "https://github.com/isro/api/blob/master/data/customer_satellites.json"
click node_centre_data "https://github.com/isro/api/blob/master/data/centres.json"
click node_mission_data "https://github.com/isro/api/blob/master/data/spacecraft_missions.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_welcome,node_spacecrafts,node_launchers,node_satellites,node_centres,node_missions,node_client toneBlue
class node_spacecraft_data,node_launcher_data,node_satellite_data,node_centre_data,node_mission_data toneAmber
```

## Components

### API handlers

- [Welcome handler](https://github.com/isro/api/blob/master/api/index.js): `api/index.js`
- [Spacecraft endpoint](https://github.com/isro/api/blob/master/api/spacecrafts.js): `api/spacecrafts.js`
- [Launchers endpoint](https://github.com/isro/api/blob/master/api/launchers.js): `api/launchers.js`
- [Customer satellites endpoint](https://github.com/isro/api/blob/master/api/customer_satellites.js): `api/customer_satellites.js`
- [Centres endpoint](https://github.com/isro/api/blob/master/api/centres.js): `api/centres.js`
- [Missions endpoint](https://github.com/isro/api/blob/master/api/spacecraft_missions.js): `api/spacecraft_missions.js`

### Catalog data

- [Spacecraft records](https://github.com/isro/api/blob/master/data/spacecrafts.json): `data/spacecrafts.json`
- [Launcher records](https://github.com/isro/api/blob/master/data/launchers.json): `data/launchers.json`
- [Customer satellite records](https://github.com/isro/api/blob/master/data/customer_satellites.json): `data/customer_satellites.json`
- [Centre records](https://github.com/isro/api/blob/master/data/centres.json): `data/centres.json`
- [Mission records](https://github.com/isro/api/blob/master/data/spacecraft_missions.json): `data/spacecraft_missions.json`

### Other components

- **API client**

## Connections

- API client → Spacecraft endpoint: requests (evidence: `README.md`)
- API client → Launchers endpoint: requests (evidence: `README.md`)
- API client → Customer satellites endpoint: requests (evidence: `README.md`)
- API client → Centres endpoint: requests (evidence: `README.md`)
- API client → Missions endpoint: requests (evidence: `README.md`)
- Spacecraft endpoint → Spacecraft records: loads (evidence: `api/spacecrafts.js`)
- Launchers endpoint → Launcher records: loads (evidence: `api/launchers.js`)
- Customer satellites endpoint → Customer satellite records: loads (evidence: `api/customer_satellites.js`)
- Centres endpoint → Centre records: loads (evidence: `api/centres.js`)
- Missions endpoint → Mission records: loads (evidence: `api/spacecraft_missions.js`)
- Spacecraft endpoint → API client: sends response (evidence: `api/spacecrafts.js`)
- Launchers endpoint → API client: sends response (evidence: `api/launchers.js`)
- Customer satellites endpoint → API client: sends response (evidence: `api/customer_satellites.js`)
- Centres endpoint → API client: sends response (evidence: `api/centres.js`)
- Missions endpoint → API client: sends response (evidence: `api/spacecraft_missions.js`)
