# fikrifahrezi25/exodusapi architecture

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

- Interactive diagram: https://gitdiagram.com/fikrifahrezi25/exodusapi
- Repository: https://github.com/fikrifahrezi25/exodusapi
- Video tour (about a minute): https://gitdiagram.com/fikrifahrezi25/exodusapi/video

## Overview

This repository is an Express API gateway exposing Pollinations-backed text, image, and audio features, including OpenAI-compatible model and chat endpoints. The main workflow is an API client request reaching a route, which validates and dispatches it to Pollinations before returning a response. The sampled source shows those route and provider interactions; frontend behavior and other omitted implementation details are not inferred.

Main entry points: [`index.js`](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js) (Express routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API Gateway"]
  node_routes["Express routes<br/>[index.js]"]
  node_model_catalog["Model catalog<br/>[index.js]"]
  node_api_key["API key selection<br/>[index.js]"]
end

subgraph group_features["AI Features"]
  node_chat["Chat completions<br/>[index.js]"]
  node_text["Text generation<br/>[index.js]"]
  node_image["Image generation<br/>[index.js]"]
  node_audio["Audio transcription<br/>[index.js]"]
  node_pollinations["Pollinations API"]
end

subgraph group_docs["API Discovery"]
  node_swagger["Swagger docs<br/>[index.js]"]
end

node_client(("API client"))
node_audio_source(("Audio URL source"))

node_client -->|"sends request"| node_routes
node_routes -->|"lists or finds"| node_model_catalog
node_routes -->|"dispatches chat"| node_chat
node_routes -->|"dispatches text"| node_text
node_routes -->|"dispatches image"| node_image
node_routes -->|"dispatches audio"| node_audio
node_chat -->|"selects key"| node_api_key
node_chat -->|"requests completion"| node_pollinations
node_text -->|"selects key"| node_api_key
node_text -->|"requests text"| node_pollinations
node_image -->|"selects key"| node_api_key
node_image -->|"requests image"| node_pollinations
node_audio_source -->|"provides audio"| node_audio
node_audio -->|"requests transcription"| node_pollinations
node_client -->|"opens docs"| node_swagger
node_swagger -->|"serves API schema"| node_client

click node_routes "https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js"
click node_model_catalog "https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js"
click node_api_key "https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js"
click node_chat "https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js"
click node_text "https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js"
click node_image "https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js"
click node_audio "https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js"
click node_swagger "https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js"

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_routes,node_model_catalog,node_api_key,node_client toneBlue
class node_chat,node_text,node_image,node_audio,node_pollinations toneAmber
class node_swagger toneMint
class node_audio_source toneIndigo
```

## Components

### API Gateway

- [Express routes](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js): `index.js`
- [Model catalog](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js): `index.js`
- [API key selection](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js): `index.js`

### AI Features

- [Chat completions](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js): `index.js`
- [Text generation](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js): `index.js`
- [Image generation](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js): `index.js`
- [Audio transcription](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js): `index.js`
- **Pollinations API**

### API Discovery

- [Swagger docs](https://github.com/fikrifahrezi25/exodusapi/blob/main/index.js): `index.js`

### Other components

- **API client**
- **Audio URL source**

## Connections

- API client → Express routes: sends request
- Express routes → Model catalog: lists or finds
- Express routes → Chat completions: dispatches chat
- Express routes → Text generation: dispatches text
- Express routes → Image generation: dispatches image
- Express routes → Audio transcription: dispatches audio
- Chat completions → API key selection: selects key
- Chat completions → Pollinations API: requests completion
- Text generation → API key selection: selects key
- Text generation → Pollinations API: requests text
- Image generation → API key selection: selects key
- Image generation → Pollinations API: requests image
- Audio URL source → Audio transcription: provides audio
- Audio transcription → Pollinations API: requests transcription
- API client → Swagger docs: opens docs
- Swagger docs → API client: serves API schema
