umpordez
v1.0.3
Published
SaaS starter kit generator - multi-tenant TypeScript + React + PostgreSQL
Readme
umpordez
SaaS starter kit generator.
Why?
We all know the drill; you want to build a SaaS, you spend two weeks setting up auth, multi-tenancy, file uploads, admin panels, role-based access... and then you still haven't written a single line of your actual product.
I've built this same architecture across multiple production apps (different domains, same bones). At some point I got tired of copying between repos, adapting folder names, and forgetting to update that one hardcoded port somewhere.
So I made a CLI that generates the whole thing. One command, answer a few questions, and you get a production-ready multi-tenant SaaS with everything wired up.
No magic, no hidden abstractions. The generated code is yours; plain TypeScript, plain React, plain SQL. Read it, change it, own it.
What you get
server/
apps/api/ Admin API (Express + TypeScript)
apps/site-api/ Public API (Express + TypeScript)
apps/shared/ Shared middlewares + utilities
core/ Models, DB, S3, email, auth
console/ Task runner (migrations, seeds, custom tasks)
migrations/ Raw SQL migrations (Knex)
ui/admin/ React SPA (Vite + shadcn/ui + Tailwind)
ui/site/ Public site (Express + EJS + Tailwind)The architecture:
- Multi-tenant; users > accounts with role-based access (admin, owner, manager, user)
- Multi-API; separate Express servers sharing core logic, add more as you need
- Cookie auth; httpOnly JWT, 30-day expiry, no tokens in localStorage
- S3 uploads; multer-s3 with signed URLs (never public-read)
- Context DI; fresh context per request with all models instantiated, no singletons
- PostgreSQL; Knex.js with raw SQL migrations, because ORMs lie to you eventually :X
Install
npm install -g umpordezUsage
Create a project
umpordezThat's it. It asks you a few questions (name, domain, ports, colors) and generates everything. Then:
cd my-project
./install.sh # install deps
./seed.sh # create db + migrate + seed admin
./dev.sh # start all servicesBuild for production
The build system is split in two steps on purpose; compilation is expensive and should run on your machine, dependency installation needs to happen on the target machine (native bindings, OS-specific stuff).
# Step 1: compile locally, push artifacts to builds repo
umpordez build ../app ../builds
# Step 2: on prod/staging, install production deps
umpordez build-deps ../buildsAfter build-deps, the builds repo is ready to clone and run. Add
your .env, start the services, done.
Other commands
umpordez --help # see all commands
umpordez --version # check versionTech stack
| Layer | Tech | |------------|------| | Backend | TypeScript, Express, PostgreSQL, Knex.js, Zod | | Admin UI | React 18, Vite, Tailwind, shadcn/ui (Radix), React Query v5 | | Public site| Express + EJS + Tailwind | | Auth | httpOnly JWT cookies (bcrypt + 30-day expiry) | | Uploads | AWS S3 via multer-s3, signed URLs | | Email | Nodemailer + HTML templates |
License
MIT; do whatever you want with it.
May the speedy force be with you. ✌️
