@victusvinceere/saas-cli 0.1.0 → 0.1.2
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/README.md +209 -0
- package/dist/index.mjs +916 -124
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# @victusvinceere/saas-cli
|
|
2
|
+
|
|
3
|
+
CLI tool for scaffolding new SaaS projects using the VictusVinceere SaaS kit packages.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Install globally
|
|
9
|
+
npm install -g @victusvinceere/saas-cli
|
|
10
|
+
|
|
11
|
+
# Or use npx
|
|
12
|
+
npx @victusvinceere/saas-cli init
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
### `init` - Create a new project
|
|
18
|
+
|
|
19
|
+
Creates a new SaaS project with all the boilerplate configured.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
saas-cli init [project-name]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Interactive prompts:**
|
|
26
|
+
|
|
27
|
+
1. **Project name** - Directory name (lowercase, hyphens only)
|
|
28
|
+
2. **Product name** - Display name (e.g., "MySaaS")
|
|
29
|
+
3. **Description** - Short product description
|
|
30
|
+
4. **Primary color** - Brand color (green, blue, purple, orange, red, indigo)
|
|
31
|
+
5. **Modules** - Select which packages to include:
|
|
32
|
+
- Landing Pages (`@victusvinceere/saas-landing`)
|
|
33
|
+
- Payments (`@victusvinceere/saas-payments`)
|
|
34
|
+
- Admin Panel (`@victusvinceere/saas-admin`)
|
|
35
|
+
- Blog (`@victusvinceere/saas-blog`)
|
|
36
|
+
6. **Auth providers** - Google, GitHub, Magic Links
|
|
37
|
+
7. **Database** - PostgreSQL, MySQL, or SQLite
|
|
38
|
+
|
|
39
|
+
**Example:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
$ saas-cli init my-awesome-app
|
|
43
|
+
|
|
44
|
+
🚀 Let's create your new SaaS project!
|
|
45
|
+
|
|
46
|
+
? What is your project name? my-awesome-app
|
|
47
|
+
? What is your product name? AwesomeApp
|
|
48
|
+
? Short description of your product: The best app for awesome things
|
|
49
|
+
? Choose your primary color: blue
|
|
50
|
+
? Which modules would you like to include? Landing Pages, Payments, Admin Panel
|
|
51
|
+
? Which auth providers do you want? Google, Email (Magic Links)
|
|
52
|
+
? Which database will you use? PostgreSQL
|
|
53
|
+
|
|
54
|
+
✓ Project created successfully!
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Generated Project Structure
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
my-awesome-app/
|
|
61
|
+
├── src/
|
|
62
|
+
│ ├── app/
|
|
63
|
+
│ │ ├── (auth)/
|
|
64
|
+
│ │ │ ├── login/page.tsx
|
|
65
|
+
│ │ │ ├── signup/page.tsx
|
|
66
|
+
│ │ │ └── signout/page.tsx
|
|
67
|
+
│ │ ├── api/
|
|
68
|
+
│ │ │ └── waitlist/route.ts
|
|
69
|
+
│ │ ├── dashboard/
|
|
70
|
+
│ │ │ ├── layout.tsx
|
|
71
|
+
│ │ │ └── page.tsx
|
|
72
|
+
│ │ ├── globals.css
|
|
73
|
+
│ │ ├── layout.tsx
|
|
74
|
+
│ │ └── page.tsx
|
|
75
|
+
│ ├── components/
|
|
76
|
+
│ │ └── ui/
|
|
77
|
+
│ ├── config/
|
|
78
|
+
│ │ └── site.ts # All content configuration
|
|
79
|
+
│ └── lib/
|
|
80
|
+
│ └── utils.ts
|
|
81
|
+
├── prisma/
|
|
82
|
+
│ └── schema.prisma
|
|
83
|
+
├── public/
|
|
84
|
+
├── .env.example
|
|
85
|
+
├── .gitignore
|
|
86
|
+
├── next.config.js
|
|
87
|
+
├── package.json
|
|
88
|
+
├── postcss.config.js
|
|
89
|
+
├── tailwind.config.js
|
|
90
|
+
└── tsconfig.json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Configuration
|
|
94
|
+
|
|
95
|
+
All site content is configured in `src/config/site.ts`:
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
export const siteConfig = {
|
|
99
|
+
// Branding
|
|
100
|
+
name: "AwesomeApp",
|
|
101
|
+
description: "The best app for awesome things",
|
|
102
|
+
|
|
103
|
+
// Theme
|
|
104
|
+
theme: {
|
|
105
|
+
primary: "blue",
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
// Navigation
|
|
109
|
+
navigation: [
|
|
110
|
+
{ label: "Features", href: "#features" },
|
|
111
|
+
{ label: "Pricing", href: "#pricing" },
|
|
112
|
+
{ label: "FAQ", href: "#faq" },
|
|
113
|
+
],
|
|
114
|
+
|
|
115
|
+
// Hero Section
|
|
116
|
+
hero: {
|
|
117
|
+
badge: "Now in Beta",
|
|
118
|
+
title: "Your Amazing Product",
|
|
119
|
+
highlight: "Headline",
|
|
120
|
+
description: "...",
|
|
121
|
+
cta: {
|
|
122
|
+
primary: { label: "Get Started", href: "#waitlist" },
|
|
123
|
+
secondary: { label: "Learn More", href: "#features" },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
// Features, Pricing, FAQ, Testimonials, Waitlist, Footer...
|
|
128
|
+
};
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## After Project Creation
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# Navigate to project
|
|
135
|
+
cd my-awesome-app
|
|
136
|
+
|
|
137
|
+
# Install dependencies
|
|
138
|
+
pnpm install
|
|
139
|
+
|
|
140
|
+
# Set up environment
|
|
141
|
+
cp .env.example .env.local
|
|
142
|
+
# Edit .env.local with your credentials
|
|
143
|
+
|
|
144
|
+
# Push database schema
|
|
145
|
+
pnpm db:push
|
|
146
|
+
|
|
147
|
+
# Start development server
|
|
148
|
+
pnpm dev
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Environment Variables
|
|
152
|
+
|
|
153
|
+
Configure these in `.env.local`:
|
|
154
|
+
|
|
155
|
+
```env
|
|
156
|
+
# Database
|
|
157
|
+
DATABASE_URL="postgresql://user:password@localhost:5432/mydb"
|
|
158
|
+
|
|
159
|
+
# NextAuth
|
|
160
|
+
AUTH_SECRET="your-secret-here"
|
|
161
|
+
NEXTAUTH_URL="http://localhost:3000"
|
|
162
|
+
|
|
163
|
+
# Google OAuth
|
|
164
|
+
GOOGLE_CLIENT_ID=""
|
|
165
|
+
GOOGLE_CLIENT_SECRET=""
|
|
166
|
+
|
|
167
|
+
# Email (Resend) - for magic links
|
|
168
|
+
AUTH_RESEND_KEY=""
|
|
169
|
+
EMAIL_FROM="noreply@yourdomain.com"
|
|
170
|
+
|
|
171
|
+
# Lemon Squeezy - for payments
|
|
172
|
+
LEMONSQUEEZY_API_KEY=""
|
|
173
|
+
LEMONSQUEEZY_STORE_ID=""
|
|
174
|
+
LEMONSQUEEZY_WEBHOOK_SECRET=""
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Packages Used
|
|
178
|
+
|
|
179
|
+
| Package | Description |
|
|
180
|
+
|---------|-------------|
|
|
181
|
+
| `@victusvinceere/saas-core` | Core utilities, auth, types |
|
|
182
|
+
| `@victusvinceere/saas-landing` | Landing page components (Hero, Features, Pricing, FAQ, Testimonials, Waitlist) |
|
|
183
|
+
| `@victusvinceere/saas-admin` | Admin dashboard components |
|
|
184
|
+
| `@victusvinceere/saas-payments` | Lemon Squeezy payment integration |
|
|
185
|
+
| `@victusvinceere/saas-blog` | MDX blog system |
|
|
186
|
+
|
|
187
|
+
## Development
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Clone the monorepo
|
|
191
|
+
git clone https://github.com/victusvinceere/saas-kit.git
|
|
192
|
+
|
|
193
|
+
# Install dependencies
|
|
194
|
+
pnpm install
|
|
195
|
+
|
|
196
|
+
# Build CLI
|
|
197
|
+
cd packages/cli
|
|
198
|
+
pnpm build
|
|
199
|
+
|
|
200
|
+
# Link globally for testing
|
|
201
|
+
pnpm link --global
|
|
202
|
+
|
|
203
|
+
# Now you can use
|
|
204
|
+
saas-cli init test-project
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
MIT
|