https://github.com/nofendian17/iflow-adapter
https://github.com/nofendian17/iflow-adapter
api-key free-ai-api n8n openai vibec
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nofendian17/iflow-adapter
- Owner: nofendian17
- Created: 2025-11-26T02:11:34.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-12-03T04:09:07.000Z (5 months ago)
- Last Synced: 2025-12-03T18:07:09.346Z (5 months ago)
- Topics: api-key, free-ai-api, n8n, openai, vibec
- Language: Go
- Homepage:
- Size: 46 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iFlow OpenAI Adapter
A high-performance, production-ready middleware service that provides a seamless **OpenAI-compatible interface** for accessing iFlow's advanced AI models. This adapter enables developers to leverage iFlow's powerful language models—including DeepSeek V3, Qwen3 series, Kimi K2, GLM-4.6, and TStars-2.0—without modifying their existing OpenAI integration code.
Built with **Go**, following **Clean Architecture** principles, and designed for scalability and reliability.
## � Documentation
- [**Configuration Guide**](docs/CONFIGURATION.md): Environment variables and settings.
- [**Deployment Guide**](docs/DEPLOYMENT.md): Docker and manual deployment instructions.
- [**API Reference**](docs/API.md): Endpoints, Authentication, and Permissions.
- [**Cookie Login Guide**](docs/COOKIE_LOGIN.md): How to use cookie-based authentication.
- [**Development Guide**](docs/DEVELOPMENT.md): Setup for contributors.
## �🚀 Features
- **OpenAI Compatibility**: Full support for `/v1/chat/completions`, `/v1/models`, and `/v1/completions`.
- **Smart Load Balancing**: Built-in strategies (Round Robin, Random) with health monitoring.
- **High Availability**: Circuit breaker pattern, automatic failover, and account exclusion based on error thresholds.
- **Security**:
- **Authentication**: JWT-based auth, API Key management, and OAuth2 integration.
- **Rate Limiting**: Token bucket algorithm per IP/Path.
- **User Management**:
- **Web Dashboards**: Separate Admin and User dashboards.
- **Self-Service**: User registration, login, and API key generation.
- **Performance**:
- **Streaming**: Real-time Server-Sent Events (SSE).
- **Caching**: Redis integration for high-speed data access.
- **Infrastructure**:
- **Multi-DB Support**: PostgreSQL (recommended) and MySQL.
- **Docker Ready**: Optimized Docker images (Alpine/Distroless).
## 🛠️ Tech Stack
- **Language**: Go (Golang) 1.24+
- **Framework**: Gin Web Framework
- **Databases**: PostgreSQL, MySQL
- **Cache**: Redis
- **Configuration**: Viper
- **Containerization**: Docker, Docker Compose
## 🏁 Quick Start
### 1. Clone the Repository
```bash
git clone https://github.com/nofendian17/iflow-adapter.git
cd iflow-adapter
```
### 2. Start with Docker
```bash
cp .env.example .env
# Edit .env with your settings (see Configuration Guide)
docker-compose up -d
```
### 3. Initialize Data
```bash
# Create Admin User
docker-compose exec iflowadapter /iflowadapter seed admin --email admin@example.com --password secure_password
```
### 4. Access
- **Admin Dashboard**: `http://localhost:8080/admin/login`
- **API Endpoint**: `http://localhost:8080/v1/chat/completions`
## 🤝 Contributing
Contributions are welcome! Please see the [Development Guide](docs/DEVELOPMENT.md) for details.
## 📄 License
[MIT License](LICENSE)