ultra-dex 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.
Files changed (3) hide show
  1. package/README.md +108 -0
  2. package/bin/ultra-dex.js +318 -0
  3. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # Ultra-Dex CLI
2
+
3
+ > Scaffold Ultra-Dex projects from the command line.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # Run directly with npx (no installation needed)
9
+ npx ultra-dex init
10
+
11
+ # Or install globally
12
+ npm install -g ultra-dex
13
+ ultra-dex init
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ### Initialize a new project
19
+
20
+ ```bash
21
+ npx ultra-dex init
22
+ ```
23
+
24
+ This will:
25
+ 1. Ask you about your SaaS idea
26
+ 2. Gather tech stack preferences
27
+ 3. Create starter files:
28
+ - `QUICK-START.md` - Pre-filled with your answers
29
+ - `CONTEXT.md` - Project context for AI agents
30
+ - `IMPLEMENTATION-PLAN.md` - Links to full resources
31
+
32
+ ### List examples
33
+
34
+ ```bash
35
+ npx ultra-dex examples
36
+ ```
37
+
38
+ Shows links to fully filled Ultra-Dex examples:
39
+ - TaskFlow (Task Management)
40
+ - InvoiceFlow (Invoicing)
41
+ - HabitStack (Habit Tracking)
42
+
43
+ ## Commands
44
+
45
+ | Command | Description |
46
+ |---------|-------------|
47
+ | `ultra-dex init` | Initialize a new project |
48
+ | `ultra-dex examples` | List available examples |
49
+ | `ultra-dex --help` | Show help |
50
+ | `ultra-dex --version` | Show version |
51
+
52
+ ## Options
53
+
54
+ ### init
55
+
56
+ | Option | Description |
57
+ |--------|-------------|
58
+ | `-n, --name <name>` | Project name (skips prompt) |
59
+ | `-d, --dir <directory>` | Output directory (default: current) |
60
+
61
+ ## Example
62
+
63
+ ```bash
64
+ $ npx ultra-dex init
65
+
66
+ ╔═══════════════════════════════════════════════════════════╗
67
+ ║ ULTRA-DEX ║
68
+ ║ From Idea to Production-Ready SaaS ║
69
+ ╚═══════════════════════════════════════════════════════════╝
70
+
71
+ Welcome to Ultra-Dex! Let's plan your SaaS.
72
+
73
+ ? What's your project name? my-saas
74
+ ? What are you building? A booking platform for dog groomers
75
+ ? Who is it for? Independent dog grooming businesses
76
+ ? Problem #1 you're solving: Manual booking via phone is time-consuming
77
+ ? Problem #2 you're solving: No-shows cost money
78
+ ? Problem #3 you're solving: No online presence
79
+ ? Most important MVP feature: Online booking calendar
80
+ ? Frontend framework: Next.js
81
+ ? Database: PostgreSQL
82
+ ? Authentication: NextAuth
83
+ ? Payments: Stripe
84
+ ? Hosting: Vercel
85
+
86
+ ✔ Project created successfully!
87
+
88
+ Files created:
89
+ my-saas/
90
+ ├── QUICK-START.md
91
+ ├── CONTEXT.md
92
+ └── IMPLEMENTATION-PLAN.md
93
+
94
+ Next steps:
95
+ 1. cd my-saas
96
+ 2. Open QUICK-START.md and complete it
97
+ 3. Start building! 🚀
98
+ ```
99
+
100
+ ## Links
101
+
102
+ - [Full Template](https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/Imp%20Template.md)
103
+ - [Examples](https://github.com/anthropics/ultra-dex/tree/main/%40%20Ultra%20DeX/Saas%20plan/Examples)
104
+ - [Methodology](https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/METHODOLOGY.md)
105
+
106
+ ## License
107
+
108
+ MIT
@@ -0,0 +1,318 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { Command } from 'commander';
4
+ import inquirer from 'inquirer';
5
+ import chalk from 'chalk';
6
+ import ora from 'ora';
7
+ import fs from 'fs/promises';
8
+ import path from 'path';
9
+ import { fileURLToPath } from 'url';
10
+
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+
14
+ const program = new Command();
15
+
16
+ // ASCII Art Banner
17
+ const banner = `
18
+ ╔═══════════════════════════════════════════════════════════╗
19
+ ║ ║
20
+ ║ ██╗ ██╗██╗ ████████╗██████╗ █████╗ ║
21
+ ║ ██║ ██║██║ ╚══██╔══╝██╔══██╗██╔══██╗ ║
22
+ ║ ██║ ██║██║ ██║ ██████╔╝███████║ ║
23
+ ║ ██║ ██║██║ ██║ ██╔══██╗██╔══██║ ║
24
+ ║ ╚██████╔╝███████╗██║ ██║ ██║██║ ██║ ║
25
+ ║ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ║
26
+ ║ ║
27
+ ║ ██████╗ ███████╗██╗ ██╗ ║
28
+ ║ ██╔══██╗██╔════╝╚██╗██╔╝ ║
29
+ ║ ██║ ██║█████╗ ╚███╔╝ ║
30
+ ║ ██║ ██║██╔══╝ ██╔██╗ ║
31
+ ║ ██████╔╝███████╗██╔╝ ██╗ ║
32
+ ║ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ║
33
+ ║ ║
34
+ ║ From Idea to Production-Ready SaaS ║
35
+ ║ ║
36
+ ╚═══════════════════════════════════════════════════════════╝
37
+ `;
38
+
39
+ // Template content (embedded)
40
+ const QUICK_START_TEMPLATE = `# {{PROJECT_NAME}} - Quick Start
41
+
42
+ ## 1. Your Idea (2 sentences max)
43
+
44
+ **What:** {{IDEA_WHAT}}
45
+ **For whom:** {{IDEA_FOR}}
46
+
47
+ ## 2. The Problem (3 bullets)
48
+
49
+ - {{PROBLEM_1}}
50
+ - {{PROBLEM_2}}
51
+ - {{PROBLEM_3}}
52
+
53
+ ## 3. MVP Features (5 max)
54
+
55
+ | Feature | Priority | Why it's MVP? |
56
+ |---------|----------|---------------|
57
+ | {{FEATURE_1}} | P0 | |
58
+ | | P0 | |
59
+ | | P1 | |
60
+ | | P1 | |
61
+ | | P2 | |
62
+
63
+ ## 4. Tech Stack
64
+
65
+ | Layer | Your Choice |
66
+ |-------|-------------|
67
+ | Frontend | {{FRONTEND}} |
68
+ | Database | {{DATABASE}} |
69
+ | Auth | {{AUTH}} |
70
+ | Payments | {{PAYMENTS}} |
71
+ | Hosting | {{HOSTING}} |
72
+
73
+ ## 5. First 3 Tasks
74
+
75
+ 1. [ ] Set up project with chosen stack
76
+ 2. [ ] Implement core feature #1
77
+ 3. [ ] Deploy to staging
78
+
79
+ ---
80
+
81
+ **Next:** Fill out the full implementation plan using the Ultra-Dex template.
82
+ `;
83
+
84
+ const CONTEXT_TEMPLATE = `# {{PROJECT_NAME}} - Context
85
+
86
+ ## Project Overview
87
+ **Name:** {{PROJECT_NAME}}
88
+ **Started:** {{DATE}}
89
+ **Status:** Planning
90
+
91
+ ## Quick Summary
92
+ {{IDEA_WHAT}} for {{IDEA_FOR}}.
93
+
94
+ ## Key Decisions
95
+ - Frontend: {{FRONTEND}}
96
+ - Database: {{DATABASE}}
97
+ - Auth: {{AUTH}}
98
+ - Payments: {{PAYMENTS}}
99
+ - Hosting: {{HOSTING}}
100
+
101
+ ## Current Focus
102
+ Setting up the implementation plan.
103
+
104
+ ## Resources
105
+ - [Ultra-Dex Template](https://github.com/anthropics/ultra-dex)
106
+ - [TaskFlow Example](https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/Examples/TaskFlow-Complete.md)
107
+ `;
108
+
109
+ program
110
+ .name('ultra-dex')
111
+ .description('CLI for Ultra-Dex SaaS Implementation Framework')
112
+ .version('1.0.0');
113
+
114
+ program
115
+ .command('init')
116
+ .description('Initialize a new Ultra-Dex project')
117
+ .option('-n, --name <name>', 'Project name')
118
+ .option('-d, --dir <directory>', 'Output directory', '.')
119
+ .action(async (options) => {
120
+ console.log(chalk.cyan(banner));
121
+ console.log(chalk.bold('\nWelcome to Ultra-Dex! Let\'s plan your SaaS.\n'));
122
+
123
+ // Gather project info
124
+ const answers = await inquirer.prompt([
125
+ {
126
+ type: 'input',
127
+ name: 'projectName',
128
+ message: 'What\'s your project name?',
129
+ default: options.name || 'my-saas',
130
+ validate: (input) => input.length > 0 || 'Project name is required',
131
+ },
132
+ {
133
+ type: 'input',
134
+ name: 'ideaWhat',
135
+ message: 'What are you building? (1 sentence)',
136
+ validate: (input) => input.length > 0 || 'Please describe your idea',
137
+ },
138
+ {
139
+ type: 'input',
140
+ name: 'ideaFor',
141
+ message: 'Who is it for?',
142
+ validate: (input) => input.length > 0 || 'Please specify your target users',
143
+ },
144
+ {
145
+ type: 'input',
146
+ name: 'problem1',
147
+ message: 'Problem #1 you\'re solving:',
148
+ default: '',
149
+ },
150
+ {
151
+ type: 'input',
152
+ name: 'problem2',
153
+ message: 'Problem #2 you\'re solving:',
154
+ default: '',
155
+ },
156
+ {
157
+ type: 'input',
158
+ name: 'problem3',
159
+ message: 'Problem #3 you\'re solving:',
160
+ default: '',
161
+ },
162
+ {
163
+ type: 'input',
164
+ name: 'feature1',
165
+ message: 'Most important MVP feature:',
166
+ default: '',
167
+ },
168
+ {
169
+ type: 'list',
170
+ name: 'frontend',
171
+ message: 'Frontend framework:',
172
+ choices: ['Next.js', 'Remix', 'SvelteKit', 'Nuxt', 'Other'],
173
+ },
174
+ {
175
+ type: 'list',
176
+ name: 'database',
177
+ message: 'Database:',
178
+ choices: ['PostgreSQL', 'Supabase', 'MongoDB', 'PlanetScale', 'Other'],
179
+ },
180
+ {
181
+ type: 'list',
182
+ name: 'auth',
183
+ message: 'Authentication:',
184
+ choices: ['NextAuth', 'Clerk', 'Auth0', 'Supabase Auth', 'Other'],
185
+ },
186
+ {
187
+ type: 'list',
188
+ name: 'payments',
189
+ message: 'Payments:',
190
+ choices: ['Stripe', 'Lemonsqueezy', 'Paddle', 'None (free)', 'Other'],
191
+ },
192
+ {
193
+ type: 'list',
194
+ name: 'hosting',
195
+ message: 'Hosting:',
196
+ choices: ['Vercel', 'Railway', 'Fly.io', 'AWS', 'Other'],
197
+ },
198
+ ]);
199
+
200
+ const spinner = ora('Creating project files...').start();
201
+
202
+ try {
203
+ const outputDir = path.resolve(options.dir, answers.projectName);
204
+
205
+ // Create directories
206
+ await fs.mkdir(outputDir, { recursive: true });
207
+ await fs.mkdir(path.join(outputDir, 'docs'), { recursive: true });
208
+
209
+ // Replace placeholders
210
+ const replacements = {
211
+ '{{PROJECT_NAME}}': answers.projectName,
212
+ '{{DATE}}': new Date().toISOString().split('T')[0],
213
+ '{{IDEA_WHAT}}': answers.ideaWhat,
214
+ '{{IDEA_FOR}}': answers.ideaFor,
215
+ '{{PROBLEM_1}}': answers.problem1 || 'Problem 1',
216
+ '{{PROBLEM_2}}': answers.problem2 || 'Problem 2',
217
+ '{{PROBLEM_3}}': answers.problem3 || 'Problem 3',
218
+ '{{FEATURE_1}}': answers.feature1 || 'Core feature',
219
+ '{{FRONTEND}}': answers.frontend,
220
+ '{{DATABASE}}': answers.database,
221
+ '{{AUTH}}': answers.auth,
222
+ '{{PAYMENTS}}': answers.payments,
223
+ '{{HOSTING}}': answers.hosting,
224
+ };
225
+
226
+ let quickStart = QUICK_START_TEMPLATE;
227
+ let context = CONTEXT_TEMPLATE;
228
+
229
+ for (const [key, value] of Object.entries(replacements)) {
230
+ quickStart = quickStart.replace(new RegExp(key, 'g'), value);
231
+ context = context.replace(new RegExp(key, 'g'), value);
232
+ }
233
+
234
+ // Write files
235
+ await fs.writeFile(path.join(outputDir, 'QUICK-START.md'), quickStart);
236
+ await fs.writeFile(path.join(outputDir, 'CONTEXT.md'), context);
237
+
238
+ // Create empty implementation plan
239
+ const planContent = `# ${answers.projectName} - Implementation Plan
240
+
241
+ > Generated with Ultra-Dex CLI
242
+
243
+ ## Overview
244
+
245
+ ${answers.ideaWhat} for ${answers.ideaFor}.
246
+
247
+ ---
248
+
249
+ ## Next Steps
250
+
251
+ 1. Open QUICK-START.md and complete the remaining sections
252
+ 2. Copy sections from the full Ultra-Dex template as needed
253
+ 3. Use the TaskFlow example as reference
254
+ 4. Start building!
255
+
256
+ ## Resources
257
+
258
+ - [Full Template](https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/Imp%20Template.md)
259
+ - [TaskFlow Example](https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/Examples/TaskFlow-Complete.md)
260
+ - [Methodology](https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/METHODOLOGY.md)
261
+ `;
262
+
263
+ await fs.writeFile(path.join(outputDir, 'IMPLEMENTATION-PLAN.md'), planContent);
264
+
265
+ spinner.succeed(chalk.green('Project created successfully!'));
266
+
267
+ console.log('\n' + chalk.bold('Files created:'));
268
+ console.log(chalk.gray(` ${outputDir}/`));
269
+ console.log(chalk.gray(' ├── QUICK-START.md'));
270
+ console.log(chalk.gray(' ├── CONTEXT.md'));
271
+ console.log(chalk.gray(' └── IMPLEMENTATION-PLAN.md'));
272
+
273
+ console.log('\n' + chalk.bold('Next steps:'));
274
+ console.log(chalk.cyan(` 1. cd ${answers.projectName}`));
275
+ console.log(chalk.cyan(' 2. Open QUICK-START.md and complete it'));
276
+ console.log(chalk.cyan(' 3. Start building! 🚀'));
277
+
278
+ console.log('\n' + chalk.gray('Need the full template? Visit:'));
279
+ console.log(chalk.blue(' https://github.com/anthropics/ultra-dex'));
280
+
281
+ } catch (error) {
282
+ spinner.fail(chalk.red('Failed to create project'));
283
+ console.error(error);
284
+ process.exit(1);
285
+ }
286
+ });
287
+
288
+ program
289
+ .command('examples')
290
+ .description('List available examples')
291
+ .action(() => {
292
+ console.log(chalk.bold('\nAvailable Ultra-Dex Examples:\n'));
293
+
294
+ const examples = [
295
+ {
296
+ name: 'TaskFlow',
297
+ type: 'Task Management',
298
+ url: 'https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/Examples/TaskFlow-Complete.md',
299
+ },
300
+ {
301
+ name: 'InvoiceFlow',
302
+ type: 'Invoicing',
303
+ url: 'https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/Examples/InvoiceFlow-Complete.md',
304
+ },
305
+ {
306
+ name: 'HabitStack',
307
+ type: 'Habit Tracking',
308
+ url: 'https://github.com/anthropics/ultra-dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/Examples/HabitStack-Complete.md',
309
+ },
310
+ ];
311
+
312
+ examples.forEach((ex, i) => {
313
+ console.log(chalk.cyan(`${i + 1}. ${ex.name}`) + chalk.gray(` (${ex.type})`));
314
+ console.log(chalk.gray(` ${ex.url}\n`));
315
+ });
316
+ });
317
+
318
+ program.parse();
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "ultra-dex",
3
+ "version": "1.0.0",
4
+ "description": "CLI for Ultra-Dex SaaS Implementation Framework",
5
+ "keywords": [
6
+ "saas",
7
+ "template",
8
+ "implementation",
9
+ "planning",
10
+ "startup",
11
+ "framework"
12
+ ],
13
+ "author": "Srujan Sai Karna",
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/anthropics/ultra-dex"
18
+ },
19
+ "homepage": "https://github.com/anthropics/ultra-dex",
20
+ "bin": {
21
+ "ultra-dex": "./bin/ultra-dex.js"
22
+ },
23
+ "files": [
24
+ "bin",
25
+ "templates"
26
+ ],
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "dependencies": {
31
+ "chalk": "^5.3.0",
32
+ "commander": "^11.1.0",
33
+ "inquirer": "^9.2.12",
34
+ "ora": "^8.0.1"
35
+ }
36
+ }