umpordez 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +5 -1
- package/README.md +123 -0
- package/package.json +1 -1
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
"Bash(echo:*)",
|
|
11
11
|
"WebFetch(domain:umpordez.com)",
|
|
12
12
|
"Bash(curl:*)",
|
|
13
|
-
"Bash(python3:*)"
|
|
13
|
+
"Bash(python3:*)",
|
|
14
|
+
"WebFetch(domain:github.com)",
|
|
15
|
+
"WebFetch(domain:raw.githubusercontent.com)",
|
|
16
|
+
"Bash(gh api:*)",
|
|
17
|
+
"WebFetch(domain:api.github.com)"
|
|
14
18
|
]
|
|
15
19
|
}
|
|
16
20
|
}
|
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# umpordez 🚀
|
|
2
|
+
|
|
3
|
+
SaaS starter kit generator.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Why?
|
|
8
|
+
|
|
9
|
+
We all know the drill; you want to build a SaaS, you spend two weeks
|
|
10
|
+
setting up auth, multi-tenancy, file uploads, admin panels, role-based
|
|
11
|
+
access... and then you still haven't written a single line of your
|
|
12
|
+
actual product.
|
|
13
|
+
|
|
14
|
+
I've built this same architecture across multiple production apps
|
|
15
|
+
(different domains, same bones). At some point I got tired of
|
|
16
|
+
copying between repos, adapting folder names, and forgetting to
|
|
17
|
+
update that one hardcoded port somewhere.
|
|
18
|
+
|
|
19
|
+
So I made a CLI that generates the whole thing. One command, answer a
|
|
20
|
+
few questions, and you get a production-ready multi-tenant SaaS with
|
|
21
|
+
everything wired up.
|
|
22
|
+
|
|
23
|
+
**No magic, no hidden abstractions.** The generated code is yours;
|
|
24
|
+
plain TypeScript, plain React, plain SQL. Read it, change it, own it.
|
|
25
|
+
|
|
26
|
+
## What you get
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
server/
|
|
30
|
+
apps/api/ Admin API (Express + TypeScript)
|
|
31
|
+
apps/site-api/ Public API (Express + TypeScript)
|
|
32
|
+
apps/shared/ Shared middlewares + utilities
|
|
33
|
+
core/ Models, DB, S3, email, auth
|
|
34
|
+
console/ Task runner (migrations, seeds, custom tasks)
|
|
35
|
+
migrations/ Raw SQL migrations (Knex)
|
|
36
|
+
|
|
37
|
+
ui/admin/ React SPA (Vite + shadcn/ui + Tailwind)
|
|
38
|
+
ui/site/ Public site (Express + EJS + Tailwind)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The architecture:
|
|
42
|
+
|
|
43
|
+
- **Multi-tenant**; users > accounts with role-based access
|
|
44
|
+
(admin, owner, manager, user)
|
|
45
|
+
- **Multi-API**; separate Express servers sharing core logic,
|
|
46
|
+
add more as you need
|
|
47
|
+
- **Cookie auth**; httpOnly JWT, 30-day expiry, no tokens
|
|
48
|
+
in localStorage
|
|
49
|
+
- **S3 uploads**; multer-s3 with signed URLs (never public-read)
|
|
50
|
+
- **Context DI**; fresh context per request with all models
|
|
51
|
+
instantiated, no singletons
|
|
52
|
+
- **PostgreSQL**; Knex.js with raw SQL migrations, because ORMs
|
|
53
|
+
lie to you eventually :X
|
|
54
|
+
|
|
55
|
+
## Install
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install -g umpordez
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Usage
|
|
62
|
+
|
|
63
|
+
### Create a project
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
umpordez
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
That's it. It asks you a few questions (name, domain, ports, colors)
|
|
70
|
+
and generates everything. Then:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cd my-project
|
|
74
|
+
./install.sh # install deps
|
|
75
|
+
./seed.sh # create db + migrate + seed admin
|
|
76
|
+
./dev.sh # start all services
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Build for production
|
|
80
|
+
|
|
81
|
+
The build system is split in two steps on purpose; compilation is
|
|
82
|
+
expensive and should run on your machine, dependency installation
|
|
83
|
+
needs to happen on the target machine (native bindings, OS-specific
|
|
84
|
+
stuff).
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Step 1: compile locally, push artifacts to builds repo
|
|
88
|
+
umpordez build ../app ../builds
|
|
89
|
+
|
|
90
|
+
# Step 2: on prod/staging, install production deps
|
|
91
|
+
umpordez build-deps ../builds
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
After `build-deps`, the builds repo is ready to clone and run. Add
|
|
95
|
+
your `.env`, start the services, done.
|
|
96
|
+
|
|
97
|
+
### Other commands
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
umpordez --help # see all commands
|
|
101
|
+
umpordez --version # check version
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Tech stack
|
|
105
|
+
|
|
106
|
+
| Layer | Tech |
|
|
107
|
+
|------------|------|
|
|
108
|
+
| Backend | TypeScript, Express, PostgreSQL, Knex.js, Zod |
|
|
109
|
+
| Admin UI | React 18, Vite, Tailwind, shadcn/ui (Radix), React Query v5 |
|
|
110
|
+
| Public site| Express + EJS + Tailwind |
|
|
111
|
+
| Auth | httpOnly JWT cookies (bcrypt + 30-day expiry) |
|
|
112
|
+
| Uploads | AWS S3 via multer-s3, signed URLs |
|
|
113
|
+
| Email | Nodemailer + HTML templates |
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
MIT; do whatever you want with it.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
*May the speedy force be with you.* ✌️
|
|
122
|
+
|
|
123
|
+
[youtube.com/ligeiro](https://youtube.com/ligeiro)
|