# ksimback/hermes-ecosystem architecture

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

- Interactive diagram: https://gitdiagram.com/ksimback/hermes-ecosystem
- Repository: https://github.com/ksimback/hermes-ecosystem

## Overview

Hermes Atlas is a curated directory and serverless-backed site for discovering Hermes Agent ecosystem projects. The main user flow is browsing/searching the map or asking the RAG chatbot; separate capabilities provide live stars/history and release information. The graph follows documented and excerpted runtime calls, plus documented editorial/build workflows. Static-site frontend source is absent from the supplied tree, so it is represented by the README; unsampled subsystems are kept at exact directory paths with unverified links omitted.

Main entry points: [`api/chat.js`](https://github.com/ksimback/hermes-ecosystem/blob/main/api/chat.js) (Chat endpoint), [`api/stars.js`](https://github.com/ksimback/hermes-ecosystem/blob/main/api/stars.js) (Stars endpoint), [`lib/redis.js`](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/redis.js) (Redis cache), [`lib/llm.js`](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/llm.js) (LLM gateway client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Catalog Discovery"]
  node_site["Atlas site"]
  node_catalog["Curated catalog<br/>[repos.json]"]
  node_usecases["Use-case bundles<br/>[use-case-match.js]"]
end

subgraph group_chat["Atlas Chat"]
  node_chatapi["Chat endpoint<br/>[chat.js]"]
  node_retrieval["RAG ranking<br/>[rag-scoring.js]"]
  node_chunks["Knowledge chunks<br/>[chunk-store.js]"]
  node_llm["LLM gateway client<br/>[llm.js]"]
end

subgraph group_live["Live Data"]
  node_starsapi["Stars endpoint<br/>[stars.js]"]
  node_starfetch["GitHub star fetch<br/>[github-stars.js]"]
  node_history["Star history<br/>[stars-history.js]"]
  node_og["Social previews<br/>[og.js]"]
  node_subscribe["Subscriptions<br/>[subscribe.js]"]
end

subgraph group_content["Content Operations"]
  node_release["Release sync<br/>[release-sync.js]"]
  node_buildpages["Catalog publishing<br/>[build-pages.js]"]
  node_buildchunks["Knowledge-base build<br/>[build-chunks.js]"]
  node_validation["Catalog validation"]
  node_summary["Repo summaries"]
end

subgraph group_shared["Shared Services"]
  node_redis[("Redis cache<br/>[redis.js]")]
  node_latest["Latest release<br/>[latest-release.js]"]
end

node_visitor(("Atlas visitor"))
node_nous{{"Nous Portal"}}
node_github{{"GitHub API"}}

node_visitor -->|"browses"| node_site
node_site -.->|"searches"| node_catalog
node_visitor -->|"asks"| node_chatapi
node_chatapi -->|"loads"| node_chunks
node_chatapi -->|"ranks"| node_retrieval
node_chatapi -->|"matches"| node_usecases
node_chatapi -->|"requests"| node_llm
node_llm -->|"calls"| node_nous
node_visitor -->|"requests stars"| node_starsapi
node_starsapi -->|"fetches"| node_starfetch
node_starfetch -->|"queries"| node_github
node_starsapi -->|"caches"| node_redis
node_visitor -->|"requests history"| node_history
node_history -->|"reads"| node_redis
node_visitor -.->|"requests preview"| node_og
node_og -.->|"reads"| node_redis
node_visitor -.->|"subscribes"| node_subscribe
node_subscribe -.->|"stores"| node_redis
node_buildpages -->|"fetches metadata"| node_github
node_buildpages -->|"validates"| node_validation
node_summary -->|"reads repos"| node_github
node_summary -.->|"generates"| node_llm
node_buildchunks -->|"writes"| node_chunks
node_release -.->|"syncs releases"| node_github
node_starsapi -->|"loads"| node_latest

click node_catalog "https://github.com/ksimback/hermes-ecosystem/blob/main/data/repos.json"
click node_usecases "https://github.com/ksimback/hermes-ecosystem/blob/main/lib/use-case-match.js"
click node_chatapi "https://github.com/ksimback/hermes-ecosystem/blob/main/api/chat.js"
click node_retrieval "https://github.com/ksimback/hermes-ecosystem/blob/main/lib/rag-scoring.js"
click node_chunks "https://github.com/ksimback/hermes-ecosystem/blob/main/lib/chunk-store.js"
click node_llm "https://github.com/ksimback/hermes-ecosystem/blob/main/lib/llm.js"
click node_starsapi "https://github.com/ksimback/hermes-ecosystem/blob/main/api/stars.js"
click node_starfetch "https://github.com/ksimback/hermes-ecosystem/blob/main/lib/github-stars.js"
click node_history "https://github.com/ksimback/hermes-ecosystem/blob/main/api/stars-history.js"
click node_og "https://github.com/ksimback/hermes-ecosystem/blob/main/api/og.js"
click node_subscribe "https://github.com/ksimback/hermes-ecosystem/blob/main/api/subscribe.js"
click node_redis "https://github.com/ksimback/hermes-ecosystem/blob/main/lib/redis.js"
click node_release "https://github.com/ksimback/hermes-ecosystem/blob/main/lib/release-sync.js"
click node_latest "https://github.com/ksimback/hermes-ecosystem/blob/main/lib/latest-release.js"
click node_buildpages "https://github.com/ksimback/hermes-ecosystem/blob/main/scripts/build-pages.js"
click node_buildchunks "https://github.com/ksimback/hermes-ecosystem/blob/main/scripts/build-chunks.js"
click node_validation "https://github.com/ksimback/hermes-ecosystem/blob/main/scripts/validate-repos-json.js"
click node_summary "https://github.com/ksimback/hermes-ecosystem/blob/main/scripts/generate-summaries.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_site,node_catalog,node_usecases toneBlue
class node_chatapi,node_retrieval,node_chunks,node_llm toneAmber
class node_starsapi,node_starfetch,node_history,node_og,node_subscribe,node_github toneMint
class node_release,node_buildpages,node_buildchunks,node_validation,node_summary toneRose
class node_redis,node_latest,node_visitor,node_nous toneIndigo
```

## Components

### Catalog Discovery

- **Atlas site**
- [Curated catalog](https://github.com/ksimback/hermes-ecosystem/blob/main/data/repos.json): `data/repos.json`
- [Use-case bundles](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/use-case-match.js): `lib/use-case-match.js`

### Atlas Chat

- [Chat endpoint](https://github.com/ksimback/hermes-ecosystem/blob/main/api/chat.js): `api/chat.js`
- [RAG ranking](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/rag-scoring.js): `lib/rag-scoring.js`
- [Knowledge chunks](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/chunk-store.js): `lib/chunk-store.js`
- [LLM gateway client](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/llm.js): `lib/llm.js`

### Live Data

- [Stars endpoint](https://github.com/ksimback/hermes-ecosystem/blob/main/api/stars.js): `api/stars.js`
- [GitHub star fetch](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/github-stars.js): `lib/github-stars.js`
- [Star history](https://github.com/ksimback/hermes-ecosystem/blob/main/api/stars-history.js): `api/stars-history.js`
- [Social previews](https://github.com/ksimback/hermes-ecosystem/blob/main/api/og.js): `api/og.js`
- [Subscriptions](https://github.com/ksimback/hermes-ecosystem/blob/main/api/subscribe.js): `api/subscribe.js`

### Content Operations

- [Release sync](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/release-sync.js): `lib/release-sync.js`
- [Catalog publishing](https://github.com/ksimback/hermes-ecosystem/blob/main/scripts/build-pages.js): `scripts/build-pages.js`
- [Knowledge-base build](https://github.com/ksimback/hermes-ecosystem/blob/main/scripts/build-chunks.js): `scripts/build-chunks.js`
- [Catalog validation](https://github.com/ksimback/hermes-ecosystem/blob/main/scripts/validate-repos-json.js): `scripts/validate-repos-json.js`
- [Repo summaries](https://github.com/ksimback/hermes-ecosystem/blob/main/scripts/generate-summaries.js): `scripts/generate-summaries.js`

### Shared Services

- [Redis cache](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/redis.js): `lib/redis.js`
- [Latest release](https://github.com/ksimback/hermes-ecosystem/blob/main/lib/latest-release.js): `lib/latest-release.js`

### Other components

- **Atlas visitor**
- **Nous Portal**
- **GitHub API**

## Connections

- Atlas visitor → Atlas site: browses
- Atlas site → Curated catalog: searches
- Atlas visitor → Chat endpoint: asks
- Chat endpoint → Knowledge chunks: loads (evidence: `api/chat.js`)
- Chat endpoint → RAG ranking: ranks (evidence: `api/chat.js`)
- Chat endpoint → Use-case bundles: matches (evidence: `api/chat.js`)
- Chat endpoint → LLM gateway client: requests (evidence: `api/chat.js`)
- LLM gateway client → Nous Portal: calls
- Atlas visitor → Stars endpoint: requests stars
- Stars endpoint → GitHub star fetch: fetches (evidence: `api/stars.js`)
- GitHub star fetch → GitHub API: queries (evidence: `lib/github-stars.js`)
- Stars endpoint → Redis cache: caches (evidence: `api/stars.js`)
- Atlas visitor → Star history: requests history
- Star history → Redis cache: reads (evidence: `api/stars-history.js`)
- Atlas visitor → Social previews: requests preview
- Social previews → Redis cache: reads (evidence: `api/og.js`)
- Atlas visitor → Subscriptions: subscribes
- Subscriptions → Redis cache: stores (evidence: `api/subscribe.js`)
- Catalog publishing → GitHub API: fetches metadata
- Catalog publishing → Catalog validation: validates (evidence: `scripts/build-pages.js`)
- Repo summaries → GitHub API: reads repos (evidence: `scripts/generate-summaries.js`)
- Repo summaries → LLM gateway client: generates (evidence: `scripts/generate-summaries.js`)
- Knowledge-base build → Knowledge chunks: writes (evidence: `scripts/build-chunks.js`)
- Release sync → GitHub API: syncs releases
- Stars endpoint → Latest release: loads (evidence: `api/stars.js`)
