Official website for the Data Science Club at the School of Mathematical Sciences, Tribhuvan University.
The site supports club announcements, events, projects, blog posts, certificates, gallery pages, member areas, admin tools, and contact submissions. It uses a Vite/React frontend, a FastAPI backend, and the hosted Supabase project for database and auth.
- Frontend: React, Vite, TypeScript-style TSX, Tailwind utility classes
- Backend: FastAPI under
backend/ - Database/Auth: hosted Supabase
- Database tooling: Supabase CLI for linking, migrations, pull, and push
Install dependencies:
npm installStart the Vite development server:
npm run devThe frontend runs at http://localhost:5173 by default. During local development, Vite proxies /api/* and /health to the FastAPI backend.
Install backend dependencies:
npm run api:installStart the API:
npm run api:devThe API runs at http://127.0.0.1:8001.
Useful endpoints:
GET /healthGET /api/site-settingsGET /api/home-summaryGET /api/eventsGET /api/events/{event_id}GET /api/projectsGET /api/blog-postsPOST /api/contact-messagesGET /api/certificates/verify/{code}
This project is configured for the hosted Mumbai Supabase project. Local/offline Supabase Docker workflows are not part of the supported launch setup.
Copy .env.example values into your own .env.local and .env.api, then set the hosted Supabase URL and keys. Never commit real .env files.
Useful hosted-project commands:
npm run supabase:link
npm run supabase:migrationsMigrations under supabase/migrations remain the source of truth for the hosted database structure. Apply production schema changes intentionally through the linked hosted project; do not start or reset a local Supabase database for this site.
Deploy the frontend and backend separately, with Supabase as the hosted database/auth provider.
Frontend environment variables:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_BASE_URLor the configured API base URL used by the frontend host
Backend environment variables:
APP_ENV=productionSUPABASE_URLSUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYfor server-only privileged operationsADMIN_RPC_SECRETfor protected admin RPC calls, if enabledALLOWED_ORIGINS, comma-separated, for production CORS origins
Example:
ALLOWED_ORIGINS=https://dscsms.com,https://www.dscsms.comNever expose service role keys, admin secrets, .env files, or private user data in frontend code, logs, commits, screenshots, or public hosting settings.
Build the frontend:
npm run buildCheck that the FastAPI app imports:
python -c "from backend.app.main import app; print(app.title)"