A next-generation AI chat platform combining advanced RAG (Retrieval-Augmented Generation) capabilities with Solana Web3 integration. Anubis Chat enables users to upload documents, create intelligent chatbots, and interact with multiple AI models through a secure, wallet-based authentication system.
- Latest AI Models (August 2025) - GPT-5, Claude Opus 4.1, Gemini 2.5 Pro, and 14+ cutting-edge models
- Dynamic Model Selection - Switch between AI models on-the-fly with rich UI selector
- Multi-Provider Support - Seamless integration with OpenAI, Anthropic, and Google
- Real-time Streaming - Convex HTTP actions for streaming AI responses
- Document RAG System - Upload and query documents with semantic search
- Real-time Chat - Streaming responses with conversation memory
- Typing Indicators - Real-time typing status with automatic cleanup
- Optimistic Updates - Instant UI feedback for better user experience
- Context-Aware Responses - AI leverages uploaded documents for enhanced answers
- Model Persistence - Selected model saved per chat conversation
- Solana wallet authentication - Phantom, Backpack, and more
- Signature-based security - Challenge/nonce verification
- Subscription-ready - On-chain and off-chain verification flows
- TypeScript-first across frontend and backend
- Next.js 15 (App Router) with React 19
- Convex backend for data, auth, and server actions
- PWA with service worker and icon set
- Code quality with Biome and Turborepo
- Multi-format ingestion - Text, Markdown, PDF, URLs
- Semantic search - Vector embeddings and similarity search
- User isolation - Per-wallet document scopes
- Next.js 15 (App Router) + React 19
- TypeScript, Tailwind CSS 4, Shadcn UI
- TanStack Form + Zod validation
- Convex - Real-time backend-as-a-service
- Edge Functions - Serverless query/mutation functions
- Real-time Database - Reactive data synchronization
- Full-text Search - Built-in document search indexes
- Wallet Authentication - Solana signature verification
- JWT Tokens with blacklisting support
- Rate Limiting - Request throttling and abuse prevention
- Input Validation - Zod schemas with ReDoS protection
- Turborepo, Bun, Biome, Husky
- Bun 1.2.19+
- Solana wallet (Phantom recommended)
- Convex account/project
- Clone and install
git clone https://github.com/your-username/anubis-chat.git
cd anubis-chat
bun install- Configure environment
Frontend (apps/web/.env.local):
# Required
NEXT_PUBLIC_CONVEX_URL=https://<your-convex-deployment>.convex.cloud
# Providers (choose one or more)
OPENROUTER_API_KEY=... # preferred for broad model access
OPENAI_API_KEY=... # optional
GOOGLE_GENERATIVE_AI_API_KEY=... # optional
# Solana (client)
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
# Optional
NEXT_PUBLIC_APP_URL=http://localhost:3001Backend (Convex env variables; set via Convex dashboard/CLI):
# Providers
OPENROUTER_API_KEY=...
OPENAI_API_KEY=...
GOOGLE_GENERATIVE_AI_API_KEY=...
# Security / CORS / Rate-limits
ALLOWED_ORIGINS=http://localhost:3001
RATE_LIMIT_MAX_REQUESTS=100
RATE_LIMIT_WINDOW_MS=900000
# Auth / Admin (optional)
ADMIN_WALLETS=<comma-separated-solana-public-keys>
JWT_SECRET=<optional-legacy-only>
# Solana (server)
SOLANA_NETWORK=devnet
SOLANA_RPC_URL=https://api.devnet.solana.com- Initialize Convex
bun dev:setup- Start development
bun dev- Web app: http://localhost:3001
- Docs app: http://localhost:4000 (see
apps/fumadocsbelow)
# Development
bun dev # Start all apps
bun dev:web # Frontend only
bun dev:server # Convex backend only
# Code Quality
bun check # Format + lint (Biome)
bun check-types # TypeScript validation
bun build # Production buildanubis-chat/
βββ apps/
β βββ web/ # Next.js frontend
β β βββ src/app/ # App Router pages and API routes
β β βββ src/components/ # UI components
β β βββ src/lib/ # Utils, env, middleware
β βββ fumadocs/ # Documentation site (Next.js + Fumadocs)
β β βββ ... # Run with: bun -C apps/fumadocs dev
βββ packages/
β βββ backend/
β βββ convex/ # Convex functions and HTTP routes
β βββ http.ts # HTTP router (uploads, streaming, payments)
β βββ streaming.ts # WebSocket + HTTP streaming actions
β βββ files.ts # Uploads and storage
β βββ documents.ts # Document pipeline and CRUD
β βββ rag.ts # RAG retrieval and formatting
β βββ users.ts # User management
β βββ auth.ts # Convex Auth (Solana)
β βββ schema.ts # Data model
βββ turbo.json # Turborepo config
POST /api/chat # Stream chat via AI SDK providers
POST /api/ai/chat # Tool-enabled chat endpoint
GET /api/models # Available model list
GET /api/ai-overview # Providers/feature overview
GET /api/mcp/servers # List MCP servers
GET /api/mcp/servers/[name] # MCP server detail
POST /api/subscriptions/payment # Subscription payment webhook/flow
POST /api/verify-payment # Proxy to Convex payment verification
POST /stream-chat # HTTP streaming fallback
POST /generateUploadUrl # Get upload URL
POST /registerUpload # Persist upload metadata
GET /serveStorage # Serve stored files
POST /verify-payment # Verify Solana payments
# Convex Auth routes are also exposed via httpRouter (see auth.addHttpRoutes)
Note: Most application logic uses Convex queries/mutations/actions directly from the client. The REST-like endpoints above exist for streaming fallback, uploads, and integration surfaces.
- Solana wallet sign-in with nonce challenge (Convex Auth)
- Optional legacy JWT for bridge routes only
- Zod validation across server boundaries
- CORS allowlist with environment-configurable origins
- Rate limiting for HTTP endpoints
- Per-wallet isolation for documents and chats
- Access controls enforced in Convex functions
- Audit-friendly logging via structured logger
- Build
bun build- Deploy Convex
cd packages/backend
npx convex deploy- Deploy Web (e.g., Vercel)
cd apps/web
vercel deploy- Configure Environment
- Set Convex env vars (providers, CORS, Solana, limits) in the Convex dashboard/CLI
- Set web
.env(NEXT_PUBLIC_CONVEX_URL, provider keys as needed)
- Never commit secrets; use environment variables
- Rotate provider keys and JWT secrets regularly if enabled
- Monitor rate limits and model usage
- Keep dependencies updated
- Fork the repository
- Create a branch:
git checkout -b feature/amazing-feature - Add tests and ensure quality:
bun check && bun check-types - Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
MIT β see LICENSE.