CupidFaces Technologies
Back to Blog
Technical21 February 2026 · 7 min read

The tech stack behind NaijaBased — built for scale and discoverability

PHP, MySQL, AJAX, Cloudflare CDN, Paystack, and structured schema — a look at the architecture decisions that allow NaijaBased to serve thousands of pages efficiently.

Why we chose PHP for the original stack

When we started building NaijaBased, the priority was moving fast, keeping hosting costs low, and building something that could run on Nigerian infrastructure reliably.

PHP and MySQL fit that requirement perfectly. They run on virtually any hosting environment, have a massive ecosystem of libraries, and the performance ceiling is high enough to handle the scale we're working at.

Database architecture

Every business listing is stored with its full geographic hierarchy — country, state, city — as indexed fields. This means a query for all catering businesses in Lagos is a simple indexed lookup, not a full table scan.

We maintain separate tables for categories, cities, states, and the relationships between them. When we add a new city, it automatically inherits all categories. When we add a new category, it's available in every city instantly.

AJAX for search and filtering

The search and filter experience uses AJAX — so when a user filters by category or city, the page updates without a full reload. A full page reload on a slow mobile connection in Nigeria can take several seconds. An AJAX call that updates just the listing section is near-instant.

Cloudflare CDN

Static assets are served through Cloudflare's CDN. A user in Port Harcourt gets assets from the nearest Cloudflare edge node, not from a distant server. Cloudflare also handles DDoS protection and SSL certificates automatically.

Paystack and Flutterwave

Premium listings are paid features. Both Paystack and Flutterwave are integrated. We offer both because different businesses have had different experiences with each — offering both means fewer abandoned transactions at the payment step.

What we'd do differently

The PHP codebase works, but starting NaijaBased from scratch today we would use Next.js and Prisma — the same stack powering this website. The developer experience is significantly better, TypeScript catches errors before they reach production, and server-side rendering gives excellent SEO out of the box.

The migration will happen. But working software that serves real users takes priority over rewrites.

All postsWork with us