The Mad Space
Print-on-demand marketplace connecting creators and consumers. ~15,000 LOC, 30+ API endpoints, custom session-based auth, Google OAuth 2.0, GDPR/Loi 25 compliance, 7+ B2B integrations and automated Gelato fulfillment.
Context
A print-on-demand marketplace built to reward creative ideas, with transparent profit-sharing.
- ▸Profit-sharing: 10–20% idea-givers, 20–35% designers
- ▸3 user roles: admin, creator, client
- ▸4 currencies (CAD, USD, EUR, GBP) and 2 languages
- ▸7+ external integrations, maintained by a single engineer
Constraints
A fast MVP, secured from the first payment, compliant from day 1.
- ▸~3 months for the MVP
- ▸Real payments from launch: security non-negotiable
- ▸GDPR, Law 25 and Law 96 compliance from day 1
- ▸Non-technical client: every decision explained
Decisions
Three architecture decisions shaped the project — each a deliberate trade-off.
Architecture
The path of an order, from client to fulfillment: request → API verified by HMAC signature → Prisma/PostgreSQL → automated Gelato/Stripe fulfillment, no manual step.
Results
The most concrete win: complex-order processing, more than halved.
Lessons
The structural choices paid off; test tooling should have come earlier.
- ▸Custom Next.js over WordPress made everything else possible
- ▸Isolated workflows: 4th (loyalty) added in days
- ▸Next time: Playwright + Stripe test-mode integration tests earlier