← Back to SBUSH Studylogy
OPTIONAL · ADMIN SETUP

Connect SBUSH AI

The study planner, timer, exams and resources work without AI. This optional setup connects SBUSH AI to your Cloudflare account. AI Studio supports six study modes, question-photo analysis, and the global floating assistant.

1. Create a Cloudflare account and enable Workers AI

Open Cloudflare Dashboard. You need to be the site administrator. Workers AI has a daily free allowance, not unlimited usage; check the current pricing and quota before sharing widely.

2. Deploy the included Worker

Install a current Node.js LTS, open Command Prompt inside the cloudflare-study-ai folder and run:

npx wrangler login npx wrangler secret put SBUSH_AI_TOKEN npx wrangler deploy

When prompted for the secret, use a long random value. Keep it private. After deploy, Cloudflare prints a Worker URL ending in .workers.dev.

3. Connect the main SBUSH app

In the main sbush-studylogy folder, copy .env.example to .env, then set:

STUDY_AI_ENDPOINT=https://YOUR-WORKER.YOUR-SUBDOMAIN.workers.dev STUDY_AI_TOKEN=the-same-long-random-secret SESSION_SECRET=another-long-random-secret-for-your-site

Restart the main SBUSH server and open the SBUSH AI page. The status badge should say AI READY.

4. Enable question-photo analysis once

Photo questions use Cloudflare Workers AI model @cf/meta/llama-3.2-11b-vision-instruct. Before its first use, the Cloudflare account owner must accept Meta's model license and acceptable-use policy by making the one-time initial request with prompt: "agree". Follow the exact current steps in the Cloudflare Vision model guide. Do not paste Cloudflare API tokens into SBUSH or GitHub.

Voice input uses the browser microphone/speech recognition feature where supported. Read Aloud uses speech voices available on the learner's device; a Bangla voice may not be installed on every device.

5. Use it responsibly

SBUSH AI Studio follows an NCTB-first study prompt. Question photos are compressed before processing and are not saved to SBUSH data. Microphone audio is not stored by SBUSH; browser speech recognition may use the browser provider. Read Aloud uses device voices and does not use a separate paid TTS service. AI-generated MCQs are original practice only; they are never presented as official Board Questions or inserted into the scored local question bank. It does not contain a complete indexed NCTB textbook archive. For accurate page-specific help, paste a short relevant passage or type the exact question and check the answer against the current book and teacher.

Do not upload private student records or sensitive personal information. Do not publish your token or .env file. Third-party AI usage is subject to Cloudflare’s current limits and terms.