create-luff-app 2.0.0 → 2.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.
Files changed (3) hide show
  1. package/NOTES.md +4 -10
  2. package/README.md +81 -1
  3. package/package.json +1 -1
package/NOTES.md CHANGED
@@ -109,11 +109,9 @@ Handles everything: clears port conflicts, starts Docker DBs, launches all servi
109
109
  ### Option B: Kubernetes Mode (Production)
110
110
 
111
111
  ```mermaid
112
+ %%{init: {'theme':'dark','themeVariables':{'fontSize':'10px'}}}%%
112
113
  flowchart LR
113
- A[Build] --> B[Tag]
114
- B --> C[ArgoCD]
115
- C --> D[Deploy]
116
- D --> E[Forward]
114
+ A[Build] --> B[Tag] --> C[ArgoCD] --> D[Deploy] --> E[Forward]
117
115
  ```
118
116
 
119
117
  ```bash
@@ -169,13 +167,9 @@ kubectl create secret generic ai-secrets \
169
167
  ## 🤖 5. CI/CD Pipeline
170
168
 
171
169
  ```mermaid
170
+ %%{init: {'theme':'dark','themeVariables':{'fontSize':'10px'}}}%%
172
171
  flowchart LR
173
- Push --> CI[Actions]
174
- CI --> Lint
175
- Lint --> Build
176
- Build --> GHCR
177
- GHCR --> Argo[ArgoCD]
178
- Argo --> K8s
172
+ Push --> CI[Actions] --> Lint --> Build --> Reg[GHCR] --> Argo[ArgoCD] --> K8s
179
173
  ```
180
174
 
181
175
  > **⚠️ Important**: Add `GOOGLE_CLIENT_ID` to GitHub Repository Secrets. Next.js `NEXT_PUBLIC_` variables are baked into the Docker image at build time.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  <img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge" />
8
8
  </p>
9
9
 
10
- > **Scaffold the entire LUFF. microservices ecosystem in one command.**
10
+ > **Scaffold the entire LUFF. microservices ecosystem in one command.**
11
11
  > Full-stack Next.js + Express + Prisma + Gemini AI + Razorpay — ready to run.
12
12
 
13
13
  ---
@@ -86,6 +86,7 @@ During scaffolding, the CLI asks:
86
86
  ### AI Architecture
87
87
 
88
88
  ```mermaid
89
+ %%{init: {'theme':'dark','themeVariables':{'fontSize':'10px'}}}%%
89
90
  flowchart LR
90
91
  A[Upload] --> B[Parse]
91
92
  B --> C[Embed]
@@ -96,8 +97,87 @@ flowchart LR
96
97
  G --> H[Answer]
97
98
  ```
98
99
 
100
+ ## 🧬 Architecture at a Glance
101
+
102
+ ```mermaid
103
+ %%{init: {'theme':'dark','themeVariables':{'fontSize':'19px'}}}%%
104
+ graph LR
105
+ FE[FE] --> GW[API GW]
106
+ GW --> A[Auth]
107
+ GW --> P[Posts]
108
+ GW --> Pay[Pay]
109
+ GW --> AI[AI]
110
+ A --> AD[(AuthDB)]
111
+ P --> PD[(PostsDB)]
112
+ Pay --> PaD[(PayDB)]
113
+ AI --> V[(Vector)]
114
+ AI --> G[Gemini]
115
+ ```
116
+
99
117
  ---
100
118
 
119
+ ## 💳 Payment Service — Transaction Infrastructure
120
+
121
+ <summary><b>🔍 Click to expand Payment Architecture</b></summary>
122
+
123
+ ```mermaid
124
+ %%{init: {'theme':'dark','themeVariables':{'fontSize':'10px'}}}%%
125
+ sequenceDiagram
126
+ participant U as User
127
+ participant F as Frontend
128
+ participant G as Gateway
129
+ participant P as Payment
130
+ participant R as Razorpay
131
+ participant DB as PayDB
132
+
133
+ U->>F: Buy
134
+ F->>G: POST /create-order
135
+ G->>P: Forward
136
+ P->>R: Create Order
137
+ R-->>P: order_id
138
+ P-->>F: order_id
139
+ F->>R: Checkout
140
+ R-->>F: Callback
141
+ F->>G: POST /verify
142
+ G->>P: Forward
143
+ P->>P: HMAC Check
144
+ P->>DB: Save
145
+ P-->>F: Verified
146
+ ```
147
+
148
+ | Route | Method | Auth | Description |
149
+ |:---|:---:|:---:|:---|
150
+ | `/payments/create-order` | POST | ✅ | Creates a Razorpay order with amount & currency |
151
+ | `/payments/verify` | POST | ✅ | Verifies payment signature (HMAC-SHA256) |
152
+ | `/payments/my-purchases` | GET | ✅ | Returns user's transaction history |
153
+
154
+ ---
155
+
156
+ ## 🔐 Auth Service — Stateless Security
157
+
158
+ <summary><b>🔍 Click to expand Authentication Flow</b></summary>
159
+
160
+ ```mermaid
161
+ %%{init: {'theme':'dark','themeVariables':{'fontSize':'10px'}}}%%
162
+ sequenceDiagram
163
+ participant U as User
164
+ participant F as Frontend
165
+ participant G as Google
166
+ participant A as Auth
167
+ participant DB as AuthDB
168
+
169
+ U->>F: Login
170
+ F->>G: OAuth Popup
171
+ G-->>F: Token
172
+ F->>A: POST /auth/google
173
+ A->>G: Verify
174
+ G-->>A: Profile
175
+ A->>DB: Upsert
176
+ A->>A: Sign JWT
177
+ A-->>F: JWT + User
178
+ F->>F: Store JWT
179
+ ```
180
+
101
181
  ## 🔑 Credentials Setup
102
182
 
103
183
  <details>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-luff-app",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "CLI to scaffold the Luff Microservices Boilerplate",
5
5
  "bin": {
6
6
  "create-luff-app": "bin/cli.js"