Skip to content

Collectif-Pixel/eryx

Repository files navigation

Eryx

nuxt-image vue-image cloudflare-image typescript-image licence-image


Eryx

AI chat platform with multiple LLMs, streaming responses, and transparent pricing.

  • Multi-Model - Access GPT-OSS, Llama 4, Llama 3.3, and more from a single interface
  • Real-time Streaming - Server-sent events for instant responses
  • Pay-as-you-go - Transparent per-token pricing with usage dashboard
  • Edge-first - Powered by Cloudflare Workers AI for global low-latency inference

Stack

Frontend: Nuxt 4, Vue 3, Nuxt UI, Tailwind CSS, TypeScript Backend: Nitro, Cloudflare Workers, D1 (SQLite), R2 AI: Cloudflare Workers AI (multi-model) Auth: Google OAuth Payments: Lemon Squeezy

Development

Prerequisites

  • Node.js >= 18
  • pnpm, npm, or bun
  • Cloudflare account (for D1, R2, Workers AI)

Setup

pnpm install

Environment Variables

Create .env from .env.example:

GOOGLE_CLIENT_ID=your_google_client_id
LEMONSQUEEZY_API_KEY=your_api_key
LEMONSQUEEZY_WEBHOOK_SECRET=your_webhook_secret
LEMONSQUEEZY_STORE_ID=your_store_id
SESSION_SECRET=min_32_chars_secret

Commands

# Development
pnpm dev              # Dev server on localhost:3000

# Build
pnpm build            # Build for Cloudflare Pages
pnpm preview          # Preview production build

# Database
npx wrangler d1 migrations apply eryx-db

Architecture

app/
├── composables/      # Vue composables (auth, etc.)
├── layouts/          # App layouts
└── pages/            # Routes
    ├── index.vue           # Home / new chat
    ├── chat/[id].vue       # Chat conversation
    ├── dashboard.vue       # Usage analytics
    ├── pricing.vue         # Pricing info
    └── login.vue           # Google OAuth

server/
├── api/
│   ├── auth/         # Authentication endpoints
│   ├── ai/           # Chat completion (streaming & batch)
│   ├── chats/        # Chat CRUD operations
│   ├── subscription/ # Subscription status
│   └── webhook/      # Lemon Squeezy webhooks
├── middleware/       # Auth middleware
└── utils/            # Session management

migrations/           # D1 database schema

Available Models

Model Provider Description
GPT-OSS 120B OpenAI Large general-purpose model
GPT-OSS 20B OpenAI Efficient general-purpose model
Llama 4 Scout 17B Meta Latest Llama architecture
Llama 3.3 70B Meta High-performance open model
Llama 3.1 8B Meta Fast, lightweight model

Deployment

Cloudflare Pages

# Deploy
npx wrangler pages deploy dist

# Or connect GitHub repo for auto-deploy

Wrangler Configuration

Edit wrangler.toml:

[[d1_databases]]
binding = "DB"
database_name = "eryx-db"
database_id = "your-database-id"

[[r2_buckets]]
binding = "UPLOADS"
bucket_name = "eryx-uploads"

[ai]
binding = "AI"

API Endpoints

Method Endpoint Description
POST /api/auth Google OAuth login
GET /api/auth/me Current user info
POST /api/ai/chat-stream Streaming chat completion
GET /api/chats List user's chats
POST /api/chats Create new chat
GET /api/dashboard Usage analytics
GET /api/subscription/status Subscription status

License

MIT

About

AI chat platform with multiple LLMs, streaming responses, and transparent pricing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors