RSTM
A multi-tenant, multi-vertical marketplace on a TypeScript monorepo with shared backend infrastructure.
Architecture at a glance
data flows left to right- Buyers and vendors
- Vertical apps
- Shared API
- Drizzle ORM
- PostgreSQL
connectedStripe ConnectRedisSSE
The problem
Every new marketplace vertical tends to become its own codebase. Auth, payments, roles, and notifications get rebuilt each time, and they drift apart.
What I built
RSTM runs several marketplace verticals on one TypeScript monorepo. Each vertical has its own product surface, but they share a single backend foundation: identity, roles, payments, and real-time events.
Engineering decisions
- Shared core, thin verticals. Common infrastructure lives in shared packages. A new vertical reuses it instead of copying it.
- Access is a hierarchy, not a flag. An 8-role access-control model defines who can see and do what across the platform.
- Typed data access end to end. Drizzle ORM over PostgreSQL keeps queries and schema in TypeScript.
- Live without polling. Real-time updates reach the browser over Server-Sent Events.