When we set out to build NCEATutor NZ, we knew we were tackling more than just another marketplace. We needed to create a platform that could match students with tutors based on complex NCEA level requirements, handle secure payments, and maintain sub-200ms query times.
Technical Architecture
Frontend Stack
Next.js 15 with App Router for SEO
React 18.3 with concurrent features
TypeScript 5.7 for type safety
Tailwind CSS + shadcn/ui components
Backend Stack
FastAPI (Python) for async performance
MongoDB with Motor driver
Stripe Checkout + Webhooks
Cloudflare R2 for storage
The 86% Performance Improvement
Our initial implementation fetched all tutors from the database and sorted them in memory. This worked fine with 50 tutors, but we knew it would collapse under real-world load. We moved all logic into MongoDB aggregation pipelines.
pipeline = [
{"$match": filters},
{"$addFields": {
"subjects_count": {"$size": "$subjects"}
}},
{"$sort": {"subjects_count": -1, "rating": -1}},
{"$skip": skip},
{"$limit": limit}
]
tutors = await db.tutors.aggregate(pipeline).to_list(None)Need a Custom Ed-Tech Platform?
We build production-grade web applications with modern tech stacks. From concept to deployment, we handle the complexity.
Work With Us