create-luff-app 1.0.5 β 1.0.7
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/NOTES.md +45 -19
- package/README.md +20 -18
- package/bin/cli.js +2 -1
- package/package.json +2 -2
package/NOTES.md
CHANGED
|
@@ -53,35 +53,61 @@ NODE_ENV=development
|
|
|
53
53
|
|
|
54
54
|
```env
|
|
55
55
|
PORT=4002
|
|
56
|
-
JWT_SECRET="your-jwt-secret
|
|
56
|
+
JWT_SECRET="your-jwt-secret"
|
|
57
57
|
NODE_ENV=development
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
**4. `backend/payment/.env`**
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
```env
|
|
63
|
+
PORT=4003
|
|
64
|
+
RAZORPAY_KEY_ID=rzp_test_your_id
|
|
65
|
+
RAZORPAY_KEY_SECRET=your_secret_key
|
|
66
|
+
DATABASE_URL="postgresql://postgres:postgres@localhost:5435/payment_db"
|
|
67
|
+
JWT_SECRET="your-jwt-secret"
|
|
68
|
+
NODE_ENV=development
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Step 3: Kubernetes Secrets
|
|
63
72
|
|
|
64
73
|
```bash
|
|
65
|
-
#
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
--from-literal=
|
|
72
|
-
--from-literal=
|
|
73
|
-
--from-literal=frontend-url="http://localhost:3000" \
|
|
74
|
-
--from-literal=database-url="postgresql://postgres:postgres@auth-db-service:5432/auth_db"
|
|
75
|
-
|
|
76
|
-
# Create Posts Secrets
|
|
77
|
-
kubectl create secret generic posts-secrets \
|
|
78
|
-
--from-literal=database-url="postgresql://postgres:postgres@posts-db-service:5432/posts_db" \
|
|
79
|
-
--from-literal=jwt-secret="your-jwt-secret-change-in-production"
|
|
74
|
+
# App, Auth & Posts Secrets (...)
|
|
75
|
+
|
|
76
|
+
# Create Payment Secrets
|
|
77
|
+
kubectl create secret generic payment-secrets \
|
|
78
|
+
--from-literal=database-url="postgresql://postgres:postgres@payment-db-service:5432/payment_db" \
|
|
79
|
+
--from-literal=razorpay-key-id="your_key" \
|
|
80
|
+
--from-literal=razorpay-key-secret="your_secret" \
|
|
81
|
+
--from-literal=jwt-secret="your-jwt-secret"
|
|
80
82
|
```
|
|
81
83
|
|
|
82
84
|
---
|
|
83
85
|
|
|
84
|
-
## π 2. How To Run
|
|
86
|
+
## π 2. How To Run Locally
|
|
87
|
+
|
|
88
|
+
We support two modes of development:
|
|
89
|
+
|
|
90
|
+
### 1. Native Mode (Recommended)
|
|
91
|
+
|
|
92
|
+
This is the fastest loop. Run everything directly on your machine:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm run run-local
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This script handles:
|
|
99
|
+
|
|
100
|
+
- Stopping K8s port conflicts
|
|
101
|
+
- Starting local Docker DBs
|
|
102
|
+
- Running all services via `npm run dev`
|
|
103
|
+
|
|
104
|
+
### 2. Kubernetes Mode (GitOps)
|
|
105
|
+
|
|
106
|
+
Follow this if you want to test the full K8s stack:
|
|
107
|
+
|
|
108
|
+
1. **Build & Deploy**: `npm run run-k8s build`
|
|
109
|
+
2. **Access Dashboard**: `npm run argo`
|
|
110
|
+
3. **Connect Ports**: `npm run access`
|
|
85
111
|
|
|
86
112
|
We utilize ArgoCD as the GitOps agent. It constantly monitors your main branch's `k8s/` folder and applies the configuration locally.
|
|
87
113
|
|
package/README.md
CHANGED
|
@@ -35,24 +35,24 @@ For detailed troubleshooting on database connections, Kubernetes local setup, an
|
|
|
35
35
|
β (Express) β
|
|
36
36
|
ββββββββ¬βββββββ
|
|
37
37
|
β
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
βββββββββββββββββββΌββββββββββββββββββ
|
|
39
|
+
β β β
|
|
40
|
+
βββββββ΄ββββββ βββββββ΄ββββββ βββββββ΄ββββββ
|
|
41
|
+
β Auth β β Posts β β Payment β
|
|
42
|
+
β Service β:4001β Service β:4002β Service β:4003
|
|
43
|
+
β (Express) β β (Express) β β (Express) β
|
|
44
|
+
βββββββ¬ββββββ βββββββ¬ββββββ βββββββ¬ββββββ
|
|
45
|
+
β β β
|
|
46
|
+
βββββββ΄ββββββ βββββββ΄ββββββ βββββββ΄ββββββ
|
|
47
|
+
β Auth DB β β Posts DB β βPayment DB β
|
|
48
|
+
β (Postgres)β β (Postgres)β β(Postgres) β
|
|
49
|
+
βββββββββββββ βββββββββββββ βββββββββββββ
|
|
50
|
+
|
|
51
|
+
βββββββββββββββββββββββββββββββ
|
|
52
|
+
β Frontend App β
|
|
53
|
+
β (Next.js) β
|
|
54
|
+
β :3000 β
|
|
55
|
+
βββββββββββββββββββββββββββββββ
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
---
|
|
@@ -64,10 +64,12 @@ For detailed troubleshooting on database connections, Kubernetes local setup, an
|
|
|
64
64
|
| **Frontend** | Next.js 14 (App Router), TailwindCSS, React Query |
|
|
65
65
|
| **Backend** | Node.js, Express, TypeScript |
|
|
66
66
|
| **Database** | PostgreSQL, Prisma ORM |
|
|
67
|
+
| **Payment** | Integrated Stripe/Internal Payment Logic |
|
|
67
68
|
| **Auth** | Google OAuth (PostMessage flow), JWT |
|
|
68
69
|
| **Monorepo** | Turborepo, npm workspaces |
|
|
69
70
|
| **Infra** | Docker, Kubernetes (ArgoCD ready) |
|
|
70
71
|
| **Quality** | ESLint, Prettier, Husky, Commitlint |
|
|
72
|
+
| **Toast** | Sonner (Premium Notifications) |
|
|
71
73
|
|
|
72
74
|
---
|
|
73
75
|
|
package/bin/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/* eslint-env node */
|
|
2
3
|
|
|
3
4
|
const degit = require("degit");
|
|
4
5
|
const fs = require("fs");
|
|
@@ -81,7 +82,7 @@ async function main() {
|
|
|
81
82
|
console.log("Next steps:");
|
|
82
83
|
console.log(` cd ${projectName}`);
|
|
83
84
|
console.log(
|
|
84
|
-
" docker compose -f docker/docker-compose.yml up auth-db posts-db -d"
|
|
85
|
+
" docker compose -f docker/docker-compose.yml up auth-db posts-db payment-db -d"
|
|
85
86
|
);
|
|
86
87
|
console.log(
|
|
87
88
|
" set up .env files from .env.example files, can also use script > npm run setup"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-luff-app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "CLI to scaffold the Luff Microservices Boilerplate",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-luff-app": "bin/cli.js"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/Luff-Org/Luff-Boilerplate"
|
|
16
|
+
"url": "git+https://github.com/Luff-Org/Luff-Boilerplate.git"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT"
|
|
19
19
|
}
|