API Reference
Public API notes, Supabase data contracts, and integration references for Rashid.
Supabase Database Schema
The Rashid platform uses Supabase for backend services including authentication, real-time data, and file storage. Below are the primary database tables and their contracts.
| Table | Description | Policies |
|---|---|---|
profiles | User profiles with preferences and settings | RLS: users can read/write own row |
projects | Dynamic project entries for the matrix grid | RLS: public read, authenticated write |
lessons | Learning center course content | RLS: public read, admin write |
analytics | Page view and interaction tracking | RLS: service_role only |
Supabase Realtime Channels
Realtime subscriptions are used for live updates on projects and collaborative features.
Listens to INSERT, UPDATE, and DELETE events on the projects table. The admin dashboard uses this channel to reflect changes instantly without page refresh.
Gemini AI Integration
The Rashid AI assistant integrates with the Google Gemini API for conversational AI capabilities.
Request body: { prompt: string, context?: string, model?: string }
The AI supports multilingual responses (Arabic, English, German, French, and more) with streaming support for real-time chat interactions.
Vercel Deployment
The entire Rashid frontend is deployed on Vercel with automatic CI/CD from the GitHub repository. Custom headers and redirects are configured via vercel.json for SEO and SPA routing.