Single-page Tally form embed with Discord authentication.
Each URL https://forms.moddy.app/{formId} :
- Checks authentication via
GET /auth/me— redirects tomoddy.app/sign-inif not logged in - Checks the form exists via
GET /tally/forms/{formId}— shows a 404 page if not - Fetches a session hash via
GET /tally/session-hash - Embeds the Tally form with
discord_id,emailandsessionas hidden fields
- Vanilla HTML/JS, no build step
- Material Web for loading spinners
- Hosted on Vercel (
vercel.jsonrewrites all routes toindex.html)
npx serve .
# → http://localhost:3000/{formId}The frontend has no environment variables. It calls:
| Endpoint | Purpose |
|---|---|
https://api.moddy.app/auth/me |
Auth check |
https://api.moddy.app/tally/forms/{formId} |
Form metadata |
https://api.moddy.app/tally/session-hash |
HMAC session hash |
The backend must allow credentials from https://forms.moddy.app in its CORS policy.