
03_styled-by-us
STYLED BY US
Where Nairobi's best stylists meet their clients. We've removed the noise from booking, so everyone can focus on the craft.
// Problem: The friction of uncoordinated scheduling prevents service providers from scaling.
// Architecture: Orchestrated booking with optimistic concurrency controls.
// Stack: Node.js · Fastify · Prisma · PostgreSQL · M-Pesa SDK
// Status: Scaling the Nairobi style scene at styledbyus.co.ke
// THE_PROBLEM
The Coordination Friction
Professional skill deserves professional orchestration.
// THE_SOLUTION
Automated Availability.
Styled By Us was built to close the coordination gap in Nairobi's service industry. By automating the entire booking-to-payment lifecycle, we allow stylists to focus on high-value client interactions rather than logistics.
// THE_TECH_FLEX
Developed a high-concurrency booking orchestrator that eliminates double-bookings and race conditions, backed by an instant settlement layer for service providers.
// ARCHITECTURE_SNIPPET
// booking.orchestrator.ts
export class BookingOrchestrator {
async handleInstantBooking(customer: User, slotId: string) {
return await this.db.$transaction(async (tx) => {
const slot = await tx.slot.findUnique({
where: { id: slotId },
select: { isAvailable: true, version: true }
});
if (!slot?.isAvailable) throw new SlotUnavailableError();
// Optimistic concurrency check
await tx.slot.update({
where: { id: slotId, version: slot.version },
data: { isAvailable: false, version: { increment: 1 } }
});
return await tx.booking.create({ data: { customerId: customer.id, slotId } });
});
}
}// TECH_STACK