Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

How I Built Global Math, an Online Math Learning Platform, on a Zero-Dollar Budget

I'm Abdullah, a high-school student and self-taught full-stack developer from Tanta, Egypt. I built Global Math, an online learning platform for mathematics, using mostly free-tier services. In this article, I'll share t

How I Built Global Math, an Online Math Learning Platform, on a Zero-Dollar Budget

I'm Abdullah, a high-school student and self-taught full-stack developer from Tanta, Egypt. I built Global Math, an online learning platform for mathematics, using mostly free-tier services. In this article, I'll share the architecture, technical challenges, mistakes, and lessons I learned while building and deploying a real-world educational platform on a zero-dollar budget.

The platform is live at https://www.globalmathematics.online/

Global Math home page

What it does

Global Math is a learning management system with three roles: student, teacher and admin. Teachers publish courses, students watch lessons and take exams, and both can talk in real-time chat. It currently hosts a GAT course.

Courses and features

A public course page

The stack

  • Frontend: Next.js, hosted on Vercel
  • API: NestJS with Prisma
  • Database: Postgres on Neon
  • Files and video: Cloudflare R2, served through signed URLs from the API
  • Email: Resend, for verification and password reset codes

Almost everything runs on free tiers. I decided early not to pay for hosting while the platform is small, so I worked around the limits instead of upgrading.

Challenges and what I learned

  1. The API was far from the database. My Render server was in the US and my Neon database was in Germany. After I moved the API to Frankfurt, next to the database, the database round trips I measured from the API dropped from roughly 200-400 ms to 5-10 ms. Earlier speed fixes had already brought the slowest dashboard request from 3.7 s to 0.8 s. Lesson: put your server and database in the same region.

  2. Free servers go to sleep. I use UptimeRobot to ping a health endpoint every 5 minutes. My first attempt, a GitHub Actions cron job, ran only every 4 to 11 hours, so it did not keep the server awake. Lesson: scheduled CI jobs are not reliable timers.

  3. Video without a paid service. Managed video hosting was outside my budget, so I transcode videos in GitHub Actions. In my tests, a 40-minute video took about 30 seconds there, compared with about 30 minutes on Render's free CPU.

  4. Protecting lesson videos. Videos play through signed URLs, show a moving watermark per student, and have no download button. This does not stop someone filming the screen with a phone, but it raises the bar.

  5. A security mistake. I found a database password in my public repository history. I rotated the password and made the repository private. Lesson: check your git history, not only your current files.

What's next

Auto-grading currently covers multiple choice and true/false only. Essay grading, a results page for teachers and online payments are next.

I use an AI assistant for part of the work, and I review what it changes.

My other projects are on GitHub (https://github.com/3bdullahelsherif) and my portfolio is at https://3bdullahelsherif.github.io/

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.