mathly / .env.example
3v324v23's picture
feat: integrate Hugging Face storage for answer images and update related functionality
2a84a2a
Raw History Blame Contribute Delete
2.25 kB
# Optional Supabase authentication. Leave both empty for a public local app.
SUPABASE_URL=
SUPABASE_PUBLISHABLE_KEY=
# Required for class roster management.
SUPABASE_SECRET_KEY=
TEACHER_EMAILS=
DEVELOPER_EMAILS=
# Enables photographed-problem help and checks of saved handwritten answers.
ANTHROPIC_API_KEY=
# MATH_MODEL=claude-opus-5-5
# ---- Open-ended questions and unit quizzes (answers written on paper and photographed) ----
# All of these are needed, plus sign-in (SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, SUPABASE_SECRET_KEY above)
# and ANTHROPIC_API_KEY for the automatic check.
# Before turning them on, apply these Supabase migrations in order:
# supabase/migrations/20261031133254_math_answer_scans.sql (answer photos and the private bucket)
# supabase/migrations/20261031193200_math_answer_grading.sql (automatic checks)
# supabase/migrations/20261103120000_math_answer_scan_decline.sql (declining a phone photo request)
# 1 stores photographed answers (computer and phone on the same account). 0 = off.
MATHLY_ANSWER_SCANS_ENABLED=0
# 0 opens open-ended questions and unit quizzes to students and lets the server check them with AI
# (this spends API tokens). Anything else, or unset, keeps them locked.
MATHLY_OPEN_ENDED_LOCKED=1
# ---- Answer images on Hugging Face (optional) ----
# A private Hugging Face storage bucket for new answer images (photos and the board's hand-ins), instead of
# Supabase Storage: reading them back to grade and show them is then not Supabase egress. Images saved before
# stay in Supabase and are still read from there. Leave empty to keep everything in Supabase.
MATHLY_ANSWER_BUCKET=
# A token that can write to that bucket (on a Space: add it as a secret).
HF_TOKEN=
# ---- Phone notifications for photo requests (app/push.py) ----
# When the computer asks for a photo of an answer, the student's phone gets a notification, even with the app closed.
# Apply supabase/migrations/20261103180000_math_push_subs.sql first. Make a key with: python -m app.push
# Changing the key drops every subscription: each phone has to turn notifications on again.
VAPID_PRIVATE_KEY=
# A contact for the push services, "mailto:...". Default: the first developer's email.
# VAPID_SUBJECT=