@digilogiclabs/create-saas-app 1.1.0

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 (27) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +472 -0
  3. package/bin/index.js +3 -0
  4. package/dist/index.d.ts +5 -0
  5. package/dist/index.js +20791 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +105 -0
  8. package/src/templates/mobile/base/template/App.tsx +47 -0
  9. package/src/templates/mobile/base/template/package.json +38 -0
  10. package/src/templates/shared/auth/firebase/web/config.ts +24 -0
  11. package/src/templates/shared/auth/supabase/web/config.ts +9 -0
  12. package/src/templates/web/base/template/.env.example +34 -0
  13. package/src/templates/web/base/template/.eslintrc.js +8 -0
  14. package/src/templates/web/base/template/README.md +68 -0
  15. package/src/templates/web/base/template/next.config.js +15 -0
  16. package/src/templates/web/base/template/package.json +48 -0
  17. package/src/templates/web/base/template/postcss.config.js +7 -0
  18. package/src/templates/web/base/template/src/app/globals.css +60 -0
  19. package/src/templates/web/base/template/src/app/layout.tsx +28 -0
  20. package/src/templates/web/base/template/src/app/page.tsx +108 -0
  21. package/src/templates/web/base/template/src/components/providers/app-providers.tsx +21 -0
  22. package/src/templates/web/base/template/src/components/ui/badge.tsx +36 -0
  23. package/src/templates/web/base/template/src/components/ui/button.tsx +56 -0
  24. package/src/templates/web/base/template/src/components/ui/card.tsx +71 -0
  25. package/src/templates/web/base/template/src/lib/utils.ts +7 -0
  26. package/src/templates/web/base/template/tailwind.config.js +77 -0
  27. package/src/templates/web/base/template/tsconfig.json +33 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @digilogiclabs/create-saas-app
2
+
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - init
package/README.md ADDED
@@ -0,0 +1,472 @@
1
+ # @digilogiclabs/create-saas-app
2
+
3
+ Create modern SaaS applications with DigitalLogic Labs packages in seconds. This CLI tool generates production-ready web and mobile applications with authentication, theming, and best practices built-in.
4
+
5
+ ## 🚀 Quick Start
6
+
7
+ ```bash
8
+ # Create a web SaaS application
9
+ npx @digilogiclabs/create-saas-app web saas my-startup
10
+
11
+ # Create a mobile app with tab navigation
12
+ npx @digilogiclabs/create-saas-app mobile tabs my-mobile-app
13
+
14
+ # Create both web and mobile apps
15
+ npx @digilogiclabs/create-saas-app both base my-full-stack-app
16
+ ```
17
+
18
+ ## 📦 Installation
19
+
20
+ ### Using npx (Recommended)
21
+ ```bash
22
+ npx @digilogiclabs/create-saas-app
23
+ ```
24
+
25
+ ### Global Installation
26
+ ```bash
27
+ npm install -g @digilogiclabs/create-saas-app
28
+ create-saas-app --help
29
+ ```
30
+
31
+ ## 🎯 Features
32
+
33
+ - 🚀 **Rapid Development**: From idea to running app in under 5 minutes
34
+ - 🎯 **Platform Flexibility**: Web (Next.js), Mobile (Expo), or both
35
+ - 🔧 **Smart Configuration**: Auto-configures auth, database, and themes
36
+ - 📦 **Package Integration**: Pre-configured with DigitalLogic Labs packages
37
+ - 🎨 **Multiple Themes**: Corporate, startup, or default styling
38
+ - 🔐 **Auth Ready**: Firebase or Supabase authentication
39
+ - 📊 **Database Ready**: Supabase or Firebase database setup
40
+ - 🚀 **Deploy Ready**: Vercel, Netlify, and Expo deployment configs
41
+ - 📱 **Responsive Design**: Mobile-first approach for web apps
42
+ - 🌙 **Dark Mode**: Built-in theme switching
43
+ - 📦 **TypeScript**: Type-safe development
44
+ - 🎯 **ESLint & Prettier**: Code quality tools
45
+
46
+ ## 🌐 Web Applications
47
+
48
+ ### Available Web Templates
49
+
50
+ #### **Base Template**
51
+ Clean Next.js starter with authentication and UI components
52
+ ```bash
53
+ npx @digilogiclabs/create-saas-app web base my-web-app
54
+ ```
55
+
56
+ #### **Dashboard Template**
57
+ Admin dashboard with analytics and user management
58
+ ```bash
59
+ npx @digilogiclabs/create-saas-app web dashboard admin-panel
60
+ ```
61
+
62
+ #### **SaaS Template**
63
+ Multi-tenant SaaS application with billing and teams
64
+ ```bash
65
+ npx @digilogiclabs/create-saas-app web saas my-saas-platform
66
+ ```
67
+
68
+ ### Web Project Structure
69
+ ```
70
+ my-web-app/
71
+ ├── src/
72
+ │ ├── app/ # Next.js App Router
73
+ │ │ ├── globals.css # Global styles with Tailwind
74
+ │ │ ├── layout.tsx # Root layout with providers
75
+ │ │ └── page.tsx # Home page component
76
+ │ ├── components/ # Reusable React components
77
+ │ │ ├── auth/ # Authentication components
78
+ │ │ ├── layout/ # Layout components (header, footer)
79
+ │ │ ├── ui/ # UI components (buttons, cards, etc.)
80
+ │ │ └── providers/ # Context providers
81
+ │ ├── lib/ # Utility libraries
82
+ │ │ └── utils.ts # Helper functions
83
+ │ ├── hooks/ # Custom React hooks
84
+ │ └── types/ # TypeScript type definitions
85
+ ├── public/ # Static assets
86
+ ├── .env.example # Environment variables template
87
+ ├── tailwind.config.js # Tailwind CSS configuration
88
+ ├── next.config.js # Next.js configuration
89
+ └── package.json # Dependencies and scripts
90
+ ```
91
+
92
+ ### Getting Started with Web Apps
93
+
94
+ 1. **Create your project**:
95
+ ```bash
96
+ npx @digilogiclabs/create-saas-app web base my-web-app
97
+ cd my-web-app
98
+ ```
99
+
100
+ 2. **Configure environment variables**:
101
+ ```bash
102
+ cp .env.example .env.local
103
+ # Edit .env.local with your configuration
104
+ ```
105
+
106
+ 3. **Start development server**:
107
+ ```bash
108
+ npm run dev
109
+ ```
110
+
111
+ 4. **Open in browser**: http://localhost:3000
112
+
113
+ ### Web Environment Variables
114
+ ```bash
115
+ # App Configuration
116
+ NEXT_PUBLIC_APP_NAME=my-web-app
117
+ NEXT_PUBLIC_APP_URL=http://localhost:3000
118
+
119
+ # Firebase (if selected)
120
+ NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
121
+ NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
122
+ NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
123
+
124
+ # Supabase (if selected)
125
+ NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
126
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
127
+ ```
128
+
129
+ ## 📱 Mobile Applications
130
+
131
+ ### Available Mobile Templates
132
+
133
+ #### **Base Template**
134
+ Simple Expo app with navigation and authentication
135
+ ```bash
136
+ npx @digilogiclabs/create-saas-app mobile base my-mobile-app
137
+ ```
138
+
139
+ #### **Tabs Template**
140
+ Tab-based navigation structure
141
+ ```bash
142
+ npx @digilogiclabs/create-saas-app mobile tabs my-tabs-app
143
+ ```
144
+
145
+ #### **Stack Template**
146
+ Stack-based navigation structure
147
+ ```bash
148
+ npx @digilogiclabs/create-saas-app mobile stack my-stack-app
149
+ ```
150
+
151
+ ### Mobile Project Structure
152
+ ```
153
+ my-mobile-app/
154
+ ├── src/
155
+ │ ├── navigation/ # React Navigation setup
156
+ │ ├── screens/ # Screen components
157
+ │ │ ├── auth/ # Authentication screens
158
+ │ │ └── main/ # Main app screens
159
+ │ ├── components/ # Reusable components
160
+ │ │ ├── auth/ # Auth-related components
161
+ │ │ ├── layout/ # Layout components
162
+ │ │ └── ui/ # UI components
163
+ │ ├── providers/ # Context providers
164
+ │ ├── hooks/ # Custom hooks
165
+ │ ├── services/ # API and external services
166
+ │ ├── utils/ # Utility functions
167
+ │ └── types/ # TypeScript definitions
168
+ ├── assets/ # Images, icons, fonts
169
+ ├── App.tsx # Root component
170
+ ├── app.json # Expo configuration
171
+ └── package.json # Dependencies and scripts
172
+ ```
173
+
174
+ ### Getting Started with Mobile Apps
175
+
176
+ 1. **Create your project**:
177
+ ```bash
178
+ npx @digilogiclabs/create-saas-app mobile base my-mobile-app
179
+ cd my-mobile-app
180
+ ```
181
+
182
+ 2. **Install dependencies**:
183
+ ```bash
184
+ npm install
185
+ ```
186
+
187
+ 3. **Start Expo development server**:
188
+ ```bash
189
+ npm start
190
+ # or
191
+ npx expo start
192
+ ```
193
+
194
+ 4. **Run on device/simulator**:
195
+ - **iOS**: `npm run ios` or scan QR code with Camera app
196
+ - **Android**: `npm run android` or scan QR code with Expo Go app
197
+ - **Web**: `npm run web`
198
+
199
+ ### Mobile Development Requirements
200
+
201
+ - **Node.js**: 16.0.0 or higher
202
+ - **Expo CLI**: `npm install -g @expo/cli`
203
+ - **iOS Development**: Xcode (macOS only)
204
+ - **Android Development**: Android Studio
205
+ - **Physical Device**: Expo Go app for testing
206
+
207
+ ## 🔧 Command Line Interface
208
+
209
+ ### Interactive Mode
210
+ ```bash
211
+ npx @digilogiclabs/create-saas-app
212
+ ```
213
+ The CLI will guide you through project configuration with interactive prompts.
214
+
215
+ ### Command Line Options
216
+ ```bash
217
+ npx @digilogiclabs/create-saas-app <platform> [template] [name] [options]
218
+
219
+ Arguments:
220
+ platform Platform: web, mobile, or both
221
+ template Template type (optional)
222
+ name Project name (optional)
223
+
224
+ Options:
225
+ -a, --auth <provider> Auth provider: firebase, supabase
226
+ -d, --database <provider> Database provider: supabase, firebase
227
+ -t, --theme <theme> Theme: default, corporate, startup
228
+ --no-install Skip package installation
229
+ --no-git Skip git initialization
230
+ -y, --yes Skip interactive prompts
231
+ -h, --help Display help for command
232
+ ```
233
+
234
+ ### Usage Examples
235
+
236
+ #### Web Applications
237
+ ```bash
238
+ # Basic web app with defaults
239
+ npx @digilogiclabs/create-saas-app web base my-app
240
+
241
+ # SaaS app with Supabase and corporate theme
242
+ npx @digilogiclabs/create-saas-app web saas my-startup \
243
+ --auth=supabase --database=supabase --theme=corporate
244
+
245
+ # Dashboard with Firebase auth
246
+ npx @digilogiclabs/create-saas-app web dashboard admin-panel \
247
+ --auth=firebase --database=firebase
248
+
249
+ # Skip installation and git init
250
+ npx @digilogiclabs/create-saas-app web base my-app \
251
+ --no-install --no-git
252
+ ```
253
+
254
+ #### Mobile Applications
255
+ ```bash
256
+ # Basic mobile app
257
+ npx @digilogiclabs/create-saas-app mobile base my-mobile-app
258
+
259
+ # Tab navigation with Firebase
260
+ npx @digilogiclabs/create-saas-app mobile tabs my-tabs-app \
261
+ --auth=firebase
262
+
263
+ # Stack navigation with Supabase
264
+ npx @digilogiclabs/create-saas-app mobile stack my-stack-app \
265
+ --auth=supabase --database=supabase
266
+ ```
267
+
268
+ #### Full-Stack Applications
269
+ ```bash
270
+ # Create both web and mobile
271
+ npx @digilogiclabs/create-saas-app both base my-full-stack-app
272
+
273
+ # With specific configuration
274
+ npx @digilogiclabs/create-saas-app both base my-platform \
275
+ --auth=supabase --database=supabase --theme=startup
276
+ ```
277
+
278
+ ## 🎨 Themes
279
+
280
+ ### Default Theme
281
+ Clean and modern design with neutral colors
282
+ ```bash
283
+ --theme=default
284
+ ```
285
+
286
+ ### Corporate Theme
287
+ Professional business theme with blue accents
288
+ ```bash
289
+ --theme=corporate
290
+ ```
291
+
292
+ ### Startup Theme
293
+ Bold and innovative design with purple accents
294
+ ```bash
295
+ --theme=startup
296
+ ```
297
+
298
+ ## 🔐 Authentication Setup
299
+
300
+ ### Firebase Authentication
301
+
302
+ 1. **Create Firebase Project**: https://console.firebase.google.com
303
+ 2. **Enable Authentication**: Go to Authentication > Sign-in method
304
+ 3. **Get Configuration**: Project Settings > General > Your apps
305
+ 4. **Update Environment Variables**:
306
+ ```bash
307
+ NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
308
+ NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
309
+ NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
310
+ ```
311
+
312
+ ### Supabase Authentication
313
+
314
+ 1. **Create Supabase Project**: https://supabase.com/dashboard
315
+ 2. **Get API Keys**: Settings > API
316
+ 3. **Update Environment Variables**:
317
+ ```bash
318
+ NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
319
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
320
+ ```
321
+
322
+ ## 🚀 Deployment
323
+
324
+ ### Web Deployment
325
+
326
+ #### Vercel (Recommended)
327
+ ```bash
328
+ npm install -g vercel
329
+ vercel
330
+ ```
331
+
332
+ #### Netlify
333
+ ```bash
334
+ npm run build
335
+ # Upload dist folder to Netlify
336
+ ```
337
+
338
+ ### Mobile Deployment
339
+
340
+ #### Expo Application Services (EAS)
341
+ ```bash
342
+ npm install -g eas-cli
343
+ eas build
344
+ eas submit
345
+ ```
346
+
347
+ #### Manual Build
348
+ ```bash
349
+ # iOS
350
+ npx expo run:ios --configuration Release
351
+
352
+ # Android
353
+ npx expo run:android --variant release
354
+ ```
355
+
356
+ ## 🛠️ Adding Features
357
+
358
+ Add features to existing projects:
359
+
360
+ ```bash
361
+ # Add billing to your SaaS app
362
+ npx @digilogiclabs/create-saas-app add billing --provider=stripe
363
+
364
+ # Add analytics
365
+ npx @digilogiclabs/create-saas-app add analytics --provider=mixpanel
366
+
367
+ # Add team management
368
+ npx @digilogiclabs/create-saas-app add teams
369
+ ```
370
+
371
+ ## 🔄 Updating Dependencies
372
+
373
+ Keep your DigitalLogic Labs packages up to date:
374
+
375
+ ```bash
376
+ # Check for updates
377
+ npx @digilogiclabs/create-saas-app update --check
378
+
379
+ # Update all packages
380
+ npx @digilogiclabs/create-saas-app update
381
+ ```
382
+
383
+ ## 📋 Requirements
384
+
385
+ - **Node.js**: 16.0.0 or higher
386
+ - **Package Manager**: npm, yarn, or pnpm
387
+ - **Git**: For repository initialization
388
+ - **Expo CLI**: For mobile development (`npm install -g @expo/cli`)
389
+
390
+ ## 🤝 Contributing
391
+
392
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
393
+
394
+ ### Development Setup
395
+
396
+ 1. **Clone the repository**:
397
+ ```bash
398
+ git clone https://github.com/DigiLogicLabs/create-saas-app.git
399
+ cd create-saas-app
400
+ ```
401
+
402
+ 2. **Install dependencies**:
403
+ ```bash
404
+ npm install
405
+ ```
406
+
407
+ 3. **Build the CLI**:
408
+ ```bash
409
+ npm run build
410
+ ```
411
+
412
+ 4. **Test locally**:
413
+ ```bash
414
+ node dist/cli/index.js create web base test-app
415
+ ```
416
+
417
+ ## 📚 Documentation
418
+
419
+ - [Getting Started Guide](./docs/getting-started.md)
420
+ - [Web Templates](./docs/templates/web-templates.md)
421
+ - [Mobile Templates](./docs/templates/mobile-templates.md)
422
+ - [Authentication Setup](./docs/auth-setup.md)
423
+ - [Theming Guide](./docs/theming.md)
424
+ - [Deployment Guide](./docs/deployment.md)
425
+
426
+ ## 🐛 Troubleshooting
427
+
428
+ ### Common Issues
429
+
430
+ #### "Command not found" error
431
+ ```bash
432
+ # Make sure you're using npx
433
+ npx @digilogiclabs/create-saas-app
434
+
435
+ # Or install globally
436
+ npm install -g @digilogiclabs/create-saas-app
437
+ ```
438
+
439
+ #### Template generation fails
440
+ ```bash
441
+ # Check Node.js version
442
+ node --version # Should be 16.0.0+
443
+
444
+ # Clear npm cache
445
+ npm cache clean --force
446
+ ```
447
+
448
+ #### Mobile app won't start
449
+ ```bash
450
+ # Install Expo CLI
451
+ npm install -g @expo/cli
452
+
453
+ # Clear Expo cache
454
+ npx expo start --clear
455
+ ```
456
+
457
+ ## 📄 License
458
+
459
+ MIT © DigitalLogic Labs
460
+
461
+ ## 🆘 Support
462
+
463
+ - 📧 **Email**: support@digilogiclabs.com
464
+ - 💬 **Discord**: [Join our community](https://discord.gg/digilogiclabs)
465
+ - 📖 **Documentation**: [docs.digilogiclabs.com](https://docs.digilogiclabs.com)
466
+ - 🐛 **Issues**: [GitHub Issues](https://github.com/DigiLogicLabs/create-saas-app/issues)
467
+ - 💡 **Feature Requests**: [GitHub Discussions](https://github.com/DigiLogicLabs/create-saas-app/discussions)
468
+
469
+ ---
470
+
471
+ **Built with ❤️ by DigitalLogic Labs**
472
+
package/bin/index.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/cli/index.js');
3
+
@@ -0,0 +1,5 @@
1
+ import { Command } from 'commander';
2
+
3
+ declare const program: Command;
4
+
5
+ export { program as default };