TL;DR — Quick Summary
- Client: extrahasznaltruha.hu — B2B and B2C second-hand clothing trade
- Stack: Next.js 15 + React 19 + PostgreSQL + Stripe + Tailwind CSS 4
- Development time: 14 days (AiSolve.me guarantee met)
- Lighthouse score: 94 Performance / 98 Accessibility / 100 Best Practices / 97 SEO
- Result: +62% organic traffic, 23% cart abandonment reduction after 3 months
Project Background
extrahasznaltruha.hu is a second-hand clothing business near Nyíregyháza, Hungary, simultaneously serving B2B wholesale customers (textile processors, secondhand retailers, export partners) and B2C end consumers. Serving both business models in parallel presents significant architectural challenges.
Their previous solution — a WordPress + WooCommerce setup — was slow, lacked proper B2B pricing logic, and had an unreliable Stripe integration where payment confirmations regularly failed. Three core requirements were set for the new webshop: handle 500+ products with fast loading, serve B2B and B2C clients from a single platform with different pricing, and implement a reliable webhook-based payment flow with automated B2B invoicing.
Key Metrics at Launch
Architecture Decisions
Why Next.js? — Combining SSR and ISR
Product pages are built with ISR (Incremental Static Regeneration): pages are statically served but regenerate every 60 seconds in the background when inventory changes. This means users always receive a pre-generated, instantly loading page — no waiting for server-side rendering. The cart, checkout flow, and B2B portal use real-time SSR rendering to ensure prices and stock levels are always current. The Next.js App Router allowed us to cleanly separate these two approaches at the route level.
Why PostgreSQL? — ACID Transactions and Complex Queries
B2B orders require complex workflows: when an order is placed, the system must simultaneously reserve inventory, create the order record, trigger invoicing, and notify the warehouse — all atomically. If any step fails, the entire transaction must roll back. This requires PostgreSQL's ACID guarantees. We used Prisma ORM for type-safe queries and automatic migrations, significantly shortening development time.
Why Stripe? — Webhooks and B2B Invoicing
The previous system handled payment confirmations via redirect URL — if a user closed their browser before the redirect completed, the payment was lost in the database. With Stripe's webhook approach, this problem disappears entirely: Stripe notifies the server directly for every payment event, regardless of client behavior. B2B customers receive automatic PDF invoices via Stripe Invoicing, including EU tax numbers and reverse charge notation required for B2B export transactions.
B2B vs. B2C Logic in a Single System
The Next.js middleware layer determines the user's role on the very first request and routes it to the appropriate server component. This means the same URL (/products/xyz) shows a consumer price to B2C visitors and a wholesale price to authenticated B2B partners — within a single render cycle.
Business Results — 3 Months Post-Launch
Planning a Webshop? Request a Free Consultation!
Tell us about your business model and challenges — we'll respond within 24 hours with a tailored architecture proposal and quote. 0 HUF upfront, 14-day delivery guarantee, 90+ Lighthouse.
Request a Consultation →Készen állsz a saját weboldaladra?
Ingyenes konzultáció során átbeszéljük, hogyan segíthetünk vállalkozásodnak növekedni egy modern, gyors és konverzióoptimalizált weboldallal. 14 nap alatt kész, 0 Ft induló költséggel.
![AI-Built Webshop: extrahasznaltruha.hu — Next.js + PostgreSQL + Stripe [Case Study]](/_next/image?url=%2Fimages%2Fblog%2Fextrahasznaltruha-webshop-case-study.webp&w=3840&q=75)
![PiheLux: Luxury Webshop with 100/100 Lighthouse Score — Built in 1 Week [Case Study]](/_next/image?url=%2Fimages%2Fblog%2Fpihelux-launch-week.webp&w=3840&q=75)



![How Is an AI-Native Website Built? The Complete Process Step by Step [2026]](/_next/image?url=%2Fimages%2Fblog%2Fai-weboldal-keszules-folyamat.webp&w=3840&q=75)
