Email Form Collector
A form builder that sends forms to recipients through a connected Gmail account and collects responses on an authenticated dashboard, with encrypted stored credentials, CSRF protection and rate limiting throughout.
The Problem
Sending a form from a generic no-reply address gets it ignored or filtered. Delivering it through the sender's own Gmail account, over OAuth rather than stored passwords, keeps the message in a thread the recipient recognizes — which makes the security of the stored credentials the central design concern.
Security model
Because the application holds delegated access to a user's mailbox, security is treated as a first-class concern rather than a later hardening pass.
- Password hashing and JWT session management
- Encrypted storage of connected account credentials
- CSRF protection enforced through a shared dependency
- Sliding-window rate limiter on sensitive endpoints
- Server-side validation and sanitization of every submitted answer
- Gmail access through OAuth, so no account password is ever stored
Backend structure
A FastAPI and SQLAlchemy backend models users, forms, fields, campaigns and responses, with Alembic handling migrations. Routers separate authenticated owner endpoints from the public respondent surface, which takes no authentication at all.
| Router | Surface |
|---|---|
| auth | Registration, login and session management |
| forms | Form CRUD, overview metrics and sending |
| public | Unauthenticated respondent endpoints |
| email_accounts | Gmail OAuth connection flow |
Delivery and testing
Outgoing mail is rendered through a responsive HTML email template before being sent via the Gmail integration. The backend is covered by a 35-test pytest suite, and the frontend is React with TypeScript and Tailwind, built with Vite.
Next Project
LearnSmart — AI Learning Platform