Edura Setup Guide
This guide walks through configuring every service Edura integrates with: Supabase, Gemini AI, RapidAPI translation, Judge0, Google Classroom OAuth, and optional ambient audio for the Focus Room.
Prerequisites
Node.js 18+ and npm
Git
Supabase project (free tier works)
Google AI Studio key for Gemini
RapidAPI account (Deep Translate + optional Judge0 CE endpoint)
Judge0 sandbox (self-hosted Docker or RapidAPI)
Google Cloud project with the Classroom API enabled
1. Clone & Install
git clone <repository-url>
cd csgirlieshack
npm install2. Configure Environment Variables
Copy .env.example to .env and fill in the following values:
Tip: keep
.envout of version control. The repo already ignores it, but double-check before committing.
3. Supabase Setup
Create a project at supabase.com and wait for provisioning.
Database schema:
Open SQL Editor →
+ New queryPaste
supabase-schema.sqlRun the script to create tables, RLS policies, buckets, and helper functions
Storage bucket: The SQL script creates the
notesbucket. If you skipped the script, add it manually via Storage → "Create bucket".API credentials: Project Settings → API. Copy URL + anon key into
.env.
4. External Services
Gemini AI
Visit Google AI Studio
Create an API key and paste it into
VITE_GEMINI_API_KEYAdjust
VITE_GEMINI_MODELif you want a different Gemini model (e.g.,gemini-1.5-flash)
RapidAPI Deep Translate
Subscribe to the Deep Translate API on RapidAPI
Copy the key into
VITE_RAPIDAPI_KEY
Judge0 Sandbox
Choose one of the options:
Self-hosted (recommended for development)
Keep
VITE_JUDGE0_URL=http://localhost:2358Leave
VITE_JUDGE0_HOST/VITE_JUDGE0_KEYblank
RapidAPI Judge0 CE
Subscribe on RapidAPI
Set
VITE_JUDGE0_URL=https://judge0-ce.p.rapidapi.comSet
VITE_JUDGE0_HOST=judge0-ce.p.rapidapi.comSet
VITE_JUDGE0_KEY=<your RapidAPI key>
5. Google Classroom OAuth
Enable the Classroom API in Google Cloud Console
Configure the OAuth consent screen (External) and add required scopes:
https://www.googleapis.com/auth/classroom.courses.readonlyhttps://www.googleapis.com/auth/classroom.coursework.mehttps://www.googleapis.com/auth/classroom.coursework.me.readonlyhttps://www.googleapis.com/auth/userinfo.emailhttps://www.googleapis.com/auth/userinfo.profile
Create OAuth credentials → Web application
Authorized JavaScript origin:
http://localhost:8080Authorized redirect URI:
http://localhost:8080
Copy the generated client ID into
VITE_GOOGLE_CLIENT_ID(Optional but recommended for production) Deploy a Supabase Edge Function that proxies Classroom calls and set
VITE_CLASSROOM_PROXY_URL
6. Optional: Ambient Audio Files
Place custom MP3 files in public/audio with the exact filenames below. The Focus Room will prefer these over synthesized audio:
rain.mp3forest.mp3cafe.mp3white-noise.mp3ocean.mp3space.mp3
7. Start the App
Visit http://localhost:8080.
8. Smoke Tests
Auth + Supabase: Register a user → confirm entry in Supabase Auth &
userstableAI Bot: Open
/ai-bot, submit a question, verify Gemini responseNotes AI: Upload a note on
/notesand generate a summary/flashcardsStudy Planner + Classroom: On
/study-planner, click "Import from Google Classroom" and verify assignments populate the tabs, then generate a scheduleIDE: Open a Monaco editor instance (from a generated course), run code, and confirm Judge0 output
Focus Room audio: Start a sound in
/focus-roomand ensure custom MP3s play (falls back if missing)
Troubleshooting
Supabase / Auth
Supabase credentials not configured: double-check.envand restart dev serverpermission deniedqueries: ensure RLS policies fromsupabase-schema.sqlran successfully
Gemini / Translation
Failed to get response from AI: verify API key, quota, and browser console logs429 Too Many Requests: lower usage or upgrade your quota
Judge0 IDE
Failed to reach execution sandbox: ensure Judge0 Docker container is running or RapidAPI credentials are validCORS errors: confirmVITE_JUDGE0_URLpoints to an accessible HTTPS endpoint in production
Google Classroom
popup_closed_by_user: ensure pop-ups are allowed forlocalhost:8080insufficient permissions: confirm all Classroom scopes are authorized in Google Cloud Console403 rateLimitExceeded: enable caching viaVITE_CLASSROOM_PROXY_URLor reduce refresh frequency
Security Notes
Never commit
.envor share API keys publiclyRotate credentials if you suspect exposure
Restrict Supabase anon key privileges via RLS policies (already configured by
supabase-schema.sql)
Need Help?
Check browser dev tools for errors
Review Supabase logs (Dashboard → Logs)
Re-run
npm installto ensure dependencies are intactOpen an issue or contact the maintainers with detailed logs
Last updated