One For Education is a movement that helps students in India find scholarships they qualify for. I support it, and I built and look after its website, oneforeducation.reliableailabs.org. A student picks a few details and sees the scholarships that match, in English, Hindi or Marathi. About 200 people from Maharashtra used it in its first month.
The project had no budget, so it had to run on free plans. This is how it is built and what went wrong.
The stack
- Next.js 16 with Tailwind 4 and Drizzle, deployed to Cloudflare Workers through OpenNext.
- Cloudflare D1 for the data: scholarships, admins, sign-ups and page views.
- A small worker wrapper that adds a scheduled handler, so one cron entry at 07:00 IST sends the email queue, prunes old visit rows and writes a heartbeat.
Each language has its own URL (/en, /hi, /mr) so search engines can index all three. When an editor saves a scholarship with the Hindi or Marathi text empty, an AI model drafts a translation in everyday language. That draft is marked as AI text and waits for an admin to approve it. Nothing reaches students without a person checking it.
Living inside the free limits
The Workers free plan allows 100,000 requests a day, and D1 allows 100,000 row writes a day. Every tracked page view is one write, so the visitor counter is the part most likely to hit a limit. It stores no cookies and no IP addresses, only a hash salted daily. It skips bots and prefetches, and it writes after the response is sent so pages stay fast.
Load tests run against the production build on a laptop, never against the live site. A test that worked would use up the day's quota for real students. If traffic grows past the free plan, the paid plan is $5 a month for 10 million requests.
Email alerts with a person in the loop
Students can ask to be emailed when a matching scholarship appears. The path is: sign up (with a consent tick, a rate limit and a bot check), confirm with a button, an admin approves, then one daily summary with at most eight scholarships. Email goes out through a Google Apps Script on a Gmail account, which allows about 100 emails a day. The sender keeps ten of those in reserve for confirmations. Every request to the script is signed, expires after five minutes and can be used only once.
What broke
- Adding a custom domain took the site down. Adding a route in
wrangler.jsoncquietly turned off the workers.dev address the site was still using. The fix is one line,"workers_dev": true. It now sits in the deploy checklist. - Every real email failed for three weeks with "bad signature". Test pings passed because they were plain ASCII. Real emails carried Hindi text, and the script computed its signature over a different encoding than the server did. Sending the payload as escaped ASCII JSON fixed it without redoing any setup. Test pings now include Hindi and an emoji, so this can't hide again.
- Forms leaked fields into the URL. A form with only a submit handler does a plain GET if someone submits before the page's JavaScript loads. Every form now has a real
actionas well. - A stray line break broke a secret. Piping a secret from PowerShell adds a carriage return. Secrets are now pushed from a file and trimmed.
Looking after it
An admin health page runs nine checks and flags the daily job if it is more than 26 hours late. It keeps a log of problems only, and a "copy problem report" button masks student emails. Before any database migration, the live data is exported first. Deploys go out only when the owner says so.