Overview
The Study Hug is a full-stack educational platform and e-commerce site for a Greek tutoring business. The brief was to build everything from scratch: a public-facing storefront, checkout with Stripe, a complete admin CMS for non-technical editors, and transactional email for purchases and contact enquiries.
Delivered in 3 weeks. Live at thestudyhug.gr.
What was built
Auth & roles — NextAuth with JWT sessions, role-based access (admin / user). Password reset with in-flight token validation. Protected routes enforced server-side in layout.tsx.
E-commerce — Stripe Checkout integration, webhook fulfillment, coupon codes, downloadable product delivery via signed tokens. Cart and order management.
Admin CMS — Full backoffice: product management, order tracking, homepage content editor, user management, page content system. Non-technical editors can update copy, images, and product listings without touching code.
Transactional email — Resend + React Email. Three email types: purchase confirmation, contact form notification, password reset.
Database — Prisma ORM with Neon (serverless PostgreSQL). Schema covers users, products, orders, coupons, homepage content, page content.
Stack
| Layer | Technology | |-------|-----------| | Frontend | Next.js 15, TypeScript, Tailwind CSS | | Auth | NextAuth (JWT) | | Database | Prisma + Neon (PostgreSQL) | | Payments | Stripe Checkout + Webhooks | | Email | Resend + React Email | | Deploy | Vercel |
Key decisions
Why Neon over Supabase? Serverless branching — each PR gets a database branch for staging. No migrations on production until tests pass.
Why NextAuth over Clerk? Full control over the auth flow was required for the custom admin role hierarchy and the existing user import from a spreadsheet.
Why not a CMS like Sanity? The client wanted everything self-contained. A lightweight Prisma-backed admin panel covers all the editor's needs without a third-party subscription.