How looplj/axonhub works
AxonHub is an AI gateway and administration platform. A client sends a compatible AI request to the server; the gateway translates it for a configured model provider, routes across channels with retry/failover, and returns the result. The repository also includes a web console for authentication, channel/model configuration, access control, analytics, and storage settings. The sampled pipeline and routing code support the runtime shape, while several server integrations and frontend features are represented by documented capabilities or directory-level paths; those links are marked unverified where their implementation was not shown.
Main entry points: main.tsx Admin Web App · gql GraphQL API · pipeline.go Request Pipeline · routes.go HTTP Routes
Components 24
AI Gateway
- HTTP Routes
internal/server/routes.go - API Handlers
internal/server/api - Request Pipeline
llm/pipeline/pipeline.go - Protocol Transformers
llm/transformer - Provider HTTP Client
llm/httpclient/client.go - Provider Channels
internal/server/biz
Management Console
- Admin Web App
frontend/src/main.tsx - Sign-in And Setup
frontend/src/features/auth - Channel Management
frontend/src/features/channels - Model Catalog
frontend/src/features/models - API Key Management
frontend/src/features/apikeys - Analytics Dashboard
frontend/src/features/analytics - Chat Playground
frontend/src/features/chats - GraphQL API
internal/server/gql - Storage Settings
frontend/src/features/data-storages - System Settings
frontend/src/features/system
Identity And Access
- Authentication
internal/server/biz - RBAC And Quotas
internal/authz
Persistence And Operations
- Storage Service
internal/server/biz/data_storage.go - Storage Entity
internal/ent/schema/data_storage.go - SQL Database
- Video Storage Worker
internal/server/video_storage/worker.go
Other components
- SDK Client
- Model Providers
Connections 28
- SDK Client → HTTP Routes: sends requests
README.md - HTTP Routes → API Handlers: routes requests
internal/server/routes.go - API Handlers → Request Pipeline: processes requests
- Request Pipeline → Protocol Transformers: transforms protocols
llm/pipeline/pipeline.go - Request Pipeline → Provider HTTP Client: executes requests
llm/pipeline/pipeline.go - Provider HTTP Client → Model Providers: calls provider
- Request Pipeline → Provider Channels: retries channels
- HTTP Routes → Authentication: protects routes
internal/server/routes.go - Authentication → RBAC And Quotas: checks permissions
internal/server/biz/data_storage_internal.go - SDK Client → Admin Web App: administers platform
README.md - Admin Web App → Sign-in And Setup: offers sign-in
- Admin Web App → Channel Management: configures channels
- Admin Web App → Model Catalog: manages models
- Admin Web App → API Key Management: manages keys
- Admin Web App → Analytics Dashboard: views analytics
- Admin Web App → Chat Playground: opens playground
- Channel Management → GraphQL API: configures channels
- Model Catalog → GraphQL API: manages models
- API Key Management → GraphQL API: manages keys
- Analytics Dashboard → GraphQL API: queries analytics
- Chat Playground → GraphQL API: sends chat requests
- Storage Settings → GraphQL API: reads and writes
frontend/src/features/data-storages/data/data-storages.ts - GraphQL API → Storage Service: manages storage
- Storage Service → Storage Entity: queries and updates
internal/server/biz/data_storage.go - Storage Entity → SQL Database: persists records
internal/ent/schema/data_storage.go - Video Storage Worker → Storage Service: uses storage service
internal/server/video_storage/worker.go - Admin Web App → System Settings: configures system
- System Settings → GraphQL API: updates settings