- TypeScript 35.6%
- Astro 30.8%
- MDX 25.8%
- JavaScript 5.8%
- Python 1%
- Other 0.9%
| .forgejo/workflows | ||
| public | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| astro.config.mjs | ||
| components.json | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| requirements-downloads.txt | ||
| tsconfig.json | ||
GuruSetu
GuruSetu is a teacher-learning resource built with Astro. It combines a curated lesson directory with protected video lessons, summaries, mindmaps, highlights, spaced-repetition review, Markdown notes, discussion, reactions, progress tracking, and privacy-aware gamification.
Local development
npm install
cp .env.example .env
npm run dev -- --host 127.0.0.1 --port 4325
Then open http://127.0.0.1:4325.
Configure .env with a Resend API key, verified sender, long random AUTH_SECRET, exact public application origin, and SQLite path. Keep .env out of source control.
For a time-limited reviewer account, set GURUSETU_DEMO_LOGIN_ENABLED=true. This exposes a shared demo@gurusetu.com sign-in button that creates a normal eight-hour session without sending an email. Shared demo activity is visible to other reviewers. Set the flag back to false after review; existing demo sessions are rejected as soon as the flag is disabled.
The private administration area is disabled unless both
GURUSETU_ADMIN_USERNAME and GURUSETU_ADMIN_PASSWORD_HASH are configured at
runtime. Generate the password hash interactively with:
npm run admin:hash-password
Copy only the resulting scrypt$… value into the deployment environment. Do
not store the administrator password or generated hash in the repository. The
admin session lasts four hours and has no persistent “remember me” option.
Content and quality checks
npm run build
npx tsc --noEmit
npm audit --omit=dev
npm run build merges the researched lesson material, validates all summaries and additional resources, validates the flashcard set, verifies downloadable lesson artifacts, and then produces the Astro server build.
Persistence and deployment
The server uses SQLite at GURUSETU_DB_PATH (default .data/gurusetu.sqlite). Production deployments must mount that location on persistent storage and back it up. Set GURUSETU_APP_ORIGIN to the exact HTTPS origin. Leave GURUSETU_TRUST_PROXY=false unless the deployment has a trusted reverse proxy that replaces forwarding headers.
Run the production build with:
npm run build
HOST=0.0.0.0 PORT=4325 node --env-file=.env dist/server/entry.mjs
The included Dockerfile runs the standalone server as an unprivileged user and stores SQLite at /data/gurusetu.sqlite. Mount /data as a persistent volume and keep the service at one replica. The container and Dokploy can use /api/health as a readiness check; it verifies that the process can open and query SQLite.
Forgejo Actions runs the production build, content validators, TypeScript check, and generated-content check for every push and pull request. A successful push to main calls the Dokploy deployment API. Configure these repository Actions values in Forgejo:
- Secret
DOKPLOY_API_TOKEN - Secret
DOKPLOY_APPLICATION_ID - Variable
DOKPLOY_URL
Runtime credentials belong in Dokploy's environment settings. Do not add .env or the SQLite database to the repository.
The activity rules, review scheduling model, privacy behavior, and leaderboard policy are documented in the application at /help/activity.