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 platform with real delivery discipline?
We can scope complex product builds too, but we do it properly. Tell us what you are building and we will map the right next conversation.
Talk Through Your Build