Dunes International School — Implementation Reference
Server Setup

Install dependencies and set environment variables, then run with gunicorn.

# Install
pip install -r requirements.txt

# Run (production)
gunicorn app:app

# Run (development)
python app.py
Environment Variables (.env)
OLLAMA_API_KEY Your Ollama Cloud API key
ALLOWED_ORIGINS Comma-separated list of domains allowed to access /ask. Add your school website domain here. Localhost entries are for development only.
Embed on Your School Website

Paste before the closing </body> tag. Your domain must be in ALLOWED_ORIGINS on the server.

<!-- ChatDIS Widget -->
<script>
  window.ChatDISConfig = {
    serverUrl: 'https://chatdis-ai.vercel.app/',
    position: 'bottom-right'
  };
</script>
<script src="https://chatdis-ai.vercel.app/static/chatdis-loader.js"></script>
Routes
GET  / This page
GET  /widget Standalone widget iframe (used by the loader)
POST /ask AI endpoint. Body: {"question": "..."} — Rate limited to 5 req/min. CORS-restricted to ALLOWED_ORIGINS.

Dunes International School · Abu Dhabi · Innovate & Excel