create-propelkit 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/README.md ADDED
@@ -0,0 +1,131 @@
1
+ # create-propelkit
2
+
3
+ Initialize a PropelKit SaaS project with AI PM.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx create-propelkit
9
+ # or
10
+ npm init propelkit
11
+ # or
12
+ npx propelkit init
13
+ ```
14
+
15
+ ## What It Does
16
+
17
+ 1. **Detects installed CLIs** - Checks for Claude Code (required), Supabase CLI, and GitHub CLI
18
+ 2. **Asks about GitHub integration** - If GitHub CLI is installed, asks whether to enable auto-push
19
+ 3. **Asks your scenario** - Starting fresh or configuring an existing clone
20
+ 4. **Clones PropelKit** - If starting fresh, clones the boilerplate
21
+ 5. **Launches Claude Code** - Opens Claude Code in your project directory
22
+
23
+ ## Requirements
24
+
25
+ - **Node.js 18+** - Required for running the CLI
26
+ - **Claude Code** - Required for the AI PM conversation
27
+
28
+ ### Optional CLIs
29
+
30
+ These are optional but enhance the experience:
31
+
32
+ - **Supabase CLI** - Enables automatic database migrations
33
+ - Without it: SQL is shown inline for manual execution
34
+ - Install: https://supabase.com/docs/guides/local-development/cli/getting-started
35
+
36
+ - **GitHub CLI** - Enables automatic repo creation and commits
37
+ - Without it: Local commits only, you push manually
38
+ - Install: https://cli.github.com/
39
+
40
+ ## After Launch
41
+
42
+ When Claude Code opens, type:
43
+
44
+ ```
45
+ /propelkit:new-project
46
+ ```
47
+
48
+ This starts the AI PM conversation to build your project.
49
+
50
+ ## What Gets Created
51
+
52
+ The AI PM conversation will create:
53
+
54
+ - `.planning/PROJECT.md` - Project context
55
+ - `.planning/config.json` - Workflow preferences + CLI availability + GitHub preference
56
+ - `.planning/research/` - Domain research (optional)
57
+ - `.planning/REQUIREMENTS.md` - Scoped requirements
58
+ - `.planning/ROADMAP.md` - Phase structure
59
+ - `.planning/STATE.md` - Project memory
60
+
61
+ ## Tech Stack
62
+
63
+ PropelKit builds SaaS apps with:
64
+
65
+ - Next.js 15 (App Router)
66
+ - TypeScript (strict mode)
67
+ - Supabase (PostgreSQL + Auth + RLS)
68
+ - Razorpay (payments, INR)
69
+ - Resend (emails)
70
+ - Inngest (background jobs)
71
+ - shadcn/ui + Tailwind CSS
72
+
73
+ ## India-First
74
+
75
+ PropelKit is built for Indian developers:
76
+
77
+ - Razorpay payments (not Stripe)
78
+ - INR currency formatting
79
+ - GST calculation and invoicing
80
+ - Indian phone number validation
81
+
82
+ ## Development
83
+
84
+ ```bash
85
+ cd packages/create-propelkit
86
+ npm install
87
+ node bin/cli.js
88
+ ```
89
+
90
+ ## Release Process
91
+
92
+ Releases are automated via GitHub Actions when a version tag is pushed.
93
+
94
+ ### Prerequisites
95
+
96
+ Configure these repository secrets in GitHub:
97
+
98
+ 1. **GH_PAT**: Personal Access Token with `repo` scope
99
+ - Go to: https://github.com/settings/tokens
100
+ - Generate new token (classic)
101
+ - Scopes: `repo` (full control)
102
+ - Add as repository secret: Settings > Secrets > Actions > New
103
+
104
+ 2. **NPM_TOKEN**: npm access token
105
+ - Go to: https://www.npmjs.com/settings/~/tokens
106
+ - Generate new token: Automation
107
+ - Add as repository secret
108
+
109
+ ### Creating a Release
110
+
111
+ 1. Update version in `packages/create-propelkit/package.json`
112
+ 2. Commit: `git commit -am "chore: bump version to X.Y.Z"`
113
+ 3. Tag: `git tag vX.Y.Z`
114
+ 4. Push: `git push origin main --tags`
115
+
116
+ The workflow will:
117
+ - Sync code to getpropelkit/pro repository
118
+ - Publish to npm as `create-propelkit`
119
+ - Create a GitHub release
120
+
121
+ ### Manual Verification
122
+
123
+ After release, verify:
124
+ ```bash
125
+ npx create-propelkit@latest --version
126
+ npm info create-propelkit
127
+ ```
128
+
129
+ ## License
130
+
131
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ const { main } = require('../src/index.js');
3
+ main().catch((err) => {
4
+ console.error('Error:', err.message);
5
+ process.exit(1);
6
+ });
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "create-propelkit",
3
+ "version": "1.0.0",
4
+ "description": "Initialize a PropelKit SaaS project with AI PM",
5
+ "bin": "./bin/cli.js",
6
+ "main": "./src/index.js",
7
+ "type": "commonjs",
8
+ "files": [
9
+ "bin",
10
+ "src"
11
+ ],
12
+ "keywords": [
13
+ "propelkit",
14
+ "saas",
15
+ "boilerplate",
16
+ "india",
17
+ "razorpay",
18
+ "supabase"
19
+ ],
20
+ "author": "PropelKit",
21
+ "license": "MIT",
22
+ "engines": {
23
+ "node": ">=18.0.0"
24
+ },
25
+ "dependencies": {
26
+ "chalk": "^4.1.2",
27
+ "command-exists": "^1.2.9",
28
+ "inquirer": "^8.2.6",
29
+ "zod": "^4.3.6"
30
+ }
31
+ }
@@ -0,0 +1,104 @@
1
+ const commandExists = require('command-exists');
2
+ const inquirer = require('inquirer');
3
+
4
+ const CLI_DEFINITIONS = [
5
+ {
6
+ name: 'claude',
7
+ label: 'Claude Code',
8
+ installUrl: 'https://claude.ai/download',
9
+ required: true,
10
+ benefit: 'Required to run PropelKit AI PM'
11
+ },
12
+ {
13
+ name: 'supabase',
14
+ label: 'Supabase CLI',
15
+ installUrl: 'https://supabase.com/docs/guides/local-development/cli/getting-started',
16
+ required: false,
17
+ benefit: 'Enables automatic database migrations'
18
+ },
19
+ {
20
+ name: 'gh',
21
+ label: 'GitHub CLI',
22
+ installUrl: 'https://cli.github.com/',
23
+ required: false,
24
+ benefit: 'Enables automatic repo creation and commits'
25
+ }
26
+ ];
27
+
28
+ async function detectCLIs() {
29
+ const results = await Promise.all(
30
+ CLI_DEFINITIONS.map(async (cli) => ({
31
+ ...cli,
32
+ installed: await commandExists(cli.name).then(() => true).catch(() => false)
33
+ }))
34
+ );
35
+ return results;
36
+ }
37
+
38
+ function displayCLIStatus(clis, chalk) {
39
+ console.log('');
40
+ console.log(chalk.cyan.bold('CLI Detection'));
41
+ console.log(chalk.dim('-'.repeat(50)));
42
+
43
+ for (const cli of clis) {
44
+ const status = cli.installed
45
+ ? chalk.green('Found')
46
+ : chalk.yellow('Not found');
47
+ const required = cli.required ? chalk.red(' (required)') : '';
48
+
49
+ console.log(` ${cli.label}: ${status}${required}`);
50
+
51
+ if (!cli.installed) {
52
+ console.log(chalk.dim(` ${cli.benefit}`));
53
+ console.log(chalk.dim(` Install: ${cli.installUrl}`));
54
+ }
55
+ }
56
+ console.log('');
57
+ }
58
+
59
+ /**
60
+ * Ask user about GitHub CLI connection (CLI-03 requirement)
61
+ * Only asks if gh CLI is detected as installed
62
+ * @param {object} ghCli - GitHub CLI detection result
63
+ * @param {object} chalk - Chalk instance for styling
64
+ * @returns {Promise<boolean>} - Whether user wants GitHub integration
65
+ */
66
+ async function askGitHubConnection(ghCli, chalk) {
67
+ if (!ghCli.installed) {
68
+ // gh not installed - skip question, return false
69
+ return false;
70
+ }
71
+
72
+ console.log('');
73
+ console.log(chalk.cyan.bold('GitHub Integration'));
74
+ console.log(chalk.dim('-'.repeat(50)));
75
+ console.log('');
76
+ console.log('GitHub CLI is installed. PropelKit can:');
77
+ console.log(chalk.dim(' - Create a GitHub repository for your project'));
78
+ console.log(chalk.dim(' - Automatically push commits after each phase'));
79
+ console.log(chalk.dim(' - Manage branches for feature development'));
80
+ console.log('');
81
+
82
+ const { useGitHub } = await inquirer.prompt([
83
+ {
84
+ type: 'confirm',
85
+ name: 'useGitHub',
86
+ message: 'Enable GitHub integration?',
87
+ default: true
88
+ }
89
+ ]);
90
+
91
+ return useGitHub;
92
+ }
93
+
94
+ function getCLIByName(clis, name) {
95
+ return clis.find(cli => cli.name === name);
96
+ }
97
+
98
+ module.exports = {
99
+ detectCLIs,
100
+ displayCLIStatus,
101
+ askGitHubConnection,
102
+ getCLIByName,
103
+ CLI_DEFINITIONS
104
+ };
package/src/config.js ADDED
@@ -0,0 +1,25 @@
1
+ // Distribution configuration
2
+ const REPOS = {
3
+ starter: 'https://github.com/getpropelkit/starter.git',
4
+ pro: 'https://github.com/getpropelkit/pro.git'
5
+ };
6
+
7
+ const API_ENDPOINTS = {
8
+ licenseValidation: 'https://www.propelkit.dev/api/license/validate'
9
+ };
10
+
11
+ const LICENSE_PATTERNS = {
12
+ // PK-STARTER-2026-XXXXXX or PK-PRO-2026-XXXXXX
13
+ format: /^PK-(STARTER|PRO|AGENCY)-\d{4}-[A-Z0-9]{6}$/
14
+ };
15
+
16
+ const TIMEOUTS = {
17
+ licenseValidation: 5000 // 5 seconds
18
+ };
19
+
20
+ module.exports = {
21
+ REPOS,
22
+ API_ENDPOINTS,
23
+ LICENSE_PATTERNS,
24
+ TIMEOUTS
25
+ };