Skip to content
Marwan Abouzeid
← cd ../projects

wasel

Open source

Production-grade, open-source Arabic AI answer engine with multi-provider LLM routing, tiered auth, and Redis-backed rate limiting.

Source ↗ Live demo ↗ ML & Systems · Security & Offensive Tooling · 2025
  • Next.js
  • TypeScript
  • Vercel AI SDK
  • Supabase
  • Redis
  • Docker
  • CI/CD

wasel (واصل) is an open-source, AI-powered answer engine built for Arabic. It pairs web search with large language models to return streamed, cited answers — rendering sources, images, and follow-up questions inline through a generative UI, with a right-to-left interface and Arabic-aware text handling throughout.

It began as a fork of Morphic and grew into a production system: Arabic localization, multi-provider LLM routing, tiered authentication, Redis-backed rate limiting, and dual-layer storage layered on top of that foundation.

What it does

  • Arabic-first generative UI — streamed answers with inline sources, images, and follow-up questions, in a fully RTL interface.
  • Provider-agnostic routing — selects across OpenAI, Anthropic, Google, DeepSeek, Groq, xAI, Azure OpenAI, Ollama, and any OpenAI-compatible endpoint, configured per-model and switchable from the UI.
  • Tiered access — guest, free, and pro tiers, each with its own quotas.
  • Multiple search backends — Tavily (default), SearXNG, and Exa, plus URL-specific and video search.

Engineering focus

The piece I care most about is the abuse-resistance and reliability layer. wasel enforces plan limits with a sliding-window, tier-based rate-limiting system on Redis (Upstash) that protects the upstream LLM and search APIs under load — the difference between a demo and something that survives real traffic.

  • Rate limiting & caching — Upstash/Redis sliding windows keyed by tier, protecting paid APIs from runaway usage and abuse.
  • Auth & data — Supabase (Postgres, Auth with email/password + Google, RLS), with optional Cloudflare Turnstile CAPTCHA on auth flows.
  • Dual-layer storage — Supabase + Redis, with optional shareable conversations.
  • Shipping — containerized with Docker, deployed via CI/CD to production at wasel.chat; also one-click deployable to Vercel.

Stack

Next.js (App Router, React Server Components) and TypeScript, the Vercel AI SDK for streaming and generative UI, Supabase for auth and persistence, Upstash/Redis for cache and rate limiting, and Tailwind + shadcn/ui on the front end. Licensed under Apache 2.0.