create-domis 1.0.51 → 1.0.53

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/README.md +246 -245
  2. package/dist/index.js +54 -23
  3. package/package.json +42 -42
package/README.md CHANGED
@@ -1,245 +1,246 @@
1
- ![NPM Version](https://img.shields.io/npm/v/create-domis?style=for-the-badge&logo=npm&color=CB3837)
2
- ![NPM Downloads](https://img.shields.io/npm/dm/create-domis?style=for-the-badge)
3
- ![Next.js](https://img.shields.io/badge/Next.js-15-black?style=for-the-badge&logo=next.js&logoColor=white)
4
- ![Tailwind v4](https://img.shields.io/badge/Tailwind-v4-38BDF8?style=for-the-badge&logo=tailwindcss&logoColor=white)
5
- ![Status](https://img.shields.io/badge/Status-Validado-brightgreen?style=for-the-badge)
6
-
7
- <h2 id="sobre-o-cli">1. 🚀 Create Domis - O Acelerador Next.Js 15 + Firebase Killer 🚀</h2>
8
-
9
- ![Status](https://img.shields.io/badge/Status-Online-brightgreen?style=flat-square)
10
- ![CLI](https://img.shields.io/badge/CLI-Oficial-26FF00?style=flat-square)
11
- ![Firebase](https://img.shields.io/badge/Firebase-Ready-FFCA28?style=flat-square&logo=firebase&logoColor=black)
12
- [![License](https://img.shields.io/badge/License-Private_Commercial_v1.3-red?style=flat-square)](https://github.com/Domisnnet/DomisPacks-Technical/blob/main/LICENSE)
13
- ![Imagem DomisPacks](./src/assets/domispacks.png)
14
-
15
- Bem-vindo ao **CLI Oficial Domis**. O &nbsp;`npm create domis@latest` é um acelerador de projetos que elimina 3 horas de configuração de `firebase.json`, &nbsp;`firestore.rules` e &nbsp;`GitHub Actions` com 1 comando. Resolvemos o bug de Hosting que quebra 90% dos deploys Next.js 15 no Firebase.
16
-
17
- ---
18
-
19
- ## 📚 Tabela de Conteúdo
20
-
21
- | 💻 O CLI | 🛠 Técnico | 🤝 Comercial |
22
- | :---: | :---: | :---: |
23
- | [![1. Sobre](https://img.shields.io/badge/1%20-%20Sobre-4CAF50)](#sobre-o-cli) | [![5. Techs](https://img.shields.io/badge/5%20-%20Techs-607D8B)](#tecnologias) | [![9. Estrutura](https://img.shields.io/badge/9%20-%20Estrutura-795548)](#estrutura) |
24
- | [![2. Instalação](https://img.shields.io/badge/2%20-%20Instalação-2196F3)](#instalacao) | [![6. Packs](https://img.shields.io/badge/6%20-%20Packs-009688)](#templates-inclusos) | [![10. Venda](https://img.shields.io/badge/10%20-%20Venda-FF9800)](#como-funciona-a-venda) |
25
- | [![3. Uso Rápido](https://img.shields.io/badge/3%20-%20Uso-FF9800)](#uso-rapido) | [![7. Fluxo](https://img.shields.io/badge/7%20-%20Fluxo-3F51B5)](#fluxo-de-uso) | [![11. Licença](https://img.shields.io/badge/11%20-%20Licença-E91E63)](#licenca) |
26
- | [![4. Comandos](https://img.shields.io/badge/4%20-%20Comandos-9C27B0)](#comandos) | [![8. FAQ](https://img.shields.io/badge/8%20-%20FAQ-FFC107)](#faq) | [![12. Domis](https://img.shields.io/badge/12%20-%20Domis-212121)](#perfil) |
27
-
28
- ---
29
-
30
- <h2 id="instalacao">2. ⚙ Instalação</h2>
31
-
32
- Não precisa instalar global. Rode sempre na última versão:
33
-
34
- ```bash
35
- npm create domis@latest
36
- ```
37
-
38
- ---
39
-
40
- <h2 id="uso-rapido">3. 🚀 Uso Rápido</h2>
41
-
42
- Todo mundo roda o mesmo comando. O que muda é o que sua PRO_KEY liberou no `verificar.html`:
43
-
44
- ```bash
45
- npm create domis@latest
46
- ```
47
-
48
- O CLI vai abrir:
49
-
50
- ```bash
51
- 🔥 DomisPacks Technical v1.1.0
52
-
53
- ? Qual pack você quer acelerar hoje?
54
-
55
- > 🔥 Ver DEMO Grátis - firebase.json
56
- 🔥 DomisDocs Lite — Next.js 15 + Tailwind v4 + Firebase Killer
57
- 🔥 DomisDocs PRO — Next.js 15 + Stripe + Rules + SSR + CI/CD
58
- ```
59
-
60
- | Você comprou | O que acontece |
61
- | :--- | :--- |
62
- | **DEMO Grátis** | Libera o `firebase.json` básico para você usar |
63
- | **Lite R$49** | Escolhe `DomisDocs Lite` e cria na hora |
64
- | **Pro R$197** | Valida sua PRO_KEY no `verificar.html`, depois escolhe `DomisDocs PRO` no mesmo comando |
65
-
66
- > A autenticação `--key` é feita por debaixo dos panos pelo `verificar.html`. Você não precisa digitar `--template` ou `--key` na mão.
67
-
68
- ---
69
-
70
- <h2 id="comandos">4. 🧩 Comandos Disponíveis</h2>
71
-
72
- | Comando | O que faz |
73
- | :--- | :--- |
74
- | `npm create domis@latest` | Modo interativo (recomendado) - lista Grátis/Lite/Pro liberados pela sua key nas versões pagas |
75
- | `--template <nome>` | Uso interno - pula o menu - gerenciado pelo verificar.html |
76
- | `--key <PRO_KEY>` | Uso interno - autentica no repo privado - gerenciado pelo verificar.html |
77
- | `--help` | Lista todos os templates disponíveis |
78
-
79
- ---
80
-
81
- <h2 id="tecnologias">5. 💻 Stack do CLI</h2>
82
-
83
- | Camada | Tecnologia |
84
- | :--- | :--- |
85
- | **Core** | Node + TypeScript |
86
- | **CLI Engine** | `create-*` + `prompts` + `degit` |
87
- | **Infra** | GitHub Private Repo como CDN seguro de Packs |
88
- | **Auth** | PRO_KEY Kiwify via verificar.html |
89
- | **Frontend** | Next.js 15 + Tailwind v4 |
90
-
91
- ---
92
-
93
- <h2 id="templates-inclusos">6. 📦 Templates Inclusos no MVP</h2>
94
-
95
- | Pack | Preço | O que entrega |
96
- | :--- | :--- | :--- |
97
- | `domisdocs-lite` | **R$49** | `firebase.json` killer + Hosting otimizado + `next.config` + `firestore.rules` básica |
98
- | `domisdocs-pro` | **R$197** | Tudo do Lite + `firestore.rules` avançadas + `storage.rules` + `GitHub Actions` + `functions/` + Stripe Checkout + Kiwify Webhook + SSR |
99
-
100
- ---
101
-
102
- <h2 id="fluxo-de-uso">7. 🔄 Fluxo de Uso</h2>
103
-
104
- 1. Cliente roda:
105
-
106
- ```bash
107
- npm create domis@latest
108
- ```
109
-
110
- 2. CLI faz:
111
-
112
- ```bash
113
- ✔ DomisPacks Technical v1.1.0
114
- ✔ Qual pack você quer acelerar hoje?
115
- ```
116
-
117
- 3. Opções disponíveis:
118
-
119
- ```bash
120
- ✔ > 🔥 Ver DEMO Grátis - firebase.json
121
- ```
122
-
123
- 4. Ou seleciona Lite:
124
-
125
- ```bash
126
- ✔ > 🔥 DomisDocs Lite — Next.js 15 + Tailwind v4 + Firebase Killer
127
- ```
128
-
129
- 5. Ou Pro:
130
-
131
- ```bash
132
- ✔ 🔥 DomisDocs PRO — Next.js 15 + Stripe + Rules + SSR + CI/CD
133
- ```
134
-
135
- 6. Depois:
136
-
137
- ```bash
138
- ✔ Baixando pack...
139
- ✔ Corrigindo firebase.json -> Hosting + Rewrites + Cache Next.js 15
140
- ✔ Instalando deps...
141
- ✔ Pronto!
142
- cd meu-app && npm run dev
143
- ```
144
-
145
- ---
146
-
147
- <h2 id="faq">8. 🧠 FAQ</h2>
148
-
149
- <details>
150
- <summary><strong>Precisa de Firebase CLI instalado ❓</strong></summary>
151
- <p>⚠ <strong>Sim, para deploy.</strong> <code>npm i -g firebase-tools</code>. O <code>create-domis</code> só cria e corrige o projeto.</p>
152
- </details>
153
-
154
- <details>
155
- <summary><strong>Funciona no Windows ❓</strong></summary>
156
- <p>✅ <strong>Sim.</strong> Testado em PowerShell e CMD.</p>
157
- </details>
158
-
159
- <details>
160
- <summary><strong>O que é a PRO_KEY ❓</strong></summary>
161
- <p>🔑 É a key gerada após compra na Kiwify. Você cola no verificar.html como senha e ela libera seu pack. Não precisa digitar no terminal.</p>
162
- </details>
163
-
164
- <details>
165
- <summary><strong>Funciona com SSR / Next.js App Router ❓</strong></summary>
166
- <p>🌐 <strong>No Lite é Hosting estático otimizado.</strong> SSR completo + Functions está no Pack Pro com <code>ssr: true</code> já configurado.</p>
167
- </details>
168
-
169
- <details>
170
- <summary><strong>Posso usar com GitHub Actions (deploy automático) ❓</strong></summary>
171
- <p>🤖 <strong>Sim, mas no Lite é manual.</strong> No Lite você roda <code>firebase deploy</code>. No Pro já vem <code>.github/workflows/deploy.yml</code> que faz deploy a cada push na <code>main.</code></p>
172
- </details>
173
-
174
- ---
175
-
176
- <h2 id="estrutura">9. 📁 Estrutura do Projeto Gerado</h2>
177
-
178
- O que o `npm create domis@latest` cria dentro da pasta `meu-app/` - reaproveitável para Lite e futuro PRO:
179
-
180
- ```
181
- meu-app/
182
- ├── firebase.json → Firebase Killer (Hosting + Rewrites + Cache)
183
- ├── firestore.rules → Lite: basica / Pro: avançada multi-tenant
184
- ├── storage.rules → Pro: regras avançadas (Lite: basica)
185
- ├── next.config.js → Otimizado para Firebase Hosting
186
- ├── tailwind.config.ts → Tailwind v4 ja configurado
187
- ├── .github/
188
- │ └── workflows/
189
- │ └── deploy.yml → So no PRO: deploy automatico
190
- ├── functions/ → So no PRO: Stripe + Kiwify Webhook + Validator
191
- │ ├── src/
192
- │ │ └── index.ts
193
- │ └── package.json
194
- └── src/
195
- ├── app/
196
- │ ├── (saas)/
197
- │ │ └── dashboard/ → So no PRO
198
- │ ├── layout.tsx
199
- │ └── page.tsx
200
- └── lib/
201
- ├── firebase.ts
202
- └── stripe.ts → So no PRO
203
- ```
204
-
205
- > No Lite você recebe tudo até : `src/lib/firebase.ts`. No PRO destrava : `functions/`, `.github/` e `storage.rules` avançadas.
206
-
207
- ---
208
-
209
- <h2 id="como-funciona-a-venda">10. 💳 Como Funciona a Venda</h2>
210
-
211
- 1. Cliente compra na Kiwify (Lite R$49 ou Pro R$197)
212
- 2. Kiwify envia PRO_KEY automatica por e-mail
213
- 3. Cliente acessa verificar.html e ativa a key como senha
214
- 4. Ele roda: `npm create domis@latest` e escolhe o pack liberado pela key
215
- 5. Acesso liberado por 6 meses - renova com CUPOM: L2NNYK8 5% OFF
216
-
217
- ---
218
-
219
- <h2 id="licenca">11. 📄 Licença</h2>
220
-
221
- Este repositório contém:
222
- * **CLI - `create-domis` :** &nbsp; Private Commercial v1.2 - motor que aciona 3 opções (grátis/Lite/Pro)
223
- * **Packs - meu-app/ gerado via CLI :** &nbsp; [![Private Commercial](https://img.shields.io/badge/License-Private_Commercial_v1.2-red?style=flat-square)](https://github.com/Domisnnet/DomisPacks-Technical/blob/main/LICENSE)
224
-
225
- > **Uso pessoal, intransferível e não exclusivo.**
226
- > Pode usar em projetos próprios e de clientes.
227
- >
228
- > **PROIBIDO:** Redistribuir, revender, compartilhar ou publicar o boilerplate como template/curso/pack concorrente. PRO_KEY pessoal e intransferível.
229
- > Violação = revogação sem reembolso.
230
-
231
- ---
232
-
233
- <h2 id="perfil">12. 👨💻 DomisDev</h2>
234
-
235
- > Caso precise de informações adicionais, abra uma Pull Request:
236
-
237
- <a href="https://github.com/Domisnnet">
238
- <img src="./src/assets/DomisDev.png" width="90" style="border-radius: 50%" alt="DomisDev">
239
- </a>
240
-
241
- <p align="center">
242
- <a href="#sobre-o-cli">
243
- <img src="https://img.shields.io/badge/⬆%20VOLTAR%20AO%20TOPO-26FF00?style=flat&labelColor=111827&color=0A0F1C" alt="Voltar ao topo" style="height: 30px;">
244
- </a>
245
- </p>
1
+ ![NPM Version](https://img.shields.io/npm/v/create-domis?style=for-the-badge&logo=npm&color=CB3837)
2
+ ![NPM Downloads](https://img.shields.io/npm/dm/create-domis?style=for-the-badge)
3
+ ![Next.js](https://img.shields.io/badge/Next.js-15-black?style=for-the-badge&logo=next.js&logoColor=white)
4
+ ![Tailwind v4](https://img.shields.io/badge/Tailwind-v4-38BDF8?style=for-the-badge&logo=tailwindcss&logoColor=white)
5
+ ![Status](https://img.shields.io/badge/Status-Validado-brightgreen?style=for-the-badge)
6
+
7
+ <h2 id="sobre-o-cli">1. 🚀 Create Domis - O Acelerador Next.Js 15 + Firebase Killer 🚀</h2>
8
+
9
+ ![Status](https://img.shields.io/badge/Status-Online-brightgreen?style=flat-square)
10
+ ![CLI](https://img.shields.io/badge/CLI-Oficial-26FF00?style=flat-square)
11
+ ![Firebase](https://img.shields.io/badge/Firebase-Ready-FFCA28?style=flat-square&logo=firebase&logoColor=black)
12
+ [![License](https://img.shields.io/badge/License-Private_Commercial_v1.3-red?style=flat-square)](https://github.com/Domisnnet/DomisPacks-Technical/blob/main/LICENSE)
13
+ ![Imagem DomisPacks](./src/assets/domispacks.png)
14
+
15
+ Bem-vindo ao **CLI Oficial Domis**. O &nbsp;`npm create domis@latest` é um acelerador de projetos que elimina 3 horas de configuração de `firebase.json`, &nbsp;`firestore.rules` e &nbsp;`GitHub Actions` com 1 comando. Resolvemos o bug de Hosting que quebra 90% dos deploys Next.js 15 no Firebase.
16
+
17
+ ---
18
+
19
+ ## 📚 Tabela de Conteúdo
20
+
21
+ | 💻 O CLI | 🛠 Técnico | 🤝 Comercial |
22
+ | :-------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------: |
23
+ | [![1. Sobre](https://img.shields.io/badge/1%20-%20Sobre-4CAF50)](#sobre-o-cli) | [![5. Techs](https://img.shields.io/badge/5%20-%20Techs-607D8B)](#tecnologias) | [![9. Estrutura](https://img.shields.io/badge/9%20-%20Estrutura-795548)](#estrutura) |
24
+ | [![2. Instalação](https://img.shields.io/badge/2%20-%20Instalação-2196F3)](#instalacao) | [![6. Packs](https://img.shields.io/badge/6%20-%20Packs-009688)](#templates-inclusos) | [![10. Venda](https://img.shields.io/badge/10%20-%20Venda-FF9800)](#como-funciona-a-venda) |
25
+ | [![3. Uso Rápido](https://img.shields.io/badge/3%20-%20Uso-FF9800)](#uso-rapido) | [![7. Fluxo](https://img.shields.io/badge/7%20-%20Fluxo-3F51B5)](#fluxo-de-uso) | [![11. Licença](https://img.shields.io/badge/11%20-%20Licença-E91E63)](#licenca) |
26
+ | [![4. Comandos](https://img.shields.io/badge/4%20-%20Comandos-9C27B0)](#comandos) | [![8. FAQ](https://img.shields.io/badge/8%20-%20FAQ-FFC107)](#faq) | [![12. Domis](https://img.shields.io/badge/12%20-%20Domis-212121)](#perfil) |
27
+
28
+ ---
29
+
30
+ <h2 id="instalacao">2. ⚙ Instalação</h2>
31
+
32
+ Não precisa instalar global. Rode sempre na última versão:
33
+
34
+ ```bash
35
+ npm create domis@latest
36
+ ```
37
+
38
+ ---
39
+
40
+ <h2 id="uso-rapido">3. 🚀 Uso Rápido</h2>
41
+
42
+ Todo mundo roda o mesmo comando. O que muda é o que sua PRO_KEY liberou no `verificar.html`:
43
+
44
+ ```bash
45
+ npm create domis@latest
46
+ ```
47
+
48
+ O CLI vai abrir:
49
+
50
+ ```bash
51
+ 🔥 DomisPacks Technical v1.1.0
52
+
53
+ ? Qual pack você quer acelerar hoje?
54
+
55
+ > 🔥 Ver DEMO Grátis - firebase.json
56
+ 🔥 DomisDocs Lite — Next.js 15 + Tailwind v4 + Firebase Killer
57
+ 🔥 DomisDocs PRO — Next.js 15 + Stripe + Rules + SSR + CI/CD
58
+ ```
59
+
60
+ | Você comprou | O que acontece |
61
+ | :-------------- | :-------------------------------------------------------------------------------------- |
62
+ | **DEMO Grátis** | Libera o `firebase.json` básico para você usar |
63
+ | **Lite R$49** | Escolhe `DomisDocs Lite` e cria na hora |
64
+ | **Pro R$197** | Valida sua PRO_KEY no `verificar.html`, depois escolhe `DomisDocs PRO` no mesmo comando |
65
+
66
+ > A autenticação `--key` é feita por debaixo dos panos pelo `verificar.html`. Você não precisa digitar `--template` ou `--key` na mão.
67
+
68
+ ---
69
+
70
+ <h2 id="comandos">4. 🧩 Comandos Disponíveis</h2>
71
+
72
+ | Comando | O que faz |
73
+ | :------------------------ | :--------------------------------------------------------------------------------------------- |
74
+ | `npm create domis@latest` | Modo interativo (recomendado) - lista Grátis/Lite/Pro liberados pela sua key nas versões pagas |
75
+ | `--template <nome>` | Uso interno - pula o menu - gerenciado pelo verificar.html |
76
+ | `--key <PRO_KEY>` | Uso interno - autentica no repo privado - gerenciado pelo verificar.html |
77
+ | `--help` | Lista todos os templates disponíveis |
78
+
79
+ ---
80
+
81
+ <h2 id="tecnologias">5. 💻 Stack do CLI</h2>
82
+
83
+ | Camada | Tecnologia |
84
+ | :------------- | :------------------------------------------- |
85
+ | **Core** | Node + TypeScript |
86
+ | **CLI Engine** | `create-*` + `prompts` + `degit` |
87
+ | **Infra** | GitHub Private Repo como CDN seguro de Packs |
88
+ | **Auth** | PRO_KEY Kiwify via verificar.html |
89
+ | **Frontend** | Next.js 15 + Tailwind v4 |
90
+
91
+ ---
92
+
93
+ <h2 id="templates-inclusos">6. 📦 Templates Inclusos no MVP</h2>
94
+
95
+ | Pack | Preço | O que entrega |
96
+ | :--------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
97
+ | `domisdocs-lite` | **R$49** | `firebase.json` killer + Hosting otimizado + `next.config` + `firestore.rules` básica |
98
+ | `domisdocs-pro` | **R$197** | Tudo do Lite + `firestore.rules` avançadas + `storage.rules` + `GitHub Actions` + `functions/` + Stripe Checkout + Kiwify Webhook + SSR |
99
+
100
+ ---
101
+
102
+ <h2 id="fluxo-de-uso">7. 🔄 Fluxo de Uso</h2>
103
+
104
+ 1. Cliente roda:
105
+
106
+ ```bash
107
+ npm create domis@latest
108
+ ```
109
+
110
+ 2. CLI faz:
111
+
112
+ ```bash
113
+ ✔ DomisPacks Technical v1.1.0
114
+ ✔ Qual pack você quer acelerar hoje?
115
+ ```
116
+
117
+ 3. Opções disponíveis:
118
+
119
+ ```bash
120
+ ✔ > 🔥 Ver DEMO Grátis - firebase.json
121
+ ```
122
+
123
+ 4. Ou seleciona Lite:
124
+
125
+ ```bash
126
+ ✔ > 🔥 DomisDocs Lite — Next.js 15 + Tailwind v4 + Firebase Killer
127
+ ```
128
+
129
+ 5. Ou Pro:
130
+
131
+ ```bash
132
+ ✔ 🔥 DomisDocs PRO — Next.js 15 + Stripe + Rules + SSR + CI/CD
133
+ ```
134
+
135
+ 6. Depois:
136
+
137
+ ```bash
138
+ ✔ Baixando pack...
139
+ ✔ Corrigindo firebase.json -> Hosting + Rewrites + Cache Next.js 15
140
+ ✔ Instalando deps...
141
+ ✔ Pronto!
142
+ cd meu-app && npm run dev
143
+ ```
144
+
145
+ ---
146
+
147
+ <h2 id="faq">8. 🧠 FAQ</h2>
148
+
149
+ <details>
150
+ <summary><strong>Precisa de Firebase CLI instalado ❓</strong></summary>
151
+ <p>⚠ <strong>Sim, para deploy.</strong> <code>npm i -g firebase-tools</code>. O <code>create-domis</code> só cria e corrige o projeto.</p>
152
+ </details>
153
+
154
+ <details>
155
+ <summary><strong>Funciona no Windows ❓</strong></summary>
156
+ <p>✅ <strong>Sim.</strong> Testado em PowerShell e CMD.</p>
157
+ </details>
158
+
159
+ <details>
160
+ <summary><strong>O que é a PRO_KEY ❓</strong></summary>
161
+ <p>🔑 É a key gerada após compra na Kiwify. Você cola no verificar.html como senha e ela libera seu pack. Não precisa digitar no terminal.</p>
162
+ </details>
163
+
164
+ <details>
165
+ <summary><strong>Funciona com SSR / Next.js App Router ❓</strong></summary>
166
+ <p>🌐 <strong>No Lite é Hosting estático otimizado.</strong> SSR completo + Functions está no Pack Pro com <code>ssr: true</code> já configurado.</p>
167
+ </details>
168
+
169
+ <details>
170
+ <summary><strong>Posso usar com GitHub Actions (deploy automático) ❓</strong></summary>
171
+ <p>🤖 <strong>Sim, mas no Lite é manual.</strong> No Lite você roda <code>firebase deploy</code>. No Pro já vem <code>.github/workflows/deploy.yml</code> que faz deploy a cada push na <code>main.</code></p>
172
+ </details>
173
+
174
+ ---
175
+
176
+ <h2 id="estrutura">9. 📁 Estrutura do Projeto Gerado</h2>
177
+
178
+ O que o `npm create domis@latest` cria dentro da pasta `meu-app/` - reaproveitável para Lite e futuro PRO:
179
+
180
+ ```
181
+ meu-app/
182
+ ├── firebase.json → Firebase Killer (Hosting + Rewrites + Cache)
183
+ ├── firestore.rules → Lite: basica / Pro: avançada multi-tenant
184
+ ├── storage.rules → Pro: regras avançadas (Lite: basica)
185
+ ├── next.config.js → Otimizado para Firebase Hosting
186
+ ├── tailwind.config.ts → Tailwind v4 ja configurado
187
+ ├── .github/
188
+ │ └── workflows/
189
+ │ └── deploy.yml → So no PRO: deploy automatico
190
+ ├── functions/ → So no PRO: Stripe + Kiwify Webhook + Validator
191
+ │ ├── src/
192
+ │ │ └── index.ts
193
+ │ └── package.json
194
+ └── src/
195
+ ├── app/
196
+ │ ├── (saas)/
197
+ │ │ └── dashboard/ → So no PRO
198
+ │ ├── layout.tsx
199
+ │ └── page.tsx
200
+ └── lib/
201
+ ├── firebase.ts
202
+ └── stripe.ts → So no PRO
203
+ ```
204
+
205
+ > No Lite você recebe tudo até : `src/lib/firebase.ts`. No PRO destrava : `functions/`, `.github/` e `storage.rules` avançadas.
206
+
207
+ ---
208
+
209
+ <h2 id="como-funciona-a-venda">10. 💳 Como Funciona a Venda</h2>
210
+
211
+ 1. Cliente compra na Kiwify (Lite R$49 ou Pro R$197)
212
+ 2. Kiwify envia PRO_KEY automatica por e-mail
213
+ 3. Cliente acessa verificar.html e ativa a key como senha
214
+ 4. Ele roda: `npm create domis@latest` e escolhe o pack liberado pela key
215
+ 5. Acesso liberado por 6 meses - renova com CUPOM: L2NNYK8 5% OFF
216
+
217
+ ---
218
+
219
+ <h2 id="licenca">11. 📄 Licença</h2>
220
+
221
+ Este repositório contém:
222
+
223
+ - **CLI - `create-domis` :** &nbsp; Private Commercial v1.2 - motor que aciona 3 opções (grátis/Lite/Pro)
224
+ - **Packs - meu-app/ gerado via CLI :** &nbsp; [![Private Commercial](https://img.shields.io/badge/License-Private_Commercial_v1.2-red?style=flat-square)](https://github.com/Domisnnet/DomisPacks-Technical/blob/main/LICENSE)
225
+
226
+ > **Uso pessoal, intransferível e não exclusivo.**
227
+ > Pode usar em projetos próprios e de clientes.
228
+ >
229
+ > **PROIBIDO:** Redistribuir, revender, compartilhar ou publicar o boilerplate como template/curso/pack concorrente. PRO_KEY pessoal e intransferível.
230
+ > Violação = revogação sem reembolso.
231
+
232
+ ---
233
+
234
+ <h2 id="perfil">12. 👨💻 DomisDev</h2>
235
+
236
+ > Caso precise de informações adicionais, abra uma Pull Request:
237
+
238
+ <a href="https://github.com/Domisnnet">
239
+ <img src="./src/assets/DomisDev.png" width="90" style="border-radius: 50%" alt="DomisDev">
240
+ </a>
241
+
242
+ <p align="center">
243
+ <a href="#sobre-o-cli">
244
+ <img src="https://img.shields.io/badge/⬆%20VOLTAR%20AO%20TOPO-26FF00?style=flat&labelColor=111827&color=0A0F1C" alt="Voltar ao topo" style="height: 30px;">
245
+ </a>
246
+ </p>
package/dist/index.js CHANGED
@@ -9,7 +9,14 @@ import path from "path";
9
9
  import os from "os";
10
10
  import extract from "extract-zip";
11
11
  var API_VERIFY = "https://verifyprokey-rk2ogbbeja-uc.a.run.app";
12
- console.log(chalk.green.bold("\n\u{1F525} DomisPacks Technical v1.0.51\n"));
12
+ console.log(chalk.green.bold("\n\u{1F525} DomisPacks Technical v1.0.53\n"));
13
+ function sanitizeProjectName(name) {
14
+ const base = path.basename(name.trim());
15
+ const sanitized = base.replace(/[^a-zA-Z0-9-_]/g, "-").replace(/^-+|-+$/g, "");
16
+ if (!sanitized || sanitized === "." || sanitized === "..") throw new Error("Nome de projeto inv\xE1lido");
17
+ if (sanitized.length < 2) throw new Error("Nome muito curto");
18
+ return sanitized;
19
+ }
13
20
  function copyRecursive(src, dest) {
14
21
  const stat = fs.lstatSync(src);
15
22
  if (stat.isDirectory()) {
@@ -24,14 +31,11 @@ function copyRecursive(src, dest) {
24
31
  }
25
32
  async function getDownloadUrl(pack, proKey) {
26
33
  const body = proKey ? { key: proKey, pack } : { pack };
27
- const res = await fetch(
28
- API_VERIFY,
29
- {
30
- method: "POST",
31
- headers: { "Content-Type": "application/json" },
32
- body: JSON.stringify(body)
33
- }
34
- );
34
+ const res = await fetch(API_VERIFY, {
35
+ method: "POST",
36
+ headers: { "Content-Type": "application/json" },
37
+ body: JSON.stringify(body)
38
+ });
35
39
  const data = await res.json();
36
40
  if (!res.ok || !data.valid) throw new Error(data.detail || data.reason || data.error || `HTTP ${res.status}`);
37
41
  if (!data.downloadUrl) throw new Error("API n\xE3o retornou downloadUrl");
@@ -39,19 +43,45 @@ async function getDownloadUrl(pack, proKey) {
39
43
  }
40
44
  async function main() {
41
45
  const ans = await inquirer.prompt([
42
- { type: "list", name: "pack", message: "Qual pack voc\xEA quer acelerar hoje?", choices: [
43
- { name: "\u{1F525} DomisDocs Free - Firebase", value: "free" },
44
- { name: "\u{1F525} DomisDocs Lite \u2014 Next.Js 15 + SaaS", value: "lite" },
45
- { name: "\u{1F525} DomisDocs PRO \u2014 Stripe + Rules", value: "pro" }
46
- ] },
47
- { type: "password", name: "proKey", message: "Digite sua PRO_KEY:", mask: "*", when: (a) => a.pack !== "free", validate: (v) => v.startsWith("DOMIS-") ? true : "Formato: DOMIS-XXXX-XXXX-XXXX" },
48
- { type: "input", name: "projectName", message: "Nome do projeto:", default: "meu-app", validate: (v) => v.trim() ? true : "Digite um nome" }
46
+ {
47
+ type: "list",
48
+ name: "pack",
49
+ message: "Qual pack voc\xEA quer acelerar hoje?",
50
+ choices: [
51
+ { name: "\u{1F525} DomisDocs Free - Firebase", value: "free" },
52
+ { name: "\u{1F525} DomisDocs Lite \u2014 Next.Js 15 + SaaS", value: "lite" },
53
+ { name: "\u{1F525} DomisDocs PRO \u2014 Stripe + Rules - R$197 EM BREVE", value: "pro" }
54
+ ]
55
+ },
56
+ {
57
+ type: "password",
58
+ name: "proKey",
59
+ message: "Digite sua PRO_KEY:",
60
+ mask: "*",
61
+ when: (a) => a.pack !== "free",
62
+ validate: (v) => v.trim().toUpperCase().startsWith("DOMIS-") ? true : "Formato: DOMIS-XXXX-XXXX-XXXX"
63
+ },
64
+ {
65
+ type: "input",
66
+ name: "projectName",
67
+ message: "Nome do projeto:",
68
+ default: "meu-app",
69
+ validate: (v) => {
70
+ try {
71
+ sanitizeProjectName(v);
72
+ return true;
73
+ } catch (e) {
74
+ return e.message;
75
+ }
76
+ }
77
+ }
49
78
  ]);
50
- if (fs.existsSync(ans.projectName)) {
51
- console.log(chalk.red(`\u274C Pasta "${ans.projectName}" j\xE1 existe!`));
79
+ const projectName = sanitizeProjectName(ans.projectName);
80
+ if (fs.existsSync(projectName)) {
81
+ console.log(chalk.red(`\u274C Pasta "${projectName}" j\xE1 existe!`));
52
82
  process.exit(1);
53
83
  }
54
- const spinner = ora("Baixando...").start();
84
+ const spinner = ora("\u2714 Baixando...").start();
55
85
  try {
56
86
  const url = await getDownloadUrl(ans.pack, ans.proKey);
57
87
  spinner.text = `Baixando ${ans.pack.toUpperCase()}...`;
@@ -64,13 +94,14 @@ async function main() {
64
94
  await extract(zipTmp, { dir: extractTmp });
65
95
  const files = fs.readdirSync(extractTmp);
66
96
  const srcDir = files.length === 1 && fs.lstatSync(path.join(extractTmp, files[0])).isDirectory() ? path.join(extractTmp, files[0]) : extractTmp;
67
- fs.mkdirSync(ans.projectName, { recursive: true });
68
- copyRecursive(srcDir, ans.projectName);
97
+ if (!fs.existsSync(srcDir)) throw new Error("ZIP vazio");
98
+ fs.mkdirSync(projectName, { recursive: true });
99
+ copyRecursive(srcDir, projectName);
69
100
  fs.rmSync(zipTmp, { force: true });
70
101
  fs.rmSync(extractTmp, { recursive: true, force: true });
71
- spinner.succeed(`\u2705 ${ans.projectName} criado!`);
102
+ spinner.succeed(`\u2705 ${projectName} criado!`);
72
103
  console.log(chalk.cyan(`
73
- \u{1F449} cd ${ans.projectName}
104
+ \u{1F449} cd ${projectName}
74
105
  \u{1F449} npm install
75
106
  \u{1F449} npm run dev
76
107
  `));
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "create-domis",
3
- "version": "1.0.51",
4
- "description": "CLI Oficial DomisPacks - Acelerador Next.js 15 + Tailwind v4 + SaaS Boilerplate",
5
- "type": "module",
6
- "files": [
7
- "dist"
8
- ],
9
- "bin": {
10
- "create-domis": "dist/index.js"
11
- },
12
- "scripts": {
13
- "build": "tsup src/index.ts --format esm --dts",
14
- "dev": "tsx src/index.ts",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "keywords": [
18
- "firebase",
19
- "domis",
20
- "create-domis",
21
- "cli"
22
- ],
23
- "author": "Domisnnet",
24
- "license": "LICENSE",
25
- "dependencies": {
26
- "chalk": "^5.3.0",
27
- "extract-zip": "^2.0.1",
28
- "inquirer": "^9.2.12",
29
- "ora": "^7.0.1"
30
- },
31
- "devDependencies": {
32
- "@types/extract-zip": "^2.0.0",
33
- "@types/inquirer": "^9.0.10",
34
- "@types/node": "^22.20.1",
35
- "tsup": "^8.5.1",
36
- "tsx": "^4.7.0",
37
- "typescript": "^5.9.3"
38
- },
39
- "engines": {
40
- "node": ">=18.0.0"
41
- }
42
- }
1
+ {
2
+ "name": "create-domis",
3
+ "version": "1.0.53",
4
+ "description": "CLI Oficial DomisPacks - Acelerador Next.js 15 + Tailwind v4 + SaaS Boilerplate",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "bin": {
10
+ "create-domis": "dist/index.js"
11
+ },
12
+ "scripts": {
13
+ "build": "tsup src/index.ts --format esm --dts",
14
+ "dev": "tsx src/index.ts",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "keywords": [
18
+ "firebase",
19
+ "domis",
20
+ "create-domis",
21
+ "cli"
22
+ ],
23
+ "author": "Domisnnet",
24
+ "license": "LICENSE",
25
+ "dependencies": {
26
+ "chalk": "^5.3.0",
27
+ "extract-zip": "^2.0.1",
28
+ "inquirer": "^9.2.12",
29
+ "ora": "^7.0.1"
30
+ },
31
+ "devDependencies": {
32
+ "@types/extract-zip": "^2.0.0",
33
+ "@types/inquirer": "^9.0.10",
34
+ "@types/node": "^22.20.1",
35
+ "tsup": "^8.5.1",
36
+ "tsx": "^4.7.0",
37
+ "typescript": "^5.9.3"
38
+ },
39
+ "engines": {
40
+ "node": ">=18.0.0"
41
+ }
42
+ }