Official Documentation • gstugo.study

GSTU Go Documentation

Everything students, CRs, faculty, and maintainers need: campus features, role isolation, Cloudflare Pages & custom domain DNS setup, and our zero-Blaze 6-digit Email OTP authentication worker.

1. Campus Architecture & Role Isolation

GSTU Go isolates academic data by department and batch so every user sees only what belongs to them:

StudentDepartment & batch-isolated timetable, results, question bank, PDF library, personal calendar & AI Assistant.
Class Representative (CR)Post departmental notices, manage batch routine updates/cancellations, and upload batch materials.
Teacher & ChairmanDepartment teachers group chat, global faculty group, plus Chairman-only inter-department coordination group.
Office StaffSame-department academic notices, calendar exceptions, and CSV routine upload/restoration.
Blood Bank AdminExplicitly appointed middleman workflow protecting patient phone numbers behind pending review & verified donor matching.
Bus Driver & Club AdminLive GPS shuttle broadcasting and club member events/chat management.

2. Core Features Guide

3. Cloudflare Domain, Pages & Resend DNS Setup

Host the documentation site at https://gstugo.study and power transactional OTP emails without upgrading Firebase to Blaze:

A. Deploy Website on Cloudflare Pages

  1. In Cloudflare Dashboard → Workers & Pages → Create → Pages → Connect to Git (or Direct Upload).
  2. Set Build output directory to website (no build command needed).
  3. Under Custom domains, add gstugo.study and www.gstugo.study. Cloudflare automatically creates proxied CNAME records and provisions free SSL.

B. Verify Domain in Resend (for 6-Digit Email OTP)

  1. Create a free account on Resend → Domains → Add Domain → enter gstugo.study (or mail.gstugo.study).
  2. Copy the SPF (TXT/MX), DKIM (TXT), and optional DMARC (TXT) records from Resend into Cloudflare → DNS → Records.
  3. Keep Resend DNS records set to DNS only (Grey Cloud)—do not proxy MX/DKIM records. Wait until Resend shows Verified.

4. Cloudflare Worker Email OTP & Firebase Custom Tokens (No OAuth)

Because Firebase Magic Links expire quickly and often land in spam, cloudflare-worker/ handles 6-digit OTP verification using Cloudflare KV, Resend, and RS256 Firebase Custom Tokens:

Step 1: Create KV & Secrets

cd cloudflare-worker
npx wrangler kv namespace create OTP_STORE
# Paste the returned id into wrangler.toml under [[kv_namespaces]]

npx wrangler secret put RESEND_API_KEY
npx wrangler secret put FIREBASE_SERVICE_ACCOUNT_JSON
npx wrangler deploy

Step 2: Worker Endpoints

Optional Custom Route

Attach auth.gstugo.study/* or api.gstugo.study/* to gstu-go-proxy in Cloudflare → Workers Routes and set PROXY_WORKER_URL in local.properties.

5. Common Setup Checks