Menu

1 / 2

How We Built a Fast, Static Quran & Hadith Website (55,000+ Hadith) with Next.js on Cloudflare Pages

DEV Community: nextjs·Asadullah Hil Galib·about 24 hours ago
#iYDAeYNZ
#devtonextjs#devto#dev#hadith#pages
Reading 0:00
15s threshold

Our team at Edu Reminder builds the Al Quran (★4.6) and Hisnul Muslim (★4.9) Android apps. This year we brought them to the web as ilmhub : the Quran with 44 translations and classical tafsir, 25 hadith books (55,225 hadith), Hisnul Muslim duas, 47 reciters and prayer times. Free, no ads, no accounts.

This post is about the engineering: how to serve a lot of religious text fast, cheaply, and in a way Google can actually index.

The constraints

Fully static. A static export of Next.js deployed to Cloudflare Pages. No server to scale or pay for.

Cloudflare's per-deployment file limit. Every pre-rendered URL costs roughly 8 files (HTML plus RSC prefetch segments). 114 surahs x 6,236 ayahs x 55,225 hadith as individual pages would blow straight through it.

SEO matters. People search for things like "Surah Ya-Sin with Bangla translation" or "Sahih Bukhari online".…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.