PROJECT 01 / 06
An end-to-end backend API for a home-services marketplace, with Stripe payments and a strict authorization matrix across customers, technicians, and admins.
FixService Payment is a complete backend for a home-services marketplace — the kind of system behind an app where you'd book a plumber or electrician. Customers browse and book technicians and pay securely through Stripe; technicians manage their own profiles, services, and job status; admins moderate users, categories, and bookings across the whole platform.
Built with Express and TypeScript, with Prisma ORM sitting on top of PostgreSQL to model an eight-table relational schema — users, technician profiles, services, categories, bookings, payments, reviews, and availability all reference each other. JWT handles authentication and bcrypt handles password hashing, while Zod validates every incoming request. Payments run through Stripe's payment-intent flow, tied directly to a booking's lifecycle from acceptance to completion. Access is enforced through a strict authorization matrix: customers can book and pay but not manage services; technicians can manage services and availability but not touch payments or reviews; admins can moderate everything but can't book or pay.
Modeling eight interrelated Prisma tables — bookings that reference both a customer and a technician, payments that reference a booking, reviews that reference both — without creating circular or fragile relations took careful schema design up front. Enforcing a three-role authorization matrix consistently across dozens of endpoints meant building reusable middleware rather than checking permissions ad hoc in each controller. Wiring Stripe's payment lifecycle — creating a payment intent, confirming it, and keeping that state in sync with the booking record — also required being precise about what happens if a payment fails or a webhook arrives out of order.
Next on the roadmap: email and SMS notifications for booking updates, real-time booking status via websockets, in-app chat between customer and technician, AI-assisted technician recommendations, multi-language support, and a proper analytics dashboard for admins.
Full API documentation is available on Postman, and a video walkthrough covers the system end-to-end.