Developer
Architecture
Architecture
Quotio is a native macOS application that integrates with CLIProxyAPI for AI provider management and proxy functionality.
Components
1. The Frontend (macOS App)
- Technology: Swift / SwiftUI.
- Role: Renders the UI, manages user interactions, handles provider connections, and orchestrates CLIProxyAPI.
- State: Manages application state and user preferences.
2. CLIProxyAPI Backend
- Technology: Go (external binary).
- Role:
- Proxy Server: Listens on localhost (8317) for incoming HTTP requests.
- Provider Integration: Handles OAuth flows and API authentication for all supported providers.
- Request Routing: Routes requests to appropriate providers based on configuration.
- Quota Tracking: Monitors usage across all providers.
3. Data Storage
- Configuration: Managed by CLIProxyAPI (YAML config files).
- Secrets: Stored securely in macOS Keychain for provider credentials.
- Usage Data: Tracked by CLIProxyAPI and exposed via management API.
Request Lifecycle
- Ingest: Client (CLI tool) sends request to
http://localhost:8317/v1/chat/completions. - Auth: CLIProxyAPI verifies API key from Quotio's key management.
- Route: CLIProxyAPI selects appropriate provider based on configuration and load balancing.
- Forward: Request is forwarded to the selected AI provider's API.
- Stream: Response is streamed back through CLIProxyAPI to the client.
- Track: Usage statistics are recorded and made available to Quotio frontend.
Security Model
- Localhost Binding: CLIProxyAPI binds only to
127.0.0.1. Not accessible from network. - Encryption: All outbound traffic to providers uses HTTPS (TLS 1.2+).
- API Keys: Stored securely in macOS Keychain.
- No Cloud Sync: All data remains local. No telemetry sent to developers.
Next Steps
Learn how to contribute a new Agent integration.
