@donotdev/cli 0.0.19 → 0.0.20

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 (45) hide show
  1. package/dependencies-matrix.json +135 -47
  2. package/dist/bin/commands/bump.js +5 -2
  3. package/dist/bin/commands/create-app.js +1 -1
  4. package/dist/bin/commands/create-project.js +13 -2
  5. package/dist/bin/commands/deploy.js +18 -0
  6. package/dist/bin/commands/setup.js +3 -0
  7. package/dist/bin/commands/staging.js +18 -0
  8. package/dist/bin/commands/type-check.js +10 -4
  9. package/dist/bin/dndev.js +120 -179
  10. package/dist/bin/donotdev.js +120 -179
  11. package/dist/index.js +31 -2
  12. package/package.json +1 -1
  13. package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
  14. package/templates/app-demo/public/favicon.svg.example +1 -0
  15. package/templates/app-demo/public/icon-192x192.png.example +0 -0
  16. package/templates/app-demo/public/icon-512x512.png.example +0 -0
  17. package/templates/app-demo/src/App.tsx.example +3 -1
  18. package/templates/app-demo/src/config/app.ts.example +1 -0
  19. package/templates/app-demo/src/entities/booking.ts.example +75 -0
  20. package/templates/app-demo/src/entities/onboarding.ts.example +160 -0
  21. package/templates/app-demo/src/entities/product.ts.example +12 -0
  22. package/templates/app-demo/src/entities/quote.ts.example +70 -0
  23. package/templates/app-demo/src/pages/ChangelogPage.tsx.example +28 -1
  24. package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +88 -0
  25. package/templates/app-demo/src/pages/DashboardPage.tsx.example +2 -0
  26. package/templates/app-demo/src/pages/HomePage.tsx.example +355 -2
  27. package/templates/app-demo/src/pages/OnboardingPage.tsx.example +47 -0
  28. package/templates/app-demo/src/pages/PricingPage.tsx.example +28 -1
  29. package/templates/app-demo/src/pages/ProductsPage.tsx.example +2 -0
  30. package/templates/app-demo/src/pages/ProfilePage.tsx.example +2 -0
  31. package/templates/app-demo/src/pages/SettingsPage.tsx.example +2 -0
  32. package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +22 -16
  33. package/templates/app-demo/src/pages/ShowcasePage.tsx.example +3 -1
  34. package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +147 -51
  35. package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +103 -21
  36. package/templates/app-demo/src/pages/components/componentConfig.ts.example +139 -59
  37. package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +12 -1
  38. package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +10 -1
  39. package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +10 -1
  40. package/templates/app-demo/src/themes.css.example +289 -77
  41. package/templates/app-demo/stats.html.example +4949 -0
  42. package/templates/app-next/src/locales/home_en.json.example +6 -6
  43. package/templates/app-vite/src/locales/home_en.json.example +6 -6
  44. package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +252 -252
  45. package/templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example +174 -174
@@ -1,6 +1,6 @@
1
- {
2
- "hero": {
3
- "title": "Welcome to DnDev",
4
- "subtitle": "Your app is ready. Explore the framework patterns below."
5
- }
6
- }
1
+ {
2
+ "hero": {
3
+ "title": "Welcome to DnDev",
4
+ "subtitle": "Your app is ready. Explore the framework patterns below."
5
+ }
6
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "hero": {
3
- "title": "Welcome to DnDev",
4
- "subtitle": "Your app is ready. Explore the framework patterns below."
5
- }
6
- }
1
+ {
2
+ "hero": {
3
+ "title": "Welcome to DnDev",
4
+ "subtitle": "Your app is ready. Explore the framework patterns below."
5
+ }
6
+ }
@@ -1,252 +1,252 @@
1
- # Cookie Reference Guide
2
-
3
- **For Framework Consumers: GDPR Compliance**
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- This guide maps DoNotDev framework features to the cookies they set, helping you configure your cookie consent banner and privacy policy correctly.
10
-
11
- ---
12
-
13
- ## Cookie Categories (GDPR)
14
-
15
- - **Necessary** - Essential for service to function (no consent required per GDPR Article 6(1)(f))
16
- - **Functional** - Enhances experience (requires consent per GDPR Article 6(1)(a))
17
- - **Analytics** - Usage tracking (requires consent)
18
- - **Marketing** - Advertising/tracking (requires consent)
19
-
20
- ---
21
-
22
- ## Feature Cookie Mapping
23
-
24
- ### Authentication (`@donotdev/auth`)
25
-
26
- **Provider: Firebase Authentication**
27
-
28
- | Cookie Name | Category | Purpose | Expires |
29
- |------------|----------|---------|---------|
30
- | `__session` | Necessary | Session authentication token | Session |
31
- | `__Secure-*` | Necessary | Security tokens (HTTPS only) | Varies |
32
-
33
- **GDPR Status:** Necessary - Authentication is essential for account-based services.
34
-
35
- **Environment Variables:**
36
- ```bash
37
- VITE_FIREBASE_API_KEY=your-key
38
- VITE_FIREBASE_PROJECT_ID=your-project
39
- ```
40
-
41
- ---
42
-
43
- ### OAuth (`@donotdev/oauth`)
44
-
45
- **Providers: Google, GitHub OAuth**
46
-
47
- | Cookie Name | Category | Purpose | Expires |
48
- |------------|----------|---------|---------|
49
- | OAuth state cookies | Necessary | CSRF protection during OAuth flow | Session |
50
- | Provider session cookies | Necessary | Maintain OAuth session | Per provider |
51
-
52
- **GDPR Status:** Necessary - Part of authentication flow.
53
-
54
- **Environment Variables:**
55
- ```bash
56
- VITE_AUTH_PARTNERS=google,github
57
- ```
58
-
59
- **Third-party cookies set by OAuth providers:**
60
- - **Google:** `SID`, `HSID`, `SSID`, `APISID`, `SAPISID` (necessary for OAuth)
61
- - **GitHub:** `user_session`, `logged_in` (necessary for OAuth)
62
-
63
- ---
64
-
65
- ### Billing (`@donotdev/billing`)
66
-
67
- **Provider: Stripe**
68
-
69
- | Cookie Name | Category | Purpose | Expires |
70
- |------------|----------|---------|---------|
71
- | `__stripe_mid` | Necessary | Fraud prevention | 1 year |
72
- | `__stripe_sid` | Necessary | Checkout session | 30 minutes |
73
-
74
- **GDPR Status:** Necessary - Required for payment processing and fraud prevention.
75
-
76
- **Environment Variables:**
77
- ```bash
78
- VITE_STRIPE_PUBLIC_KEY=pk_live_xxx
79
- ```
80
-
81
- **Stripe Privacy:** Stripe sets these cookies when Checkout or Customer Portal is opened. They're classified as necessary for PCI compliance and fraud prevention.
82
-
83
- ---
84
-
85
- ### Framework Core Cookies
86
-
87
- **Set by `@donotdev/core`**
88
-
89
- | Cookie Name | Category | Purpose | Expires |
90
- |------------|----------|---------|---------|
91
- | `dndev-cookie-consent` | Necessary | Stores user's cookie preferences | 365 days |
92
- | `dndev-theme` | Necessary | Remembers dark/light mode preference | 365 days |
93
- | `dndev-lang` | Necessary | Remembers language preference | 365 days |
94
-
95
- **GDPR Status:** Necessary (essential for UX, no tracking, purely local preferences)
96
-
97
- ---
98
-
99
- ## Analytics & Marketing (Optional)
100
-
101
- These are NOT included in the framework but commonly added by consumers:
102
-
103
- ### Google Analytics
104
-
105
- | Cookie Name | Category | Purpose | Expires |
106
- |------------|----------|---------|---------|
107
- | `_ga` | Analytics | Distinguish users | 2 years |
108
- | `_gid` | Analytics | Distinguish users | 24 hours |
109
- | `_gat` | Analytics | Throttle requests | 1 minute |
110
-
111
- **GDPR Status:** Analytics - Requires explicit consent.
112
-
113
- **Setup:** Consumer must add Google Analytics script and obtain consent.
114
-
115
- ### Facebook Pixel
116
-
117
- | Cookie Name | Category | Purpose | Expires |
118
- |------------|----------|---------|---------|
119
- | `_fbp` | Marketing | Track conversions | 90 days |
120
-
121
- **GDPR Status:** Marketing - Requires explicit consent.
122
-
123
- ---
124
-
125
- ## Cookie Banner Configuration
126
-
127
- ### Minimal Setup (Auth + Billing + Theme/Lang)
128
-
129
- If your app only uses auth, billing, theme, and language preferences, all cookies are **necessary**:
130
-
131
- ```typescript
132
- // src/config/app.ts
133
- export const appConfig: AppConfig = {
134
- features: {
135
- // No config needed - all framework cookies are necessary
136
- },
137
- };
138
- ```
139
-
140
- **Result:** No cookie banner shown - all cookies are GDPR-compliant without consent.
141
-
142
- ### With Analytics/Marketing
143
-
144
- If you add Google Analytics or marketing pixels:
145
-
146
- ```typescript
147
- // src/config/app.ts
148
- export const appConfig: AppConfig = {
149
- features: {
150
- requiredCookies: ['necessary', 'functional', 'analytics'],
151
- },
152
- };
153
- ```
154
-
155
- **Result:** Cookie banner shows all categories, users must consent to analytics.
156
-
157
- ---
158
-
159
- ## Privacy Policy Template
160
-
161
- **Example text for your privacy policy:**
162
-
163
- ```markdown
164
- ## Cookies We Use
165
-
166
- ### Essential Cookies (Always Active)
167
-
168
- We use essential cookies that are necessary for our service to function:
169
-
170
- - **Authentication** (Firebase): Maintains your login session
171
- - **Payment Processing** (Stripe): Enables secure payments and fraud prevention
172
- - **Cookie Preferences**: Remembers your cookie consent choices
173
-
174
- These cookies are essential and cannot be disabled.
175
-
176
- ### Functional Cookies (Optional)
177
-
178
- With your consent, we use functional cookies to enhance your experience:
179
-
180
- - **Theme Preference**: Remembers your dark/light mode choice
181
- - **Language Preference**: Remembers your selected language
182
-
183
- You can disable these in cookie settings.
184
-
185
- ### Analytics Cookies (Optional) [If applicable]
186
-
187
- With your consent, we use Google Analytics to understand how visitors use our site.
188
- This helps us improve the user experience.
189
-
190
- You can disable these in cookie settings.
191
- ```
192
-
193
- ---
194
-
195
- ## Testing Cookie Compliance
196
-
197
- ### Check What Cookies Are Set
198
-
199
- ```javascript
200
- // Browser console
201
- document.cookie
202
- ```
203
-
204
- ### Verify Consent Before Analytics
205
-
206
- ```typescript
207
- import { useConsent } from '@donotdev/core';
208
-
209
- function MyAnalytics() {
210
- const hasAnalyticsConsent = useConsent('hasCategory')('analytics');
211
-
212
- useEffect(() => {
213
- if (hasAnalyticsConsent) {
214
- // Initialize Google Analytics
215
- }
216
- }, [hasAnalyticsConsent]);
217
- }
218
- ```
219
-
220
- ---
221
-
222
- ## GDPR Compliance Checklist
223
-
224
- - [ ] List all cookies in privacy policy with categories
225
- - [ ] Only set analytics/marketing cookies after consent
226
- - [ ] Provide cookie settings link in footer
227
- - [ ] Allow users to withdraw consent
228
- - [ ] Store consent for 12 months maximum
229
- - [ ] Don't block essential features if functional cookies declined
230
-
231
- **Framework handles:** Consent storage, banner UI, category management
232
-
233
- **You handle:** Privacy policy text, analytics integration, marketing pixels
234
-
235
- ---
236
-
237
- ## Quick Reference
238
-
239
- | Feature | Cookies | Category | Consent Required? |
240
- |---------|---------|----------|-------------------|
241
- | Auth | `__session`, `__Secure-*` | Necessary | No |
242
- | OAuth | Provider session cookies | Necessary | No |
243
- | Billing | `__stripe_mid`, `__stripe_sid` | Necessary | No |
244
- | Theme | `dndev-theme` | Necessary | No |
245
- | Language | `dndev-lang` | Necessary | No |
246
- | Consent | `dndev-cookie-consent` | Necessary | No |
247
- | Analytics | `_ga`, `_gid` | Analytics | Yes |
248
- | Marketing | `_fbp`, etc. | Marketing | Yes |
249
-
250
- ---
251
-
252
- **Need help?** Check your browser DevTools → Application → Cookies to see exactly what's being set.
1
+ # Cookie Reference Guide
2
+
3
+ **For Framework Consumers: GDPR Compliance**
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ This guide maps DoNotDev framework features to the cookies they set, helping you configure your cookie consent banner and privacy policy correctly.
10
+
11
+ ---
12
+
13
+ ## Cookie Categories (GDPR)
14
+
15
+ - **Necessary** - Essential for service to function (no consent required per GDPR Article 6(1)(f))
16
+ - **Functional** - Enhances experience (requires consent per GDPR Article 6(1)(a))
17
+ - **Analytics** - Usage tracking (requires consent)
18
+ - **Marketing** - Advertising/tracking (requires consent)
19
+
20
+ ---
21
+
22
+ ## Feature Cookie Mapping
23
+
24
+ ### Authentication (`@donotdev/auth`)
25
+
26
+ **Provider: Firebase Authentication**
27
+
28
+ | Cookie Name | Category | Purpose | Expires |
29
+ |------------|----------|---------|---------|
30
+ | `__session` | Necessary | Session authentication token | Session |
31
+ | `__Secure-*` | Necessary | Security tokens (HTTPS only) | Varies |
32
+
33
+ **GDPR Status:** Necessary - Authentication is essential for account-based services.
34
+
35
+ **Environment Variables:**
36
+ ```bash
37
+ VITE_FIREBASE_API_KEY=your-key
38
+ VITE_FIREBASE_PROJECT_ID=your-project
39
+ ```
40
+
41
+ ---
42
+
43
+ ### OAuth (`@donotdev/oauth`)
44
+
45
+ **Providers: Google, GitHub OAuth**
46
+
47
+ | Cookie Name | Category | Purpose | Expires |
48
+ |------------|----------|---------|---------|
49
+ | OAuth state cookies | Necessary | CSRF protection during OAuth flow | Session |
50
+ | Provider session cookies | Necessary | Maintain OAuth session | Per provider |
51
+
52
+ **GDPR Status:** Necessary - Part of authentication flow.
53
+
54
+ **Environment Variables:**
55
+ ```bash
56
+ VITE_AUTH_PARTNERS=google,github
57
+ ```
58
+
59
+ **Third-party cookies set by OAuth providers:**
60
+ - **Google:** `SID`, `HSID`, `SSID`, `APISID`, `SAPISID` (necessary for OAuth)
61
+ - **GitHub:** `user_session`, `logged_in` (necessary for OAuth)
62
+
63
+ ---
64
+
65
+ ### Billing (`@donotdev/billing`)
66
+
67
+ **Provider: Stripe**
68
+
69
+ | Cookie Name | Category | Purpose | Expires |
70
+ |------------|----------|---------|---------|
71
+ | `__stripe_mid` | Necessary | Fraud prevention | 1 year |
72
+ | `__stripe_sid` | Necessary | Checkout session | 30 minutes |
73
+
74
+ **GDPR Status:** Necessary - Required for payment processing and fraud prevention.
75
+
76
+ **Environment Variables:**
77
+ ```bash
78
+ VITE_STRIPE_PUBLIC_KEY=pk_live_xxx
79
+ ```
80
+
81
+ **Stripe Privacy:** Stripe sets these cookies when Checkout or Customer Portal is opened. They're classified as necessary for PCI compliance and fraud prevention.
82
+
83
+ ---
84
+
85
+ ### Framework Core Cookies
86
+
87
+ **Set by `@donotdev/core`**
88
+
89
+ | Cookie Name | Category | Purpose | Expires |
90
+ |------------|----------|---------|---------|
91
+ | `dndev-cookie-consent` | Necessary | Stores user's cookie preferences | 365 days |
92
+ | `dndev-theme` | Necessary | Remembers dark/light mode preference | 365 days |
93
+ | `dndev-lang` | Necessary | Remembers language preference | 365 days |
94
+
95
+ **GDPR Status:** Necessary (essential for UX, no tracking, purely local preferences)
96
+
97
+ ---
98
+
99
+ ## Analytics & Marketing (Optional)
100
+
101
+ These are NOT included in the framework but commonly added by consumers:
102
+
103
+ ### Google Analytics
104
+
105
+ | Cookie Name | Category | Purpose | Expires |
106
+ |------------|----------|---------|---------|
107
+ | `_ga` | Analytics | Distinguish users | 2 years |
108
+ | `_gid` | Analytics | Distinguish users | 24 hours |
109
+ | `_gat` | Analytics | Throttle requests | 1 minute |
110
+
111
+ **GDPR Status:** Analytics - Requires explicit consent.
112
+
113
+ **Setup:** Consumer must add Google Analytics script and obtain consent.
114
+
115
+ ### Facebook Pixel
116
+
117
+ | Cookie Name | Category | Purpose | Expires |
118
+ |------------|----------|---------|---------|
119
+ | `_fbp` | Marketing | Track conversions | 90 days |
120
+
121
+ **GDPR Status:** Marketing - Requires explicit consent.
122
+
123
+ ---
124
+
125
+ ## Cookie Banner Configuration
126
+
127
+ ### Minimal Setup (Auth + Billing + Theme/Lang)
128
+
129
+ If your app only uses auth, billing, theme, and language preferences, all cookies are **necessary**:
130
+
131
+ ```typescript
132
+ // src/config/app.ts
133
+ export const appConfig: AppConfig = {
134
+ features: {
135
+ // No config needed - all framework cookies are necessary
136
+ },
137
+ };
138
+ ```
139
+
140
+ **Result:** No cookie banner shown - all cookies are GDPR-compliant without consent.
141
+
142
+ ### With Analytics/Marketing
143
+
144
+ If you add Google Analytics or marketing pixels:
145
+
146
+ ```typescript
147
+ // src/config/app.ts
148
+ export const appConfig: AppConfig = {
149
+ features: {
150
+ requiredCookies: ['necessary', 'functional', 'analytics'],
151
+ },
152
+ };
153
+ ```
154
+
155
+ **Result:** Cookie banner shows all categories, users must consent to analytics.
156
+
157
+ ---
158
+
159
+ ## Privacy Policy Template
160
+
161
+ **Example text for your privacy policy:**
162
+
163
+ ```markdown
164
+ ## Cookies We Use
165
+
166
+ ### Essential Cookies (Always Active)
167
+
168
+ We use essential cookies that are necessary for our service to function:
169
+
170
+ - **Authentication** (Firebase): Maintains your login session
171
+ - **Payment Processing** (Stripe): Enables secure payments and fraud prevention
172
+ - **Cookie Preferences**: Remembers your cookie consent choices
173
+
174
+ These cookies are essential and cannot be disabled.
175
+
176
+ ### Functional Cookies (Optional)
177
+
178
+ With your consent, we use functional cookies to enhance your experience:
179
+
180
+ - **Theme Preference**: Remembers your dark/light mode choice
181
+ - **Language Preference**: Remembers your selected language
182
+
183
+ You can disable these in cookie settings.
184
+
185
+ ### Analytics Cookies (Optional) [If applicable]
186
+
187
+ With your consent, we use Google Analytics to understand how visitors use our site.
188
+ This helps us improve the user experience.
189
+
190
+ You can disable these in cookie settings.
191
+ ```
192
+
193
+ ---
194
+
195
+ ## Testing Cookie Compliance
196
+
197
+ ### Check What Cookies Are Set
198
+
199
+ ```javascript
200
+ // Browser console
201
+ document.cookie
202
+ ```
203
+
204
+ ### Verify Consent Before Analytics
205
+
206
+ ```typescript
207
+ import { useConsent } from '@donotdev/core';
208
+
209
+ function MyAnalytics() {
210
+ const hasAnalyticsConsent = useConsent('hasCategory')('analytics');
211
+
212
+ useEffect(() => {
213
+ if (hasAnalyticsConsent) {
214
+ // Initialize Google Analytics
215
+ }
216
+ }, [hasAnalyticsConsent]);
217
+ }
218
+ ```
219
+
220
+ ---
221
+
222
+ ## GDPR Compliance Checklist
223
+
224
+ - [ ] List all cookies in privacy policy with categories
225
+ - [ ] Only set analytics/marketing cookies after consent
226
+ - [ ] Provide cookie settings link in footer
227
+ - [ ] Allow users to withdraw consent
228
+ - [ ] Store consent for 12 months maximum
229
+ - [ ] Don't block essential features if functional cookies declined
230
+
231
+ **Framework handles:** Consent storage, banner UI, category management
232
+
233
+ **You handle:** Privacy policy text, analytics integration, marketing pixels
234
+
235
+ ---
236
+
237
+ ## Quick Reference
238
+
239
+ | Feature | Cookies | Category | Consent Required? |
240
+ |---------|---------|----------|-------------------|
241
+ | Auth | `__session`, `__Secure-*` | Necessary | No |
242
+ | OAuth | Provider session cookies | Necessary | No |
243
+ | Billing | `__stripe_mid`, `__stripe_sid` | Necessary | No |
244
+ | Theme | `dndev-theme` | Necessary | No |
245
+ | Language | `dndev-lang` | Necessary | No |
246
+ | Consent | `dndev-cookie-consent` | Necessary | No |
247
+ | Analytics | `_ga`, `_gid` | Analytics | Yes |
248
+ | Marketing | `_fbp`, etc. | Marketing | Yes |
249
+
250
+ ---
251
+
252
+ **Need help?** Check your browser DevTools → Application → Cookies to see exactly what's being set.