@promakeai/cli 0.9.9 → 0.9.10

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 (137) hide show
  1. package/README.md +111 -111
  2. package/dist/index.js +142 -142
  3. package/dist/registry/about-page.json +3 -3
  4. package/dist/registry/about-section.json +4 -4
  5. package/dist/registry/animations.json +2 -2
  6. package/dist/registry/announcement-bar.json +4 -4
  7. package/dist/registry/api.json +1 -1
  8. package/dist/registry/auth-core.json +2 -2
  9. package/dist/registry/bento-grid-section.json +4 -4
  10. package/dist/registry/blog-core.json +5 -5
  11. package/dist/registry/blog-list-page.json +4 -4
  12. package/dist/registry/blog-section.json +4 -4
  13. package/dist/registry/cards-carousel-section.json +4 -4
  14. package/dist/registry/cart-drawer.json +4 -4
  15. package/dist/registry/cart-page.json +4 -4
  16. package/dist/registry/case-study-page.json +3 -3
  17. package/dist/registry/category-section.json +4 -4
  18. package/dist/registry/checkout-page.json +4 -4
  19. package/dist/registry/coming-soon-page-minimal.json +4 -4
  20. package/dist/registry/coming-soon-page.json +4 -4
  21. package/dist/registry/contact-info-grid.json +4 -4
  22. package/dist/registry/contact-page-centered.json +4 -4
  23. package/dist/registry/contact-page-map-overlay.json +3 -3
  24. package/dist/registry/contact-page-map-split.json +3 -3
  25. package/dist/registry/contact-page-split.json +4 -4
  26. package/dist/registry/contact-page.json +4 -4
  27. package/dist/registry/content-section.json +4 -4
  28. package/dist/registry/cookie-consent.json +4 -4
  29. package/dist/registry/cookies-page.json +3 -3
  30. package/dist/registry/cta-section.json +3 -3
  31. package/dist/registry/ecommerce-core.json +8 -8
  32. package/dist/registry/empty-page.json +3 -3
  33. package/dist/registry/faq-categorized.json +4 -4
  34. package/dist/registry/faq-simple.json +4 -4
  35. package/dist/registry/favorites-blog-block.json +1 -1
  36. package/dist/registry/favorites-blog-page.json +4 -4
  37. package/dist/registry/favorites-ecommerce-block.json +1 -1
  38. package/dist/registry/favorites-ecommerce-page.json +4 -4
  39. package/dist/registry/feature-section.json +3 -3
  40. package/dist/registry/featured-products.json +4 -4
  41. package/dist/registry/footer-detailed.json +4 -4
  42. package/dist/registry/footer-minimal.json +3 -3
  43. package/dist/registry/footer.json +3 -3
  44. package/dist/registry/forgot-password-page-split.json +4 -4
  45. package/dist/registry/forgot-password-page.json +4 -4
  46. package/dist/registry/google-adsense.json +4 -4
  47. package/dist/registry/google-map.json +2 -2
  48. package/dist/registry/header-centered-pill.json +4 -4
  49. package/dist/registry/header-ecommerce.json +4 -4
  50. package/dist/registry/header-mega.json +4 -4
  51. package/dist/registry/header-minimal.json +4 -4
  52. package/dist/registry/header-simple.json +3 -3
  53. package/dist/registry/hero-carousel.json +3 -3
  54. package/dist/registry/hero-cta.json +4 -4
  55. package/dist/registry/hero-gradient.json +4 -4
  56. package/dist/registry/hero-grid.json +4 -4
  57. package/dist/registry/hero-profile.json +3 -3
  58. package/dist/registry/hero.json +3 -3
  59. package/dist/registry/index.json +103 -103
  60. package/dist/registry/landing-page-app.json +3 -3
  61. package/dist/registry/landing-page-saas.json +3 -3
  62. package/dist/registry/login-page-split.json +4 -4
  63. package/dist/registry/login-page.json +4 -4
  64. package/dist/registry/logo-cloud.json +4 -4
  65. package/dist/registry/masonry-grid.json +3 -3
  66. package/dist/registry/my-orders-page.json +4 -4
  67. package/dist/registry/newsletter-section.json +4 -4
  68. package/dist/registry/order-card-compact.json +3 -3
  69. package/dist/registry/order-confirmation-page.json +4 -4
  70. package/dist/registry/order-detail-block.json +1 -1
  71. package/dist/registry/orders-list-block.json +1 -1
  72. package/dist/registry/payment-success-block.json +2 -2
  73. package/dist/registry/portfolio-page.json +4 -4
  74. package/dist/registry/post-card.json +4 -4
  75. package/dist/registry/post-detail-block.json +4 -4
  76. package/dist/registry/post-detail-page.json +4 -4
  77. package/dist/registry/pricing-card.json +3 -3
  78. package/dist/registry/pricing-page.json +4 -4
  79. package/dist/registry/pricing-section.json +4 -4
  80. package/dist/registry/privacy-page.json +3 -3
  81. package/dist/registry/product-card-detailed.json +4 -4
  82. package/dist/registry/product-card-hover.json +4 -4
  83. package/dist/registry/product-card.json +4 -4
  84. package/dist/registry/product-detail-block.json +2 -2
  85. package/dist/registry/product-detail-page.json +4 -4
  86. package/dist/registry/product-detail-section.json +4 -4
  87. package/dist/registry/product-quick-view.json +4 -4
  88. package/dist/registry/products-page.json +4 -4
  89. package/dist/registry/reading-progress.json +4 -4
  90. package/dist/registry/register-page-split.json +4 -4
  91. package/dist/registry/register-page.json +4 -4
  92. package/dist/registry/related-posts-block.json +1 -1
  93. package/dist/registry/related-products-block.json +2 -2
  94. package/dist/registry/reset-password-page-split.json +4 -4
  95. package/dist/registry/reset-password-page.json +4 -4
  96. package/dist/registry/service-card.json +1 -1
  97. package/dist/registry/share-buttons.json +4 -4
  98. package/dist/registry/skill-card.json +1 -1
  99. package/dist/registry/team-page.json +4 -4
  100. package/dist/registry/terms-page.json +3 -3
  101. package/dist/registry/testimonials-carousel.json +4 -4
  102. package/dist/registry/testimonials-grid.json +4 -4
  103. package/dist/registry/timeline-section.json +4 -4
  104. package/dist/registry/verify-email-page.json +4 -4
  105. package/dist/registry/video-hero.json +4 -4
  106. package/dist/registry/youtube-embed.json +4 -4
  107. package/package.json +1 -1
  108. package/template/.env +5 -5
  109. package/template/README.md +54 -54
  110. package/template/eslint.config.js +41 -41
  111. package/template/index.html +237 -237
  112. package/template/package.json +96 -96
  113. package/template/public/_redirects +1 -1
  114. package/template/public/robots.txt +14 -14
  115. package/template/scripts/init-db.ts +18 -18
  116. package/template/src/App.tsx +21 -21
  117. package/template/src/components/FormField.tsx +48 -48
  118. package/template/src/components/FormFileInput.tsx +75 -75
  119. package/template/src/components/GoogleAnalytics.tsx +34 -34
  120. package/template/src/components/LanguageSwitcher.tsx +53 -53
  121. package/template/src/components/MetriaAnalytics.tsx +68 -68
  122. package/template/src/components/PasswordInput.tsx +60 -60
  123. package/template/src/components/ScriptInjector.tsx +62 -62
  124. package/template/src/components/Stack.tsx +39 -39
  125. package/template/src/constants/constants.json +71 -71
  126. package/template/src/db/index.ts +21 -21
  127. package/template/src/db/provider.tsx +106 -106
  128. package/template/src/db/schema.json +278 -278
  129. package/template/src/db/types.ts +195 -195
  130. package/template/src/hooks/use-debounced-value.ts +12 -12
  131. package/template/src/hooks/use-page-title.ts +55 -55
  132. package/template/src/lang/index.ts +90 -90
  133. package/template/src/lib/api.ts +345 -345
  134. package/template/src/lib/env.ts +19 -19
  135. package/template/src/router.tsx +14 -14
  136. package/template/src/vite-env.d.ts +1 -1
  137. package/template/vite.config.ts +194 -199
package/README.md CHANGED
@@ -1,111 +1,111 @@
1
- # @promakeai/cli
2
-
3
- Modular React template CLI (like shadcn/ui). Create React projects and add feature modules incrementally. Copies code directly into projects rather than installing as dependencies.
4
-
5
- ## Quick Start
6
-
7
- ```bash
8
- # Install globally
9
- npm install -g @promakeai/cli
10
-
11
- # Create a new project
12
- promake create my-app --preset ecommerce --pm bun
13
-
14
- # Add modules to existing project
15
- promake add hero product-card
16
-
17
- # Theme customization
18
- promake theme --preset blue --radius medium
19
-
20
- # Health check
21
- promake doctor
22
- ```
23
-
24
- ## Commands
25
-
26
- | Command | Description |
27
- |---------|-------------|
28
- | `promake create <name>` | Scaffold a new React project (generates admin token) |
29
- | `promake add <items...>` | Add modules, components, or pages |
30
- | `promake remove <modules...>` | Remove installed modules |
31
- | `promake sync` | Install missing modules from promake.json |
32
- | `promake theme` | Configure theme (colors, radius, fonts) |
33
- | `promake list` | Browse available modules |
34
- | `promake doctor` | Analyze project for issues |
35
- | `promake init` | Initialize promake.json |
36
- | `promake zip / unzip` | Archive utilities |
37
-
38
- ## Data Layer
39
-
40
- Projects generated by Promake include `@promakeai/dbreact` with a JSON schema
41
- (`src/db/schema.json`) and support for both SQLite and REST API modes.
42
- Use `@/db` hooks (`useDbList`, `useDbGet`, etc.) for data access.
43
-
44
- ### Database Modes
45
-
46
- - **SQLite** (default) — Prebuilt `database.db` loaded via sql.js WASM in the browser
47
- - **REST API** — Connects to a remote API with automatic Bearer auth for logged-in users
48
-
49
- ### Auth Integration
50
-
51
- When REST API mode is active, the template's `AppDbProvider` reads auth tokens from
52
- localStorage (where auth-core's Zustand store persists under `"auth-storage"` key).
53
- No direct dependency on auth-core module code.
54
-
55
- ### Admin Token
56
-
57
- During `promake create`, a UUID admin token is generated and written to `.env` as
58
- `VITE_DB_ADMIN_TOKEN`. This token is used by `@promakeai/dbcli` for authenticated
59
- REST API access when managing the project's database.
60
-
61
- ### Schema Permissions
62
-
63
- All template tables include `$permissions` metadata for role-based access control:
64
-
65
- ```json
66
- "$permissions": {
67
- "anon": ["read"],
68
- "user": ["read"],
69
- "admin": ["read", "create", "update", "delete"]
70
- }
71
- ```
72
-
73
- Roles: `anon`, `user`, `admin`. Actions: `create`, `read`, `update`, `delete`.
74
-
75
- ## Available Presets
76
-
77
- | Preset | Description |
78
- |--------|-------------|
79
- | `ecommerce` | Full e-commerce with products, categories, cart |
80
- | `blog` | Blog with posts, categories, comments |
81
- | `portfolio` | Portfolio with projects and sections |
82
- | `empty` | Minimal template with no pre-installed modules |
83
-
84
- ## Development
85
-
86
- ```bash
87
- # Install dependencies
88
- bun install
89
-
90
- # Run from source
91
- bun run dev
92
-
93
- # Build
94
- bun run build
95
-
96
- # Test
97
- bun test
98
-
99
- # Type check
100
- bun run typecheck
101
- ```
102
-
103
- ## Related Packages
104
-
105
- - [@promakeai/dbreact](https://www.npmjs.com/package/@promakeai/dbreact) — React database hooks (used in template)
106
- - [@promakeai/dbcli](https://www.npmjs.com/package/@promakeai/dbcli) — Database CLI tool
107
- - [@promakeai/orm](https://www.npmjs.com/package/@promakeai/orm) — Core ORM
108
-
109
- ## License
110
-
111
- MIT
1
+ # @promakeai/cli
2
+
3
+ Modular React template CLI (like shadcn/ui). Create React projects and add feature modules incrementally. Copies code directly into projects rather than installing as dependencies.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Install globally
9
+ npm install -g @promakeai/cli
10
+
11
+ # Create a new project
12
+ promake create my-app --preset ecommerce --pm bun
13
+
14
+ # Add modules to existing project
15
+ promake add hero product-card
16
+
17
+ # Theme customization
18
+ promake theme --preset blue --radius medium
19
+
20
+ # Health check
21
+ promake doctor
22
+ ```
23
+
24
+ ## Commands
25
+
26
+ | Command | Description |
27
+ |---------|-------------|
28
+ | `promake create <name>` | Scaffold a new React project (generates admin token) |
29
+ | `promake add <items...>` | Add modules, components, or pages |
30
+ | `promake remove <modules...>` | Remove installed modules |
31
+ | `promake sync` | Install missing modules from promake.json |
32
+ | `promake theme` | Configure theme (colors, radius, fonts) |
33
+ | `promake list` | Browse available modules |
34
+ | `promake doctor` | Analyze project for issues |
35
+ | `promake init` | Initialize promake.json |
36
+ | `promake zip / unzip` | Archive utilities |
37
+
38
+ ## Data Layer
39
+
40
+ Projects generated by Promake include `@promakeai/dbreact` with a JSON schema
41
+ (`src/db/schema.json`) and support for both SQLite and REST API modes.
42
+ Use `@/db` hooks (`useDbList`, `useDbGet`, etc.) for data access.
43
+
44
+ ### Database Modes
45
+
46
+ - **SQLite** (default) — Prebuilt `database.db` loaded via sql.js WASM in the browser
47
+ - **REST API** — Connects to a remote API with automatic Bearer auth for logged-in users
48
+
49
+ ### Auth Integration
50
+
51
+ When REST API mode is active, the template's `AppDbProvider` reads auth tokens from
52
+ localStorage (where auth-core's Zustand store persists under `"auth-storage"` key).
53
+ No direct dependency on auth-core module code.
54
+
55
+ ### Admin Token
56
+
57
+ During `promake create`, a UUID admin token is generated and written to `.env` as
58
+ `VITE_DB_ADMIN_TOKEN`. This token is used by `@promakeai/dbcli` for authenticated
59
+ REST API access when managing the project's database.
60
+
61
+ ### Schema Permissions
62
+
63
+ All template tables include `$permissions` metadata for role-based access control:
64
+
65
+ ```json
66
+ "$permissions": {
67
+ "anon": ["read"],
68
+ "user": ["read"],
69
+ "admin": ["read", "create", "update", "delete"]
70
+ }
71
+ ```
72
+
73
+ Roles: `anon`, `user`, `admin`. Actions: `create`, `read`, `update`, `delete`.
74
+
75
+ ## Available Presets
76
+
77
+ | Preset | Description |
78
+ |--------|-------------|
79
+ | `ecommerce` | Full e-commerce with products, categories, cart |
80
+ | `blog` | Blog with posts, categories, comments |
81
+ | `portfolio` | Portfolio with projects and sections |
82
+ | `empty` | Minimal template with no pre-installed modules |
83
+
84
+ ## Development
85
+
86
+ ```bash
87
+ # Install dependencies
88
+ bun install
89
+
90
+ # Run from source
91
+ bun run dev
92
+
93
+ # Build
94
+ bun run build
95
+
96
+ # Test
97
+ bun test
98
+
99
+ # Type check
100
+ bun run typecheck
101
+ ```
102
+
103
+ ## Related Packages
104
+
105
+ - [@promakeai/dbreact](https://www.npmjs.com/package/@promakeai/dbreact) — React database hooks (used in template)
106
+ - [@promakeai/dbcli](https://www.npmjs.com/package/@promakeai/dbcli) — Database CLI tool
107
+ - [@promakeai/orm](https://www.npmjs.com/package/@promakeai/orm) — Core ORM
108
+
109
+ ## License
110
+
111
+ MIT