@promakeai/cli 0.5.8 → 0.6.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 +71 -71
- package/dist/index.js +259 -254
- package/dist/registry/about-page.json +3 -3
- package/dist/registry/about-section.json +4 -4
- package/dist/registry/animations.json +2 -2
- package/dist/registry/announcement-bar.json +4 -4
- package/dist/registry/api.json +1 -1
- package/dist/registry/auth-core.json +3 -3
- package/dist/registry/bento-grid-section.json +4 -4
- package/dist/registry/blog-core.json +5 -5
- package/dist/registry/blog-list-page.json +4 -4
- package/dist/registry/blog-section.json +4 -4
- package/dist/registry/cards-carousel-section.json +4 -4
- package/dist/registry/cart-drawer.json +4 -4
- package/dist/registry/cart-page.json +4 -4
- package/dist/registry/case-study-page.json +3 -3
- package/dist/registry/category-section.json +4 -4
- package/dist/registry/checkout-page.json +4 -4
- package/dist/registry/coming-soon-page-minimal.json +4 -4
- package/dist/registry/coming-soon-page.json +4 -4
- package/dist/registry/contact-info-grid.json +4 -4
- package/dist/registry/contact-page-centered.json +4 -4
- package/dist/registry/contact-page-map-overlay.json +3 -3
- package/dist/registry/contact-page-map-split.json +3 -3
- package/dist/registry/contact-page-split.json +4 -4
- package/dist/registry/contact-page.json +4 -4
- package/dist/registry/content-section.json +4 -4
- package/dist/registry/cookie-consent.json +4 -4
- package/dist/registry/cookies-page.json +3 -3
- package/dist/registry/cta-section.json +3 -3
- package/dist/registry/ecommerce-core.json +8 -8
- package/dist/registry/empty-page.json +3 -3
- package/dist/registry/faq-categorized.json +4 -4
- package/dist/registry/faq-simple.json +4 -4
- package/dist/registry/favorites-blog-block.json +1 -1
- package/dist/registry/favorites-blog-page.json +4 -4
- package/dist/registry/favorites-ecommerce-block.json +1 -1
- package/dist/registry/favorites-ecommerce-page.json +4 -4
- package/dist/registry/feature-section.json +3 -3
- package/dist/registry/featured-products.json +4 -4
- package/dist/registry/footer-detailed.json +4 -4
- package/dist/registry/footer-minimal.json +3 -3
- package/dist/registry/footer.json +3 -3
- package/dist/registry/forgot-password-page-split.json +4 -4
- package/dist/registry/forgot-password-page.json +4 -4
- package/dist/registry/google-adsense.json +4 -4
- package/dist/registry/google-map.json +2 -2
- package/dist/registry/header-centered-pill.json +4 -4
- package/dist/registry/header-ecommerce.json +4 -4
- package/dist/registry/header-mega.json +4 -4
- package/dist/registry/header-minimal.json +4 -4
- package/dist/registry/header-simple.json +3 -3
- package/dist/registry/hero-carousel.json +3 -3
- package/dist/registry/hero-cta.json +4 -4
- package/dist/registry/hero-gradient.json +4 -4
- package/dist/registry/hero-grid.json +4 -4
- package/dist/registry/hero-profile.json +3 -3
- package/dist/registry/hero.json +3 -3
- package/dist/registry/index.json +103 -103
- package/dist/registry/landing-page-app.json +3 -3
- package/dist/registry/landing-page-saas.json +3 -3
- package/dist/registry/login-page-split.json +4 -4
- package/dist/registry/login-page.json +4 -4
- package/dist/registry/logo-cloud.json +4 -4
- package/dist/registry/masonry-grid.json +3 -3
- package/dist/registry/my-orders-page.json +4 -4
- package/dist/registry/newsletter-section.json +4 -4
- package/dist/registry/order-card-compact.json +1 -1
- package/dist/registry/order-confirmation-page.json +4 -4
- package/dist/registry/order-detail-block.json +1 -1
- package/dist/registry/orders-list-block.json +1 -1
- package/dist/registry/payment-success-block.json +2 -2
- package/dist/registry/portfolio-page.json +4 -4
- package/dist/registry/post-card.json +4 -4
- package/dist/registry/post-detail-block.json +2 -2
- package/dist/registry/post-detail-page.json +4 -4
- package/dist/registry/pricing-card.json +3 -3
- package/dist/registry/pricing-page.json +4 -4
- package/dist/registry/pricing-section.json +4 -4
- package/dist/registry/privacy-page.json +3 -3
- package/dist/registry/product-card-detailed.json +4 -4
- package/dist/registry/product-card-hover.json +4 -4
- package/dist/registry/product-card.json +4 -4
- package/dist/registry/product-detail-block.json +2 -2
- package/dist/registry/product-detail-page.json +4 -4
- package/dist/registry/product-detail-section.json +4 -4
- package/dist/registry/product-quick-view.json +4 -4
- package/dist/registry/products-page.json +4 -4
- package/dist/registry/reading-progress.json +4 -4
- package/dist/registry/register-page-split.json +4 -4
- package/dist/registry/register-page.json +4 -4
- package/dist/registry/related-posts-block.json +1 -1
- package/dist/registry/related-products-block.json +2 -2
- package/dist/registry/reset-password-page-split.json +4 -4
- package/dist/registry/reset-password-page.json +4 -4
- package/dist/registry/service-card.json +1 -1
- package/dist/registry/share-buttons.json +4 -4
- package/dist/registry/skill-card.json +1 -1
- package/dist/registry/team-page.json +4 -4
- package/dist/registry/terms-page.json +3 -3
- package/dist/registry/testimonials-carousel.json +4 -4
- package/dist/registry/testimonials-grid.json +4 -4
- package/dist/registry/timeline-section.json +4 -4
- package/dist/registry/video-hero.json +4 -4
- package/dist/registry/youtube-embed.json +4 -4
- package/package.json +59 -56
- package/template/.env +6 -6
- package/template/README.md +54 -54
- package/template/eslint.config.js +41 -41
- package/template/package.json +95 -95
- package/template/public/_redirects +1 -1
- package/template/public/robots.txt +14 -14
- package/template/scripts/init-db.ts +18 -18
- package/template/src/App.tsx +19 -19
- package/template/src/components/FormField.tsx +48 -48
- package/template/src/components/FormFileInput.tsx +75 -75
- package/template/src/components/GoogleAnalytics.tsx +34 -34
- package/template/src/components/LanguageSwitcher.tsx +53 -53
- package/template/src/components/PasswordInput.tsx +60 -60
- package/template/src/components/ScriptInjector.tsx +62 -62
- package/template/src/components/Stack.tsx +39 -39
- package/template/src/constants/constants.json +67 -67
- package/template/src/db/index.ts +20 -20
- package/template/src/db/provider.tsx +78 -78
- package/template/src/db/schema.json +258 -258
- package/template/src/db/types.ts +195 -195
- package/template/src/hooks/use-debounced-value.ts +12 -12
- package/template/src/lang/index.ts +90 -90
- package/template/src/lib/api.ts +345 -345
- package/template/src/lib/env.ts +19 -19
- package/template/src/router.tsx +14 -14
- package/template/src/vite-env.d.ts +1 -1
- package/template/vite.config.ts +68 -64
- package/template/public/data/database.db-shm +0 -0
- package/template/public/data/database.db-wal +0 -0
package/package.json
CHANGED
|
@@ -1,56 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@promakeai/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"bin": {
|
|
6
|
-
"promake": "dist/index.js"
|
|
7
|
-
},
|
|
8
|
-
"files": [
|
|
9
|
-
"dist/index.js",
|
|
10
|
-
"dist/registry",
|
|
11
|
-
"template"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"dev": "bun run src/index.ts",
|
|
15
|
-
"dev:app": "cd dev && bun run dev",
|
|
16
|
-
"dev:populate": "bun run scripts/populate-dev.ts",
|
|
17
|
-
"dev:fresh": "bun run dev:populate && bun run dev:app",
|
|
18
|
-
"playground:create": "rm -rf playground && bun run dev -- create playground --template empty --pm bun",
|
|
19
|
-
"playground:reset": "bun run playground:create",
|
|
20
|
-
"playground:add": "cd playground && bun run ../src/index.ts add",
|
|
21
|
-
"playground:ecommerce": "rm -rf playground && bun run dev -- create playground --template ecommerce --pm bun",
|
|
22
|
-
"clean": "rimraf dist",
|
|
23
|
-
"build": "bun run clean && bun run build:cli && bun run build:registry",
|
|
24
|
-
"build:cli": "bun build src/index.ts --outdir dist --target node --minify",
|
|
25
|
-
"build:registry": "bun run scripts/build-registry.ts",
|
|
26
|
-
"typecheck": "tsc --noEmit",
|
|
27
|
-
"prepublishOnly": "bun run build",
|
|
28
|
-
"test": "bun test",
|
|
29
|
-
"test:
|
|
30
|
-
"test:
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"@types/
|
|
51
|
-
"@types/
|
|
52
|
-
"@types/
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@promakeai/cli",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"promake": "dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/index.js",
|
|
10
|
+
"dist/registry",
|
|
11
|
+
"template"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "bun run src/index.ts",
|
|
15
|
+
"dev:app": "cd dev && bun run dev",
|
|
16
|
+
"dev:populate": "bun run scripts/populate-dev.ts",
|
|
17
|
+
"dev:fresh": "bun run dev:populate && bun run dev:app",
|
|
18
|
+
"playground:create": "rm -rf playground && bun run dev -- create playground --template empty --pm bun",
|
|
19
|
+
"playground:reset": "bun run playground:create",
|
|
20
|
+
"playground:add": "cd playground && bun run ../src/index.ts add",
|
|
21
|
+
"playground:ecommerce": "rm -rf playground && bun run dev -- create playground --template ecommerce --pm bun",
|
|
22
|
+
"clean": "rimraf dist",
|
|
23
|
+
"build": "bun run clean && bun run build:cli && bun run build:registry",
|
|
24
|
+
"build:cli": "bun build src/index.ts --outdir dist --target node --minify",
|
|
25
|
+
"build:registry": "bun run scripts/build-registry.ts",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"prepublishOnly": "bun run build",
|
|
28
|
+
"test": "bun test",
|
|
29
|
+
"test:e2e": "bun run scripts/e2e-test.ts",
|
|
30
|
+
"test:watch": "bun test --watch",
|
|
31
|
+
"test:coverage": "bun test --coverage",
|
|
32
|
+
"release": "bun run build && npm publish --access public",
|
|
33
|
+
"setup:doctor-scenarios": "bash scripts/setup-doctor-scenarios.sh",
|
|
34
|
+
"report:doctor": "bun run src/__tests__/doctor-capability-report.ts"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"adm-zip": "^0.5.16",
|
|
38
|
+
"archiver": "^7.0.1",
|
|
39
|
+
"chalk": "^5.3.0",
|
|
40
|
+
"commander": "^12.1.0",
|
|
41
|
+
"culori": "^4.0.2",
|
|
42
|
+
"dotenv": "^17.2.3",
|
|
43
|
+
"fs-extra": "^11.3.3",
|
|
44
|
+
"glob": "^11.0.0",
|
|
45
|
+
"ora": "^8.1.1",
|
|
46
|
+
"prompts": "^2.4.2",
|
|
47
|
+
"puppeteer-core": "^24.36.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/archiver": "^7.0.0",
|
|
51
|
+
"@types/bun": "^1.1.14",
|
|
52
|
+
"@types/culori": "^4.0.1",
|
|
53
|
+
"@types/fs-extra": "^11.0.4",
|
|
54
|
+
"@types/node": "^22.10.2",
|
|
55
|
+
"@types/prompts": "^2.4.9",
|
|
56
|
+
"rimraf": "6.0.1",
|
|
57
|
+
"typescript": "^5.7.2"
|
|
58
|
+
}
|
|
59
|
+
}
|
package/template/.env
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
VITE_API_PAYMENT="https://payment.promake.ai/api/v1"
|
|
2
|
-
VITE_TENANT_UUID="YWJjeHl6MTIzT0dVWkNBTg"
|
|
3
|
-
VITE_MAIL_SERVICE_URL="https://mail.promake.ai/api/v1/send-mail"
|
|
4
|
-
VITE_TENANT_MAIL="uc.erkut@gmail.com"
|
|
5
|
-
VITE_ONLINE_PAYMENT_METHODS="stripe,iyzico"
|
|
6
|
-
VITE_AVAILABLE_PAYMENT_METHODS="card,transfer,cash"
|
|
1
|
+
VITE_API_PAYMENT="https://payment.promake.ai/api/v1"
|
|
2
|
+
VITE_TENANT_UUID="YWJjeHl6MTIzT0dVWkNBTg"
|
|
3
|
+
VITE_MAIL_SERVICE_URL="https://mail.promake.ai/api/v1/send-mail"
|
|
4
|
+
VITE_TENANT_MAIL="uc.erkut@gmail.com"
|
|
5
|
+
VITE_ONLINE_PAYMENT_METHODS="stripe,iyzico"
|
|
6
|
+
VITE_AVAILABLE_PAYMENT_METHODS="card,transfer,cash"
|
|
7
7
|
VITE_PROMAKE_ENV="testb"
|
package/template/README.md
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
# Promake React Template
|
|
2
|
-
|
|
3
|
-
This template is the runtime target for `@promakeai/cli`. It includes a
|
|
4
|
-
multi-language, schema-driven database setup powered by `@promakeai/dbreact`.
|
|
5
|
-
|
|
6
|
-
## What You Get
|
|
7
|
-
|
|
8
|
-
- Vite + React + TypeScript
|
|
9
|
-
- Module-based architecture (`src/modules`)
|
|
10
|
-
- Built-in DB layer via `@/db` (dbreact hooks + schema)
|
|
11
|
-
- Multi-language content with translation fallback
|
|
12
|
-
|
|
13
|
-
## Database Layout
|
|
14
|
-
|
|
15
|
-
- Schema: `src/db/schema.json`
|
|
16
|
-
- Types: `src/db/types.ts`
|
|
17
|
-
- Provider: `src/db/provider.tsx`
|
|
18
|
-
- DB file: `public/data/database.db`
|
|
19
|
-
|
|
20
|
-
The app wraps your UI with `AppDbProvider` in `src/App.tsx` and syncs DB language
|
|
21
|
-
with i18n.
|
|
22
|
-
|
|
23
|
-
## Regenerate Database
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# From schema.json
|
|
27
|
-
dbcli generate --schema ./src/db/schema.json \
|
|
28
|
-
--database ./public/data/database.db \
|
|
29
|
-
--output ./src/db
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Or run the helper:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
bun run init-db
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Using the DB in Modules
|
|
39
|
-
|
|
40
|
-
```tsx
|
|
41
|
-
import { useDbList } from "@/db";
|
|
42
|
-
import type { DbProduct } from "@/db";
|
|
43
|
-
|
|
44
|
-
const { data: products } = useDbList<DbProduct>("products", {
|
|
45
|
-
where: { price: { $gt: 50 } },
|
|
46
|
-
limit: 12,
|
|
47
|
-
});
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Language Behavior
|
|
51
|
-
|
|
52
|
-
- `defaultLanguage` is defined in `schema.json`.
|
|
53
|
-
- `DbProvider` uses `lang` + `fallbackLang` for translation resolution.
|
|
54
|
-
- Changing i18n language triggers refetch of db queries.
|
|
1
|
+
# Promake React Template
|
|
2
|
+
|
|
3
|
+
This template is the runtime target for `@promakeai/cli`. It includes a
|
|
4
|
+
multi-language, schema-driven database setup powered by `@promakeai/dbreact`.
|
|
5
|
+
|
|
6
|
+
## What You Get
|
|
7
|
+
|
|
8
|
+
- Vite + React + TypeScript
|
|
9
|
+
- Module-based architecture (`src/modules`)
|
|
10
|
+
- Built-in DB layer via `@/db` (dbreact hooks + schema)
|
|
11
|
+
- Multi-language content with translation fallback
|
|
12
|
+
|
|
13
|
+
## Database Layout
|
|
14
|
+
|
|
15
|
+
- Schema: `src/db/schema.json`
|
|
16
|
+
- Types: `src/db/types.ts`
|
|
17
|
+
- Provider: `src/db/provider.tsx`
|
|
18
|
+
- DB file: `public/data/database.db`
|
|
19
|
+
|
|
20
|
+
The app wraps your UI with `AppDbProvider` in `src/App.tsx` and syncs DB language
|
|
21
|
+
with i18n.
|
|
22
|
+
|
|
23
|
+
## Regenerate Database
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# From schema.json
|
|
27
|
+
dbcli generate --schema ./src/db/schema.json \
|
|
28
|
+
--database ./public/data/database.db \
|
|
29
|
+
--output ./src/db
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or run the helper:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bun run init-db
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Using the DB in Modules
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { useDbList } from "@/db";
|
|
42
|
+
import type { DbProduct } from "@/db";
|
|
43
|
+
|
|
44
|
+
const { data: products } = useDbList<DbProduct>("products", {
|
|
45
|
+
where: { price: { $gt: 50 } },
|
|
46
|
+
limit: 12,
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Language Behavior
|
|
51
|
+
|
|
52
|
+
- `defaultLanguage` is defined in `schema.json`.
|
|
53
|
+
- `DbProvider` uses `lang` + `fallbackLang` for translation resolution.
|
|
54
|
+
- Changing i18n language triggers refetch of db queries.
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
|
-
import globals from 'globals';
|
|
3
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
4
|
-
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
5
|
-
import tseslint from 'typescript-eslint';
|
|
6
|
-
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
7
|
-
import eslintConfigPrettier from 'eslint-config-prettier/flat';
|
|
8
|
-
|
|
9
|
-
export default defineConfig([
|
|
10
|
-
globalIgnores(['dist']),
|
|
11
|
-
{
|
|
12
|
-
files: ['**/*.{ts,tsx}'],
|
|
13
|
-
extends: [
|
|
14
|
-
js.configs.recommended,
|
|
15
|
-
tseslint.configs.recommended,
|
|
16
|
-
reactHooks.configs.flat.recommended,
|
|
17
|
-
reactRefresh.configs.vite,
|
|
18
|
-
eslintConfigPrettier,
|
|
19
|
-
],
|
|
20
|
-
languageOptions: {
|
|
21
|
-
ecmaVersion: 2020,
|
|
22
|
-
globals: globals.browser,
|
|
23
|
-
},
|
|
24
|
-
rules: {
|
|
25
|
-
'@typescript-eslint/consistent-type-imports': ['warn', {
|
|
26
|
-
prefer: 'type-imports',
|
|
27
|
-
fixStyle: 'inline-type-imports',
|
|
28
|
-
}],
|
|
29
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
30
|
-
'@typescript-eslint/no-unused-vars': 'off',
|
|
31
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
32
|
-
'react-refresh/only-export-components': 'off',
|
|
33
|
-
'react-hooks/purity': 'off',
|
|
34
|
-
'react-hooks/exhaustive-deps': 'off',
|
|
35
|
-
'react-hooks/set-state-in-effect': 'off',
|
|
36
|
-
'no-unused-vars': 'off',
|
|
37
|
-
'prefer-const': 'warn',
|
|
38
|
-
'@typescript-eslint/no-empty-object-type': 'off',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
]);
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import globals from 'globals';
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
5
|
+
import tseslint from 'typescript-eslint';
|
|
6
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
7
|
+
import eslintConfigPrettier from 'eslint-config-prettier/flat';
|
|
8
|
+
|
|
9
|
+
export default defineConfig([
|
|
10
|
+
globalIgnores(['dist']),
|
|
11
|
+
{
|
|
12
|
+
files: ['**/*.{ts,tsx}'],
|
|
13
|
+
extends: [
|
|
14
|
+
js.configs.recommended,
|
|
15
|
+
tseslint.configs.recommended,
|
|
16
|
+
reactHooks.configs.flat.recommended,
|
|
17
|
+
reactRefresh.configs.vite,
|
|
18
|
+
eslintConfigPrettier,
|
|
19
|
+
],
|
|
20
|
+
languageOptions: {
|
|
21
|
+
ecmaVersion: 2020,
|
|
22
|
+
globals: globals.browser,
|
|
23
|
+
},
|
|
24
|
+
rules: {
|
|
25
|
+
'@typescript-eslint/consistent-type-imports': ['warn', {
|
|
26
|
+
prefer: 'type-imports',
|
|
27
|
+
fixStyle: 'inline-type-imports',
|
|
28
|
+
}],
|
|
29
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
30
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
31
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
32
|
+
'react-refresh/only-export-components': 'off',
|
|
33
|
+
'react-hooks/purity': 'off',
|
|
34
|
+
'react-hooks/exhaustive-deps': 'off',
|
|
35
|
+
'react-hooks/set-state-in-effect': 'off',
|
|
36
|
+
'no-unused-vars': 'off',
|
|
37
|
+
'prefer-const': 'warn',
|
|
38
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
]);
|
package/template/package.json
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@promakeai/template",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"prebuild": "tsc -b || cd .",
|
|
9
|
-
"build": "vite build",
|
|
10
|
-
"typecheck": "tsc -b",
|
|
11
|
-
"lint": "eslint .",
|
|
12
|
-
"preview": "vite preview",
|
|
13
|
-
"check": "tsc --noEmit",
|
|
14
|
-
"format": "prettier --write ."
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"@hookform/resolvers": "^5.2.2",
|
|
18
|
-
"@promakeai/dbreact": "^1.0.7",
|
|
19
|
-
"@promakeai/customer-backend-client": "^1.1.0",
|
|
20
|
-
"@promakeai/inspector": "^1.7.4",
|
|
21
|
-
"@radix-ui/react-accordion": "^1.2.12",
|
|
22
|
-
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
23
|
-
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
24
|
-
"@radix-ui/react-avatar": "^1.1.11",
|
|
25
|
-
"@radix-ui/react-checkbox": "^1.3.3",
|
|
26
|
-
"@radix-ui/react-collapsible": "^1.1.12",
|
|
27
|
-
"@radix-ui/react-context-menu": "^2.2.16",
|
|
28
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
29
|
-
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
30
|
-
"@radix-ui/react-hover-card": "^1.1.15",
|
|
31
|
-
"@radix-ui/react-label": "^2.1.8",
|
|
32
|
-
"@radix-ui/react-menubar": "^1.1.16",
|
|
33
|
-
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
34
|
-
"@radix-ui/react-popover": "^1.1.15",
|
|
35
|
-
"@radix-ui/react-progress": "^1.1.8",
|
|
36
|
-
"@radix-ui/react-radio-group": "^1.3.8",
|
|
37
|
-
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
38
|
-
"@radix-ui/react-select": "^2.2.6",
|
|
39
|
-
"@radix-ui/react-separator": "^1.1.8",
|
|
40
|
-
"@radix-ui/react-slider": "^1.3.6",
|
|
41
|
-
"@radix-ui/react-slot": "^1.2.4",
|
|
42
|
-
"@radix-ui/react-switch": "^1.2.6",
|
|
43
|
-
"@radix-ui/react-tabs": "^1.1.13",
|
|
44
|
-
"@radix-ui/react-toggle": "^1.1.10",
|
|
45
|
-
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
46
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
47
|
-
"@tailwindcss/vite": "^4.1.18",
|
|
48
|
-
"@tanstack/react-query": "^5.90.17",
|
|
49
|
-
"axios": "^1.13.2",
|
|
50
|
-
"class-variance-authority": "^0.7.1",
|
|
51
|
-
"clsx": "^2.1.1",
|
|
52
|
-
"cmdk": "^1.1.1",
|
|
53
|
-
"date-fns": "^4.1.0",
|
|
54
|
-
"embla-carousel-react": "^8.6.0",
|
|
55
|
-
"i18next": "^25.7.4",
|
|
56
|
-
"i18next-browser-languagedetector": "^8.2.0",
|
|
57
|
-
"input-otp": "^1.4.2",
|
|
58
|
-
"lucide-react": "^0.562.0",
|
|
59
|
-
"motion": "^12.26.2",
|
|
60
|
-
"next-themes": "^0.4.6",
|
|
61
|
-
"react": "^19.2.0",
|
|
62
|
-
"react-day-picker": "^9.13.0",
|
|
63
|
-
"react-dom": "^19.2.0",
|
|
64
|
-
"react-hook-form": "^7.71.1",
|
|
65
|
-
"react-i18next": "^16.5.3",
|
|
66
|
-
"react-resizable-panels": "^4.4.1",
|
|
67
|
-
"react-router": "^7.12.0",
|
|
68
|
-
"recharts": "2.15.4",
|
|
69
|
-
"sonner": "^2.0.7",
|
|
70
|
-
"sql.js": "^1.13.0",
|
|
71
|
-
"tailwind-merge": "^3.4.0",
|
|
72
|
-
"tailwindcss": "^4.1.18",
|
|
73
|
-
"vaul": "^1.1.2",
|
|
74
|
-
"zod": "^4.3.5",
|
|
75
|
-
"zustand": "^5.0.10"
|
|
76
|
-
},
|
|
77
|
-
"devDependencies": {
|
|
78
|
-
"@eslint/js": "^9.39.1",
|
|
79
|
-
"@types/node": "^25.0.8",
|
|
80
|
-
"@types/react": "^19.2.5",
|
|
81
|
-
"@types/react-dom": "^19.2.3",
|
|
82
|
-
"@types/sql.js": "^1.4.9",
|
|
83
|
-
"@vitejs/plugin-react": "^5.1.1",
|
|
84
|
-
"eslint": "^9.39.1",
|
|
85
|
-
"eslint-config-prettier": "^10.1.8",
|
|
86
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
87
|
-
"eslint-plugin-react-refresh": "^0.4.24",
|
|
88
|
-
"globals": "^16.5.0",
|
|
89
|
-
"prettier": "3.8.0",
|
|
90
|
-
"tw-animate-css": "^1.4.0",
|
|
91
|
-
"typescript": "~5.9.3",
|
|
92
|
-
"typescript-eslint": "^8.46.4",
|
|
93
|
-
"vite": "^7.2.4"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@promakeai/template",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.1.6",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"prebuild": "tsc -b || cd .",
|
|
9
|
+
"build": "vite build",
|
|
10
|
+
"typecheck": "tsc -b",
|
|
11
|
+
"lint": "eslint .",
|
|
12
|
+
"preview": "vite preview",
|
|
13
|
+
"check": "tsc --noEmit",
|
|
14
|
+
"format": "prettier --write ."
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@hookform/resolvers": "^5.2.2",
|
|
18
|
+
"@promakeai/dbreact": "^1.0.7",
|
|
19
|
+
"@promakeai/customer-backend-client": "^1.1.0",
|
|
20
|
+
"@promakeai/inspector": "^1.7.4",
|
|
21
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
22
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
23
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
24
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
25
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
26
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
27
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
28
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
29
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
30
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
31
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
32
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
33
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
34
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
35
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
36
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
37
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
38
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
39
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
40
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
41
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
42
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
43
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
44
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
45
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
46
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
47
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
48
|
+
"@tanstack/react-query": "^5.90.17",
|
|
49
|
+
"axios": "^1.13.2",
|
|
50
|
+
"class-variance-authority": "^0.7.1",
|
|
51
|
+
"clsx": "^2.1.1",
|
|
52
|
+
"cmdk": "^1.1.1",
|
|
53
|
+
"date-fns": "^4.1.0",
|
|
54
|
+
"embla-carousel-react": "^8.6.0",
|
|
55
|
+
"i18next": "^25.7.4",
|
|
56
|
+
"i18next-browser-languagedetector": "^8.2.0",
|
|
57
|
+
"input-otp": "^1.4.2",
|
|
58
|
+
"lucide-react": "^0.562.0",
|
|
59
|
+
"motion": "^12.26.2",
|
|
60
|
+
"next-themes": "^0.4.6",
|
|
61
|
+
"react": "^19.2.0",
|
|
62
|
+
"react-day-picker": "^9.13.0",
|
|
63
|
+
"react-dom": "^19.2.0",
|
|
64
|
+
"react-hook-form": "^7.71.1",
|
|
65
|
+
"react-i18next": "^16.5.3",
|
|
66
|
+
"react-resizable-panels": "^4.4.1",
|
|
67
|
+
"react-router": "^7.12.0",
|
|
68
|
+
"recharts": "2.15.4",
|
|
69
|
+
"sonner": "^2.0.7",
|
|
70
|
+
"sql.js": "^1.13.0",
|
|
71
|
+
"tailwind-merge": "^3.4.0",
|
|
72
|
+
"tailwindcss": "^4.1.18",
|
|
73
|
+
"vaul": "^1.1.2",
|
|
74
|
+
"zod": "^4.3.5",
|
|
75
|
+
"zustand": "^5.0.10"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@eslint/js": "^9.39.1",
|
|
79
|
+
"@types/node": "^25.0.8",
|
|
80
|
+
"@types/react": "^19.2.5",
|
|
81
|
+
"@types/react-dom": "^19.2.3",
|
|
82
|
+
"@types/sql.js": "^1.4.9",
|
|
83
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
84
|
+
"eslint": "^9.39.1",
|
|
85
|
+
"eslint-config-prettier": "^10.1.8",
|
|
86
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
87
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
88
|
+
"globals": "^16.5.0",
|
|
89
|
+
"prettier": "3.8.0",
|
|
90
|
+
"tw-animate-css": "^1.4.0",
|
|
91
|
+
"typescript": "~5.9.3",
|
|
92
|
+
"typescript-eslint": "^8.46.4",
|
|
93
|
+
"vite": "^7.2.4"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* /index.html 200
|
|
1
|
+
/* /index.html 200
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
User-agent: Googlebot
|
|
2
|
-
Allow: /
|
|
3
|
-
|
|
4
|
-
User-agent: Bingbot
|
|
5
|
-
Allow: /
|
|
6
|
-
|
|
7
|
-
User-agent: Twitterbot
|
|
8
|
-
Allow: /
|
|
9
|
-
|
|
10
|
-
User-agent: facebookexternalhit
|
|
11
|
-
Allow: /
|
|
12
|
-
|
|
13
|
-
User-agent: *
|
|
14
|
-
Allow: /
|
|
1
|
+
User-agent: Googlebot
|
|
2
|
+
Allow: /
|
|
3
|
+
|
|
4
|
+
User-agent: Bingbot
|
|
5
|
+
Allow: /
|
|
6
|
+
|
|
7
|
+
User-agent: Twitterbot
|
|
8
|
+
Allow: /
|
|
9
|
+
|
|
10
|
+
User-agent: facebookexternalhit
|
|
11
|
+
Allow: /
|
|
12
|
+
|
|
13
|
+
User-agent: *
|
|
14
|
+
Allow: /
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { execSync } from "child_process";
|
|
2
|
-
import path from "path";
|
|
3
|
-
|
|
4
|
-
const cwd = process.cwd();
|
|
5
|
-
const schemaPath = path.join(cwd, "src", "db", "schema.json");
|
|
6
|
-
const outputDir = path.join(cwd, "src", "db");
|
|
7
|
-
const dbPath = path.join(cwd, "public", "data", "database.db");
|
|
8
|
-
|
|
9
|
-
const cmd = `dbcli generate --schema "${schemaPath}" --database "${dbPath}" --output "${outputDir}"`;
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
console.log("Generating database with dbcli...");
|
|
13
|
-
execSync(cmd, { stdio: "inherit" });
|
|
14
|
-
console.log(`Database created: ${dbPath}`);
|
|
15
|
-
} catch (err) {
|
|
16
|
-
console.error("Failed to generate database. Ensure dbcli is installed globally.");
|
|
17
|
-
throw err;
|
|
18
|
-
}
|
|
1
|
+
import { execSync } from "child_process";
|
|
2
|
+
import path from "path";
|
|
3
|
+
|
|
4
|
+
const cwd = process.cwd();
|
|
5
|
+
const schemaPath = path.join(cwd, "src", "db", "schema.json");
|
|
6
|
+
const outputDir = path.join(cwd, "src", "db");
|
|
7
|
+
const dbPath = path.join(cwd, "public", "data", "database.db");
|
|
8
|
+
|
|
9
|
+
const cmd = `dbcli generate --schema "${schemaPath}" --database "${dbPath}" --output "${outputDir}"`;
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
console.log("Generating database with dbcli...");
|
|
13
|
+
execSync(cmd, { stdio: "inherit" });
|
|
14
|
+
console.log(`Database created: ${dbPath}`);
|
|
15
|
+
} catch (err) {
|
|
16
|
+
console.error("Failed to generate database. Ensure dbcli is installed globally.");
|
|
17
|
+
throw err;
|
|
18
|
+
}
|
package/template/src/App.tsx
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
2
|
-
import { GoogleAnalytics } from "@/components/GoogleAnalytics";
|
|
3
|
-
import { ScriptInjector } from "@/components/ScriptInjector";
|
|
4
|
-
import { AppDbProvider } from "@/db";
|
|
5
|
-
import { Router } from "./router";
|
|
6
|
-
|
|
7
|
-
const App = () => {
|
|
8
|
-
return (
|
|
9
|
-
<AppDbProvider>
|
|
10
|
-
<TooltipProvider>
|
|
11
|
-
<GoogleAnalytics />
|
|
12
|
-
<ScriptInjector />
|
|
13
|
-
<Router />
|
|
14
|
-
</TooltipProvider>
|
|
15
|
-
</AppDbProvider>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default App;
|
|
1
|
+
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
2
|
+
import { GoogleAnalytics } from "@/components/GoogleAnalytics";
|
|
3
|
+
import { ScriptInjector } from "@/components/ScriptInjector";
|
|
4
|
+
import { AppDbProvider } from "@/db";
|
|
5
|
+
import { Router } from "./router";
|
|
6
|
+
|
|
7
|
+
const App = () => {
|
|
8
|
+
return (
|
|
9
|
+
<AppDbProvider>
|
|
10
|
+
<TooltipProvider>
|
|
11
|
+
<GoogleAnalytics />
|
|
12
|
+
<ScriptInjector />
|
|
13
|
+
<Router />
|
|
14
|
+
</TooltipProvider>
|
|
15
|
+
</AppDbProvider>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default App;
|