create-solostack 1.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Danish Akhtar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,262 @@
1
+ # create-solostack
2
+
3
+ > The complete SaaS boilerplate for indie hackers
4
+
5
+ Generate a production-ready Next.js 15 SaaS application with authentication, payments, database, and email - all pre-configured and working out of the box.
6
+
7
+ ## Features
8
+
9
+ 🚀 **Quick Setup** - Get a full SaaS up and running in minutes, not weeks
10
+
11
+ 🔐 **Authentication** - NextAuth.js with email/password and OAuth (Google, GitHub)
12
+
13
+ 💳 **Payments** - Stripe integration for subscriptions and one-time payments
14
+
15
+ 📧 **Emails** - Resend for transactional emails with React Email templates
16
+
17
+ 🗄️ **Database** - Prisma + PostgreSQL with pre-built models
18
+
19
+ 🎨 **UI Components** - shadcn/ui components with Tailwind CSS
20
+
21
+ 📱 **Responsive** - Mobile-first design out of the box
22
+
23
+ 🔒 **Type-Safe** - Full TypeScript support
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ npx create-solostack my-saas-app
29
+ ```
30
+
31
+ Or with other package managers:
32
+
33
+ ```bash
34
+ # pnpm
35
+ pnpm create solostack my-saas-app
36
+
37
+ # yarn
38
+ yarn create solostack my-saas-app
39
+ ```
40
+
41
+ ## Usage
42
+
43
+ Run the CLI and answer the prompts:
44
+
45
+ ```bash
46
+ npx create-solostack my-app
47
+ ```
48
+
49
+ The CLI will ask you:
50
+ - Project name
51
+ - Authentication provider (NextAuth.js)
52
+ - Database (PostgreSQL + Prisma)
53
+ - Payment provider (Stripe)
54
+ - Email provider (Resend)
55
+ - Include shadcn/ui components? (Y/n)
56
+ - Initialize git repository? (Y/n)
57
+
58
+ ## What's Included
59
+
60
+ ### File Structure
61
+
62
+ ```
63
+ my-saas-app/
64
+ ├── prisma/
65
+ │ ├── schema.prisma # Database schema
66
+ │ └── seed.ts # Seed script
67
+ ├── src/
68
+ │ ├── app/
69
+ │ │ ├── (auth)/
70
+ │ │ │ ├── login/ # Login page
71
+ │ │ │ └── signup/ # Signup page
72
+ │ │ ├── api/
73
+ │ │ │ ├── auth/ # NextAuth routes
74
+ │ │ │ ├── stripe/ # Stripe routes
75
+ │ │ │ └── webhooks/ # Webhook handlers
76
+ │ │ ├── dashboard/ # Protected dashboard
77
+ │ │ │ ├── billing/ # Subscription management
78
+ │ │ │ └── settings/ # User settings
79
+ │ │ ├── globals.css
80
+ │ │ ├── layout.tsx
81
+ │ │ └── page.tsx
82
+ │ ├── components/ # React components
83
+ │ └── lib/
84
+ │ ├── auth.ts # NextAuth configuration
85
+ │ ├── db.ts # Prisma client
86
+ │ ├── stripe.ts # Stripe client
87
+ │ └── email/ # Email templates
88
+ ├── .env.example
89
+ ├── middleware.ts # Route protection
90
+ ├── next.config.js
91
+ ├── package.json
92
+ ├── tailwind.config.ts
93
+ └── tsconfig.json
94
+ ```
95
+
96
+ ### Database Models
97
+
98
+ - **User** - User accounts with authentication
99
+ - **Account** - OAuth accounts
100
+ - **Session** - User sessions
101
+ - **Subscription** - Stripe subscriptions
102
+ - **Payment** - Payment history
103
+ - **VerificationToken** - Email verification
104
+
105
+ ### API Routes
106
+
107
+ - `/api/auth/[...nextauth]` - NextAuth.js routes
108
+ - `/api/auth/signup` - User registration
109
+ - `/api/stripe/checkout` - Create checkout session
110
+ - `/api/stripe/portal` - Customer portal
111
+ - `/api/webhooks/stripe` - Stripe webhooks
112
+ - `/api/user/update` - Update user profile
113
+
114
+ ### Pages
115
+
116
+ - `/` - Landing page
117
+ - `/login` - Login page
118
+ - `/signup` - Signup page
119
+ - `/dashboard` - User dashboard (protected)
120
+ - `/dashboard/billing` - Subscription management (protected)
121
+ - `/dashboard/settings` - User settings (protected)
122
+
123
+ ## Getting Started (Generated Project)
124
+
125
+ After generating your project:
126
+
127
+ ### 1. Install Dependencies
128
+
129
+ ```bash
130
+ cd my-saas-app
131
+ npm install
132
+ ```
133
+
134
+ ### 2. Set Up Environment Variables
135
+
136
+ ```bash
137
+ cp .env.example .env
138
+ ```
139
+
140
+ Add your environment variables:
141
+
142
+ ```env
143
+ DATABASE_URL="postgresql://..."
144
+ NEXTAUTH_SECRET="..." # Generate with: openssl rand -base64 32
145
+ NEXTAUTH_URL="http://localhost:3000"
146
+ STRIPE_SECRET_KEY="sk_test_..."
147
+ STRIPE_WEBHOOK_SECRET="whsec_..."
148
+ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."
149
+ RESEND_API_KEY="re_..."
150
+ ```
151
+
152
+ ### 3. Set Up Database
153
+
154
+ ```bash
155
+ npm run db:push
156
+ npm run db:seed
157
+ ```
158
+
159
+ ### 4. Run Development Server
160
+
161
+ ```bash
162
+ npm run dev
163
+ ```
164
+
165
+ Open [http://localhost:3000](http://localhost:3000)
166
+
167
+ ## Scripts
168
+
169
+ - `npm run dev` - Start development server
170
+ - `npm run build` - Build for production
171
+ - `npm run start` - Start production server
172
+ - `npm run lint` - Run ESLint
173
+ - `npm run db:push` - Push schema to database
174
+ - `npm run db:seed` - Seed database
175
+ - `npm run db:studio` - Open Prisma Studio
176
+
177
+ ## Configuration
178
+
179
+ ### Stripe Setup
180
+
181
+ 1. Create a Stripe account at [stripe.com](https://stripe.com)
182
+ 2. Get your API keys from the Dashboard
183
+ 3. Set up products and prices
184
+ 4. Configure webhook endpoint: `https://yourdomain.com/api/webhooks/stripe`
185
+ 5. Add webhook secret to `.env`
186
+
187
+ ### Resend Setup
188
+
189
+ 1. Create a Resend account at [resend.com](https://resend.com)
190
+ 2. Get your API key
191
+ 3. Verify your sending domain
192
+ 4. Add API key to `.env`
193
+
194
+ ### Database Setup
195
+
196
+ 1. Create a PostgreSQL database
197
+ 2. Add connection string to `.env`
198
+ 3. Run `npm run db:push` to create tables
199
+ 4. Run `npm run db:seed` to add sample data
200
+
201
+ ### OAuth Providers (Optional)
202
+
203
+ For Google OAuth:
204
+ 1. Go to [Google Cloud Console](https://console.cloud.google.com)
205
+ 2. Create OAuth 2.0 credentials
206
+ 3. Add to `.env`
207
+
208
+ For GitHub OAuth:
209
+ 1. Go to GitHub Settings > Developer settings > OAuth Apps
210
+ 2. Create a new OAuth App
211
+ 3. Add to `.env`
212
+
213
+ ## Tech Stack
214
+
215
+ - **Framework**: Next.js 15 (App Router)
216
+ - **Language**: TypeScript
217
+ - **Styling**: Tailwind CSS
218
+ - **UI Components**: shadcn/ui + Radix UI
219
+ - **Database**: PostgreSQL + Prisma
220
+ - **Authentication**: NextAuth.js 5
221
+ - **Payments**: Stripe
222
+ - **Email**: Resend + React Email
223
+ - **Form Handling**: React Hook Form + Zod
224
+
225
+ ## Requirements
226
+
227
+ - Node.js 18 or higher
228
+ - PostgreSQL database (local or hosted)
229
+
230
+ ## Support
231
+
232
+ - [Documentation](https://github.com/yourusername/create-solostack)
233
+ - [Issues](https://github.com/yourusername/create-solostack/issues)
234
+ - [Discussions](https://github.com/yourusername/create-solostack/discussions)
235
+
236
+ ## License
237
+
238
+ MIT © Danish Akhtar
239
+
240
+ ## Roadmap
241
+
242
+ ### Free Version
243
+ - ✅ Next.js 15 + TypeScript
244
+ - ✅ Authentication (NextAuth.js)
245
+ - ✅ Database (Prisma + PostgreSQL)
246
+ - ✅ Payments (Stripe)
247
+ - ✅ Emails (Resend)
248
+ - ✅ UI Components (shadcn/ui)
249
+
250
+ ### Pro Version ($99)
251
+ - 🔜 Multi-tenancy support
252
+ - 🔜 Team/workspace management
253
+ - 🔜 Advanced admin dashboard
254
+ - 🔜 Analytics integration
255
+ - 🔜 Email campaigns
256
+ - 🔜 Advanced security features
257
+ - 🔜 SEO optimization
258
+ - 🔜 PWA support
259
+
260
+ ---
261
+
262
+ **Built with ❤️ for indie hackers and solo founders**
package/bin/cli.js ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * SoloStack CLI Entry Point
5
+ * Generates a complete Next.js SaaS boilerplate
6
+ */
7
+
8
+ import { main } from '../src/index.js';
9
+
10
+ main().catch((error) => {
11
+ console.error('Error:', error.message);
12
+ process.exit(1);
13
+ });
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "create-solostack",
3
+ "version": "1.0.0",
4
+ "description": "The complete SaaS boilerplate for indie hackers - Next.js 15 with auth, payments, database, and email",
5
+ "type": "module",
6
+ "bin": {
7
+ "create-solostack": "./bin/cli.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "src",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "scripts": {
16
+ "test": "node tests/cli.test.js"
17
+ },
18
+ "keywords": [
19
+ "saas",
20
+ "boilerplate",
21
+ "nextjs",
22
+ "stripe",
23
+ "prisma",
24
+ "nextauth",
25
+ "starter",
26
+ "cli",
27
+ "generator",
28
+ "indie-hacker"
29
+ ],
30
+ "author": "Danish Akhtar",
31
+ "license": "MIT",
32
+ "engines": {
33
+ "node": ">=18.0.0"
34
+ },
35
+ "dependencies": {
36
+ "chalk": "^5.3.0",
37
+ "commander": "^14.0.2",
38
+ "ejs": "^3.1.10",
39
+ "execa": "^9.4.0",
40
+ "fs-extra": "^11.3.3",
41
+ "inquirer": "^10.2.2",
42
+ "ora": "^8.1.0",
43
+ "validate-npm-package-name": "^7.0.2"
44
+ }
45
+ }
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Package versions for the generated Next.js project
3
+ */
4
+ export const PACKAGE_VERSIONS = {
5
+ // Core
6
+ next: '^15.1.6',
7
+ react: '^19.0.0',
8
+ reactDom: '^19.0.0',
9
+
10
+ // TypeScript
11
+ typescript: '^5.7.2',
12
+ '@types/node': '^22.10.5',
13
+ '@types/react': '^19.0.6',
14
+ '@types/react-dom': '^19.0.2',
15
+
16
+ // Styling
17
+ tailwindcss: '^3.4.17',
18
+ postcss: '^8.4.49',
19
+ autoprefixer: '^10.4.20',
20
+
21
+ // Database
22
+ '@prisma/client': '^6.2.1',
23
+ prisma: '^6.2.1',
24
+
25
+ // Authentication
26
+ 'next-auth': '^5.0.0-beta.25',
27
+ bcryptjs: '^2.4.3',
28
+ '@types/bcryptjs': '^2.4.6',
29
+
30
+ // Payments
31
+ stripe: '^17.5.0',
32
+
33
+ // Email
34
+ resend: '^4.0.1',
35
+ '@react-email/components': '^0.0.27',
36
+
37
+ // Utilities
38
+ zod: '^3.24.1',
39
+ 'react-hook-form': '^7.54.2',
40
+ '@hookform/resolvers': '^3.9.1',
41
+
42
+ // UI Components (shadcn/ui dependencies)
43
+ 'class-variance-authority': '^0.7.1',
44
+ clsx: '^2.1.1',
45
+ 'tailwind-merge': '^2.6.0',
46
+ 'tailwindcss-animate': '^1.0.7',
47
+ 'lucide-react': '^0.469.0',
48
+ '@radix-ui/react-dropdown-menu': '^2.1.4',
49
+ '@radix-ui/react-slot': '^1.1.1',
50
+ '@radix-ui/react-toast': '^1.2.4',
51
+ '@radix-ui/react-dialog': '^1.1.4',
52
+ '@radix-ui/react-label': '^2.1.1',
53
+ '@auth/prisma-adapter': '^2.9.1',
54
+ };
55
+
56
+ /**
57
+ * Default configuration values
58
+ */
59
+ export const DEFAULT_CONFIG = {
60
+ auth: 'NextAuth.js (Email + OAuth)',
61
+ database: 'PostgreSQL + Prisma',
62
+ payments: 'Stripe',
63
+ email: 'Resend',
64
+ includeUI: true,
65
+ initGit: true,
66
+ };
67
+
68
+ /**
69
+ * Supported authentication providers
70
+ */
71
+ export const AUTH_PROVIDERS = [
72
+ 'NextAuth.js (Email + OAuth)',
73
+ ];
74
+
75
+ /**
76
+ * Supported databases
77
+ */
78
+ export const DATABASES = [
79
+ 'PostgreSQL + Prisma',
80
+ ];
81
+
82
+ /**
83
+ * Supported payment providers
84
+ */
85
+ export const PAYMENT_PROVIDERS = [
86
+ 'Stripe',
87
+ ];
88
+
89
+ /**
90
+ * Supported email providers
91
+ */
92
+ export const EMAIL_PROVIDERS = [
93
+ 'Resend',
94
+ ];