@promakeai/cli 0.0.5
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/dist/index.js +212 -0
- package/dist/registry/about-page.json +45 -0
- package/dist/registry/about-section.json +40 -0
- package/dist/registry/animations.json +69 -0
- package/dist/registry/bento-grid-section.json +42 -0
- package/dist/registry/blog-core.json +74 -0
- package/dist/registry/blog-list-page.json +48 -0
- package/dist/registry/blog-section.json +43 -0
- package/dist/registry/cards-carousel-section.json +46 -0
- package/dist/registry/cart-drawer.json +43 -0
- package/dist/registry/cart-page.json +47 -0
- package/dist/registry/category-section.json +43 -0
- package/dist/registry/checkout-page.json +47 -0
- package/dist/registry/contact-info-grid.json +40 -0
- package/dist/registry/contact-page-centered.json +50 -0
- package/dist/registry/contact-page-map-overlay.json +54 -0
- package/dist/registry/contact-page-map-split.json +54 -0
- package/dist/registry/contact-page-split.json +49 -0
- package/dist/registry/contact-page.json +45 -0
- package/dist/registry/content-section.json +40 -0
- package/dist/registry/cookies-page.json +45 -0
- package/dist/registry/cta-section.json +40 -0
- package/dist/registry/docs/about-page.md +32 -0
- package/dist/registry/docs/about-section.md +33 -0
- package/dist/registry/docs/animations.md +44 -0
- package/dist/registry/docs/bento-grid-section.md +40 -0
- package/dist/registry/docs/blog-core.md +37 -0
- package/dist/registry/docs/blog-list-page.md +38 -0
- package/dist/registry/docs/blog-section.md +39 -0
- package/dist/registry/docs/cards-carousel-section.md +39 -0
- package/dist/registry/docs/cart-drawer.md +42 -0
- package/dist/registry/docs/cart-page.md +37 -0
- package/dist/registry/docs/category-section.md +34 -0
- package/dist/registry/docs/checkout-page.md +38 -0
- package/dist/registry/docs/contact-info-grid.md +33 -0
- package/dist/registry/docs/contact-page-centered.md +41 -0
- package/dist/registry/docs/contact-page-map-overlay.md +44 -0
- package/dist/registry/docs/contact-page-map-split.md +44 -0
- package/dist/registry/docs/contact-page-split.md +40 -0
- package/dist/registry/docs/contact-page.md +33 -0
- package/dist/registry/docs/content-section.md +35 -0
- package/dist/registry/docs/cookies-page.md +32 -0
- package/dist/registry/docs/cta-section.md +32 -0
- package/dist/registry/docs/ecommerce-core.md +41 -0
- package/dist/registry/docs/empty-page.md +31 -0
- package/dist/registry/docs/faq-categorized.md +38 -0
- package/dist/registry/docs/faq-simple.md +38 -0
- package/dist/registry/docs/favorites-blog-block.md +38 -0
- package/dist/registry/docs/favorites-ecommerce-block.md +38 -0
- package/dist/registry/docs/feature-section.md +33 -0
- package/dist/registry/docs/featured-products.md +38 -0
- package/dist/registry/docs/footer-detailed.md +33 -0
- package/dist/registry/docs/footer-minimal.md +32 -0
- package/dist/registry/docs/footer.md +32 -0
- package/dist/registry/docs/google-map.md +36 -0
- package/dist/registry/docs/header-centered-pill.md +37 -0
- package/dist/registry/docs/header-ecommerce.md +38 -0
- package/dist/registry/docs/header-mega.md +40 -0
- package/dist/registry/docs/header-minimal.md +38 -0
- package/dist/registry/docs/header-simple.md +32 -0
- package/dist/registry/docs/hero-cta.md +38 -0
- package/dist/registry/docs/hero-gradient.md +33 -0
- package/dist/registry/docs/hero-grid.md +40 -0
- package/dist/registry/docs/hero-profile.md +33 -0
- package/dist/registry/docs/hero.md +32 -0
- package/dist/registry/docs/login-page-split.md +40 -0
- package/dist/registry/docs/login-page.md +39 -0
- package/dist/registry/docs/newsletter-section.md +40 -0
- package/dist/registry/docs/order-card-compact.md +37 -0
- package/dist/registry/docs/order-detail-block.md +37 -0
- package/dist/registry/docs/orders-list-block.md +40 -0
- package/dist/registry/docs/payment-success-block.md +32 -0
- package/dist/registry/docs/post-card.md +37 -0
- package/dist/registry/docs/post-detail-block.md +37 -0
- package/dist/registry/docs/pricing-card.md +37 -0
- package/dist/registry/docs/pricing-section.md +39 -0
- package/dist/registry/docs/privacy-page.md +32 -0
- package/dist/registry/docs/product-card-detailed.md +42 -0
- package/dist/registry/docs/product-card-hover.md +35 -0
- package/dist/registry/docs/product-card.md +37 -0
- package/dist/registry/docs/product-detail-block.md +37 -0
- package/dist/registry/docs/product-detail-section.md +45 -0
- package/dist/registry/docs/products-page.md +39 -0
- package/dist/registry/docs/related-posts-block.md +38 -0
- package/dist/registry/docs/related-products-block.md +38 -0
- package/dist/registry/docs/service-card.md +34 -0
- package/dist/registry/docs/skill-card.md +33 -0
- package/dist/registry/docs/terms-page.md +32 -0
- package/dist/registry/docs/testimonials-carousel.md +40 -0
- package/dist/registry/docs/testimonials-grid.md +39 -0
- package/dist/registry/ecommerce-core.json +95 -0
- package/dist/registry/empty-page.json +45 -0
- package/dist/registry/faq-categorized.json +42 -0
- package/dist/registry/faq-simple.json +42 -0
- package/dist/registry/favorites-blog-block.json +43 -0
- package/dist/registry/favorites-ecommerce-block.json +43 -0
- package/dist/registry/feature-section.json +40 -0
- package/dist/registry/featured-products.json +43 -0
- package/dist/registry/footer-detailed.json +43 -0
- package/dist/registry/footer-minimal.json +40 -0
- package/dist/registry/footer.json +40 -0
- package/dist/registry/google-map.json +31 -0
- package/dist/registry/header-centered-pill.json +45 -0
- package/dist/registry/header-ecommerce.json +42 -0
- package/dist/registry/header-mega.json +47 -0
- package/dist/registry/header-minimal.json +45 -0
- package/dist/registry/header-simple.json +43 -0
- package/dist/registry/hero-cta.json +42 -0
- package/dist/registry/hero-gradient.json +40 -0
- package/dist/registry/hero-grid.json +42 -0
- package/dist/registry/hero-profile.json +62 -0
- package/dist/registry/hero.json +40 -0
- package/dist/registry/index.json +70 -0
- package/dist/registry/login-page-split.json +47 -0
- package/dist/registry/login-page.json +49 -0
- package/dist/registry/newsletter-section.json +44 -0
- package/dist/registry/order-card-compact.json +42 -0
- package/dist/registry/order-detail-block.json +42 -0
- package/dist/registry/orders-list-block.json +45 -0
- package/dist/registry/payment-success-block.json +40 -0
- package/dist/registry/post-card.json +42 -0
- package/dist/registry/post-detail-block.json +42 -0
- package/dist/registry/pricing-card.json +40 -0
- package/dist/registry/pricing-section.json +43 -0
- package/dist/registry/privacy-page.json +45 -0
- package/dist/registry/product-card-detailed.json +45 -0
- package/dist/registry/product-card-hover.json +40 -0
- package/dist/registry/product-card.json +42 -0
- package/dist/registry/product-detail-block.json +42 -0
- package/dist/registry/product-detail-section.json +46 -0
- package/dist/registry/products-page.json +48 -0
- package/dist/registry/related-posts-block.json +43 -0
- package/dist/registry/related-products-block.json +43 -0
- package/dist/registry/service-card.json +28 -0
- package/dist/registry/skill-card.json +28 -0
- package/dist/registry/terms-page.json +45 -0
- package/dist/registry/testimonials-carousel.json +44 -0
- package/dist/registry/testimonials-grid.json +43 -0
- package/package.json +52 -0
- package/template/.env +6 -0
- package/template/.prettierignore +3 -0
- package/template/.prettierrc +1 -0
- package/template/README.md +73 -0
- package/template/bun.lock +1007 -0
- package/template/components.json +22 -0
- package/template/eslint.config.js +32 -0
- package/template/index.html +285 -0
- package/template/package.json +92 -0
- package/template/promake.json +6 -0
- package/template/public/_redirects +1 -0
- package/template/public/data/database.db +0 -0
- package/template/public/favicon.svg +1 -0
- package/template/public/images/placeholder.png +0 -0
- package/template/public/robots.txt +14 -0
- package/template/scripts/init-db.ts +131 -0
- package/template/src/App.tsx +33 -0
- package/template/src/components/Footer.tsx +100 -0
- package/template/src/components/Header.tsx +79 -0
- package/template/src/components/Hero.tsx +69 -0
- package/template/src/components/LanguageSwitcher.tsx +47 -0
- package/template/src/components/Layout.tsx +25 -0
- package/template/src/components/Logo.tsx +64 -0
- package/template/src/components/ThemeSwitcher.tsx +58 -0
- package/template/src/components/ui/accordion.tsx +64 -0
- package/template/src/components/ui/alert-dialog.tsx +155 -0
- package/template/src/components/ui/alert.tsx +66 -0
- package/template/src/components/ui/aspect-ratio.tsx +11 -0
- package/template/src/components/ui/avatar.tsx +51 -0
- package/template/src/components/ui/badge.tsx +46 -0
- package/template/src/components/ui/breadcrumb.tsx +109 -0
- package/template/src/components/ui/button-group.tsx +83 -0
- package/template/src/components/ui/button.tsx +62 -0
- package/template/src/components/ui/calendar.tsx +220 -0
- package/template/src/components/ui/card.tsx +92 -0
- package/template/src/components/ui/carousel.tsx +239 -0
- package/template/src/components/ui/chart.tsx +357 -0
- package/template/src/components/ui/checkbox.tsx +32 -0
- package/template/src/components/ui/collapsible.tsx +31 -0
- package/template/src/components/ui/command.tsx +182 -0
- package/template/src/components/ui/context-menu.tsx +252 -0
- package/template/src/components/ui/dialog.tsx +141 -0
- package/template/src/components/ui/drawer.tsx +135 -0
- package/template/src/components/ui/dropdown-menu.tsx +255 -0
- package/template/src/components/ui/empty.tsx +104 -0
- package/template/src/components/ui/field.tsx +246 -0
- package/template/src/components/ui/form.tsx +168 -0
- package/template/src/components/ui/hover-card.tsx +44 -0
- package/template/src/components/ui/input-group.tsx +170 -0
- package/template/src/components/ui/input-otp.tsx +75 -0
- package/template/src/components/ui/input.tsx +21 -0
- package/template/src/components/ui/item.tsx +193 -0
- package/template/src/components/ui/kbd.tsx +28 -0
- package/template/src/components/ui/label.tsx +24 -0
- package/template/src/components/ui/menubar.tsx +274 -0
- package/template/src/components/ui/navigation-menu.tsx +168 -0
- package/template/src/components/ui/pagination.tsx +127 -0
- package/template/src/components/ui/popover.tsx +48 -0
- package/template/src/components/ui/progress.tsx +29 -0
- package/template/src/components/ui/radio-group.tsx +45 -0
- package/template/src/components/ui/resizable.tsx +54 -0
- package/template/src/components/ui/scroll-area.tsx +58 -0
- package/template/src/components/ui/select.tsx +188 -0
- package/template/src/components/ui/separator.tsx +28 -0
- package/template/src/components/ui/sheet.tsx +137 -0
- package/template/src/components/ui/sidebar.tsx +726 -0
- package/template/src/components/ui/skeleton.tsx +13 -0
- package/template/src/components/ui/slider.tsx +63 -0
- package/template/src/components/ui/sonner.tsx +38 -0
- package/template/src/components/ui/spinner.tsx +16 -0
- package/template/src/components/ui/switch.tsx +31 -0
- package/template/src/components/ui/table.tsx +114 -0
- package/template/src/components/ui/tabs.tsx +66 -0
- package/template/src/components/ui/textarea.tsx +18 -0
- package/template/src/components/ui/toggle-group.tsx +81 -0
- package/template/src/components/ui/toggle.tsx +45 -0
- package/template/src/components/ui/tooltip.tsx +61 -0
- package/template/src/constants/constants.json +58 -0
- package/template/src/hooks/use-is-mobile.ts +21 -0
- package/template/src/hooks/use-page-title.ts +49 -0
- package/template/src/hooks/use-theme.ts +57 -0
- package/template/src/index.css +128 -0
- package/template/src/lang/en/about.json +4 -0
- package/template/src/lang/en/contact.json +39 -0
- package/template/src/lang/en/cookies.json +4 -0
- package/template/src/lang/en/footer.json +12 -0
- package/template/src/lang/en/forgotPassword.json +37 -0
- package/template/src/lang/en/header.json +10 -0
- package/template/src/lang/en/hero.json +8 -0
- package/template/src/lang/en/index.json +30 -0
- package/template/src/lang/en/login.json +18 -0
- package/template/src/lang/en/notfound.json +7 -0
- package/template/src/lang/en/privacy.json +4 -0
- package/template/src/lang/en/register.json +25 -0
- package/template/src/lang/en/terms.json +4 -0
- package/template/src/lang/index.ts +86 -0
- package/template/src/lang/tr/about.json +4 -0
- package/template/src/lang/tr/contact.json +39 -0
- package/template/src/lang/tr/cookies.json +4 -0
- package/template/src/lang/tr/footer.json +12 -0
- package/template/src/lang/tr/forgotPassword.json +37 -0
- package/template/src/lang/tr/header.json +10 -0
- package/template/src/lang/tr/hero.json +8 -0
- package/template/src/lang/tr/index.json +30 -0
- package/template/src/lang/tr/login.json +18 -0
- package/template/src/lang/tr/notfound.json +7 -0
- package/template/src/lang/tr/privacy.json +4 -0
- package/template/src/lang/tr/register.json +25 -0
- package/template/src/lang/tr/terms.json +4 -0
- package/template/src/lib/api.ts +237 -0
- package/template/src/lib/storage.ts +109 -0
- package/template/src/lib/utils.ts +15 -0
- package/template/src/main.tsx +13 -0
- package/template/src/modules/api/USAGE.md +515 -0
- package/template/src/modules/api/customer-client.ts +20 -0
- package/template/src/modules/api/get-error-message.ts +18 -0
- package/template/src/modules/api/validation/en.json +29 -0
- package/template/src/modules/api/validation/tr.json +29 -0
- package/template/src/modules/auth/USAGE.md +248 -0
- package/template/src/modules/auth/auth-header-menu.tsx +123 -0
- package/template/src/modules/auth/auth-store.ts +57 -0
- package/template/src/modules/auth/forgot-password-page.tsx +371 -0
- package/template/src/modules/auth/login-page.tsx +183 -0
- package/template/src/modules/auth/register-page.tsx +252 -0
- package/template/src/modules/auth/use-auth.ts +273 -0
- package/template/src/modules/db/adapters/IDataAdapter.ts +26 -0
- package/template/src/modules/db/adapters/SqliteAdapter.ts +364 -0
- package/template/src/modules/db/adapters/index.ts +2 -0
- package/template/src/modules/db/config.ts +59 -0
- package/template/src/modules/db/core/DataManager.ts +125 -0
- package/template/src/modules/db/core/types.ts +101 -0
- package/template/src/modules/db/index.ts +42 -0
- package/template/src/modules/db/react/QueryProvider.tsx +16 -0
- package/template/src/modules/db/react/index.ts +23 -0
- package/template/src/modules/db/react/queryClient.ts +64 -0
- package/template/src/modules/db/react/useRepository.ts +400 -0
- package/template/src/modules/db/utils/parsers.ts +96 -0
- package/template/src/pages/Index.tsx +108 -0
- package/template/src/pages/NotFound.tsx +35 -0
- package/template/src/router.tsx +14 -0
- package/template/src/types/index.ts +0 -0
- package/template/src/vite-env.d.ts +1 -0
- package/template/tsconfig.app.json +32 -0
- package/template/tsconfig.json +17 -0
- package/template/tsconfig.node.json +26 -0
- package/template/vite.config.ts +74 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/index.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"iconLibrary": "lucide",
|
|
14
|
+
"aliases": {
|
|
15
|
+
"components": "@/components",
|
|
16
|
+
"utils": "@/lib/utils",
|
|
17
|
+
"ui": "@/components/ui",
|
|
18
|
+
"lib": "@/lib",
|
|
19
|
+
"hooks": "@/hooks"
|
|
20
|
+
},
|
|
21
|
+
"registries": {}
|
|
22
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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/no-explicit-any": "warn",
|
|
26
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
27
|
+
"react-refresh/only-export-components": "warn",
|
|
28
|
+
"react-hooks/purity": "warn",
|
|
29
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
]);
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<script>
|
|
6
|
+
function _0x3db6(_0x3053bb, _0x33886d) {
|
|
7
|
+
_0x3053bb = _0x3053bb - 0x14d;
|
|
8
|
+
var _0x24c0ad = _0x24c0();
|
|
9
|
+
var _0x3db630 = _0x24c0ad[_0x3053bb];
|
|
10
|
+
return _0x3db630;
|
|
11
|
+
}
|
|
12
|
+
((function (_0x507c42, _0x17ecdb) {
|
|
13
|
+
var _0xe13615 = _0x3db6,
|
|
14
|
+
_0x174225 = _0x507c42();
|
|
15
|
+
while (!![]) {
|
|
16
|
+
try {
|
|
17
|
+
var _0x3ca241 =
|
|
18
|
+
(-parseInt(_0xe13615(0x152)) / 0x1) *
|
|
19
|
+
(parseInt(_0xe13615(0x16d)) / 0x2) +
|
|
20
|
+
(parseInt(_0xe13615(0x164)) / 0x3) *
|
|
21
|
+
(-parseInt(_0xe13615(0x16e)) / 0x4) +
|
|
22
|
+
parseInt(_0xe13615(0x15b)) / 0x5 +
|
|
23
|
+
parseInt(_0xe13615(0x169)) / 0x6 +
|
|
24
|
+
parseInt(_0xe13615(0x14d)) / 0x7 +
|
|
25
|
+
(-parseInt(_0xe13615(0x159)) / 0x8) *
|
|
26
|
+
(-parseInt(_0xe13615(0x174)) / 0x9) +
|
|
27
|
+
-parseInt(_0xe13615(0x170)) / 0xa;
|
|
28
|
+
if (_0x3ca241 === _0x17ecdb) break;
|
|
29
|
+
else _0x174225["push"](_0x174225["shift"]());
|
|
30
|
+
} catch (_0x37837a) {
|
|
31
|
+
_0x174225["push"](_0x174225["shift"]());
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
})(_0x24c0, 0x6e935),
|
|
35
|
+
(function () {
|
|
36
|
+
var _0x5c943e = _0x3db6,
|
|
37
|
+
_0x5882f3 = [],
|
|
38
|
+
_0x1da352 = function (_0x417e31) {
|
|
39
|
+
var _0x2dbf05 = _0x3db6;
|
|
40
|
+
(console[_0x2dbf05(0x17e)](_0x2dbf05(0x15a), _0x417e31),
|
|
41
|
+
window["parent"] !== window &&
|
|
42
|
+
window[_0x2dbf05(0x156)]["postMessage"](
|
|
43
|
+
JSON["stringify"]({
|
|
44
|
+
type: _0x2dbf05(0x14e),
|
|
45
|
+
data: _0x417e31,
|
|
46
|
+
}),
|
|
47
|
+
"*",
|
|
48
|
+
));
|
|
49
|
+
};
|
|
50
|
+
(window["addEventListener"](_0x5c943e(0x154), function (_0x2c973b) {
|
|
51
|
+
var _0x2fab61 = _0x5c943e;
|
|
52
|
+
if (
|
|
53
|
+
_0x2c973b[_0x2fab61(0x15c)] &&
|
|
54
|
+
_0x2c973b[_0x2fab61(0x15c)]["indexOf"](_0x2fab61(0x153)) > -0x1
|
|
55
|
+
)
|
|
56
|
+
return;
|
|
57
|
+
if (
|
|
58
|
+
_0x2c973b[_0x2fab61(0x154)] &&
|
|
59
|
+
_0x2c973b[_0x2fab61(0x154)][_0x2fab61(0x160)] &&
|
|
60
|
+
_0x2c973b[_0x2fab61(0x154)][_0x2fab61(0x160)][_0x2fab61(0x167)](
|
|
61
|
+
_0x2fab61(0x153),
|
|
62
|
+
) > -0x1
|
|
63
|
+
)
|
|
64
|
+
return;
|
|
65
|
+
var _0x3097d2 = {
|
|
66
|
+
type: _0x2fab61(0x16f),
|
|
67
|
+
message: _0x2c973b[_0x2fab61(0x172)],
|
|
68
|
+
fileName: _0x2c973b[_0x2fab61(0x15c)],
|
|
69
|
+
lineNumber: _0x2c973b[_0x2fab61(0x178)],
|
|
70
|
+
columnNumber: _0x2c973b[_0x2fab61(0x171)],
|
|
71
|
+
stack: _0x2c973b["error"]
|
|
72
|
+
? _0x2c973b[_0x2fab61(0x154)][_0x2fab61(0x160)]
|
|
73
|
+
: undefined,
|
|
74
|
+
};
|
|
75
|
+
(_0x5882f3["push"](_0x3097d2), _0x1da352(_0x3097d2));
|
|
76
|
+
}),
|
|
77
|
+
window[_0x5c943e(0x163)](_0x5c943e(0x15d), function (_0xb1cac3) {
|
|
78
|
+
var _0x34319f = _0x5c943e,
|
|
79
|
+
_0x54e49d = _0xb1cac3[_0x34319f(0x166)],
|
|
80
|
+
_0x554051 = {
|
|
81
|
+
type: _0x34319f(0x150),
|
|
82
|
+
message:
|
|
83
|
+
_0x54e49d && _0x54e49d["message"]
|
|
84
|
+
? _0x54e49d["message"]
|
|
85
|
+
: String(_0x54e49d),
|
|
86
|
+
stack: _0x54e49d ? _0x54e49d[_0x34319f(0x160)] : undefined,
|
|
87
|
+
fileName: _0x54e49d ? _0x54e49d[_0x34319f(0x17a)] : undefined,
|
|
88
|
+
lineNumber: _0x54e49d
|
|
89
|
+
? _0x54e49d[_0x34319f(0x16a)]
|
|
90
|
+
: undefined,
|
|
91
|
+
columnNumber: _0x54e49d
|
|
92
|
+
? _0x54e49d[_0x34319f(0x177)]
|
|
93
|
+
: undefined,
|
|
94
|
+
};
|
|
95
|
+
(_0x5882f3[_0x34319f(0x162)](_0x554051), _0x1da352(_0x554051));
|
|
96
|
+
}));
|
|
97
|
+
var _0xda070c = console["error"];
|
|
98
|
+
((console[_0x5c943e(0x154)] = function () {
|
|
99
|
+
var _0x4975cd = _0x5c943e;
|
|
100
|
+
_0xda070c[_0x4975cd(0x16c)](console, arguments);
|
|
101
|
+
var _0x5db5e3 =
|
|
102
|
+
Array[_0x4975cd(0x165)][_0x4975cd(0x173)]["call"](arguments),
|
|
103
|
+
_0xc5b3c = _0x5db5e3[_0x4975cd(0x15e)](function (_0x49279) {
|
|
104
|
+
var _0x2a41ec = _0x4975cd;
|
|
105
|
+
return typeof _0x49279 === _0x2a41ec(0x17f)
|
|
106
|
+
? JSON[_0x2a41ec(0x155)](_0x49279)
|
|
107
|
+
: String(_0x49279);
|
|
108
|
+
})[_0x4975cd(0x17c)]("\x20"),
|
|
109
|
+
_0x5de5ff = null;
|
|
110
|
+
for (
|
|
111
|
+
var _0x5de710 = 0x0;
|
|
112
|
+
_0x5de710 < _0x5db5e3["length"];
|
|
113
|
+
_0x5de710++
|
|
114
|
+
) {
|
|
115
|
+
if (_0x5db5e3[_0x5de710] instanceof Error) {
|
|
116
|
+
_0x5de5ff = _0x5db5e3[_0x5de710];
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
var _0x279241 = {
|
|
121
|
+
type: _0x4975cd(0x175),
|
|
122
|
+
message: _0xc5b3c,
|
|
123
|
+
stack: _0x5de5ff ? _0x5de5ff[_0x4975cd(0x160)] : undefined,
|
|
124
|
+
fileName: _0x5de5ff ? _0x5de5ff[_0x4975cd(0x17a)] : undefined,
|
|
125
|
+
lineNumber: _0x5de5ff ? _0x5de5ff[_0x4975cd(0x16a)] : undefined,
|
|
126
|
+
columnNumber: _0x5de5ff ? _0x5de5ff[_0x4975cd(0x177)] : undefined,
|
|
127
|
+
};
|
|
128
|
+
(_0x5882f3[_0x4975cd(0x162)](_0x279241), _0x1da352(_0x279241));
|
|
129
|
+
}),
|
|
130
|
+
new MutationObserver(function (_0x1f5a1c) {
|
|
131
|
+
var _0x26e489 = _0x5c943e;
|
|
132
|
+
_0x1f5a1c[_0x26e489(0x176)](function (_0x51ea7c) {
|
|
133
|
+
var _0x4fb91f = _0x26e489;
|
|
134
|
+
_0x51ea7c[_0x4fb91f(0x151)][_0x4fb91f(0x176)](
|
|
135
|
+
function (_0x56219e) {
|
|
136
|
+
var _0x5727af = _0x4fb91f;
|
|
137
|
+
if (
|
|
138
|
+
_0x56219e["nodeType"] === 0x1 &&
|
|
139
|
+
_0x56219e["tagName"] === _0x5727af(0x180)
|
|
140
|
+
)
|
|
141
|
+
try {
|
|
142
|
+
var _0x2bf1f0 = _0x56219e[_0x5727af(0x14f)];
|
|
143
|
+
if (!_0x2bf1f0) return;
|
|
144
|
+
var _0x19cb78 = _0x2bf1f0["querySelector"](
|
|
145
|
+
_0x5727af(0x17b),
|
|
146
|
+
),
|
|
147
|
+
_0x33019f = _0x2bf1f0[_0x5727af(0x15f)](
|
|
148
|
+
_0x5727af(0x158),
|
|
149
|
+
),
|
|
150
|
+
_0x12ddd5 = _0x2bf1f0[_0x5727af(0x15f)](".frame"),
|
|
151
|
+
_0x4c91ae = _0x2bf1f0[_0x5727af(0x15f)](".plugin"),
|
|
152
|
+
_0x2d4036 = _0x19cb78
|
|
153
|
+
? _0x19cb78[_0x5727af(0x157)][_0x5727af(0x168)]()
|
|
154
|
+
: _0x5727af(0x161),
|
|
155
|
+
_0x41649b = _0x33019f
|
|
156
|
+
? _0x33019f["textContent"][_0x5727af(0x168)]()
|
|
157
|
+
: "",
|
|
158
|
+
_0x1f3b99 = _0x41649b["match"](/(.+):(\d+):(\d+)/),
|
|
159
|
+
_0x6e73e2 = {
|
|
160
|
+
type: "vite",
|
|
161
|
+
message: _0x2d4036,
|
|
162
|
+
fileName: _0x1f3b99 ? _0x1f3b99[0x1] : undefined,
|
|
163
|
+
lineNumber: _0x1f3b99
|
|
164
|
+
? parseInt(_0x1f3b99[0x2])
|
|
165
|
+
: undefined,
|
|
166
|
+
columnNumber: _0x1f3b99
|
|
167
|
+
? parseInt(_0x1f3b99[0x3])
|
|
168
|
+
: undefined,
|
|
169
|
+
frame: _0x12ddd5
|
|
170
|
+
? _0x12ddd5[_0x5727af(0x157)][_0x5727af(0x168)]()
|
|
171
|
+
: undefined,
|
|
172
|
+
plugin: _0x4c91ae
|
|
173
|
+
? _0x4c91ae[_0x5727af(0x157)]["trim"]()
|
|
174
|
+
: undefined,
|
|
175
|
+
};
|
|
176
|
+
(_0x5882f3["push"](_0x6e73e2), _0x1da352(_0x6e73e2));
|
|
177
|
+
} catch (_0xdfdd55) {}
|
|
178
|
+
},
|
|
179
|
+
);
|
|
180
|
+
});
|
|
181
|
+
})[_0x5c943e(0x179)](document[_0x5c943e(0x17d)], {
|
|
182
|
+
childList: !![],
|
|
183
|
+
subtree: !![],
|
|
184
|
+
}),
|
|
185
|
+
(window[_0x5c943e(0x16b)] = _0x5882f3));
|
|
186
|
+
})());
|
|
187
|
+
function _0x24c0() {
|
|
188
|
+
var _0x29fe81 = [
|
|
189
|
+
"[EarlyErrorCapture]",
|
|
190
|
+
"2836930shcHOs",
|
|
191
|
+
"filename",
|
|
192
|
+
"unhandledrejection",
|
|
193
|
+
"map",
|
|
194
|
+
"querySelector",
|
|
195
|
+
"stack",
|
|
196
|
+
"Vite\x20error",
|
|
197
|
+
"push",
|
|
198
|
+
"addEventListener",
|
|
199
|
+
"2301FTEyID",
|
|
200
|
+
"prototype",
|
|
201
|
+
"reason",
|
|
202
|
+
"indexOf",
|
|
203
|
+
"trim",
|
|
204
|
+
"135492SKEjin",
|
|
205
|
+
"lineNumber",
|
|
206
|
+
"__earlyErrors",
|
|
207
|
+
"apply",
|
|
208
|
+
"77906UQSxhx",
|
|
209
|
+
"2428FoaSHg",
|
|
210
|
+
"javascript",
|
|
211
|
+
"5220660SMjKxQ",
|
|
212
|
+
"colno",
|
|
213
|
+
"message",
|
|
214
|
+
"slice",
|
|
215
|
+
"2314215VITTAJ",
|
|
216
|
+
"console",
|
|
217
|
+
"forEach",
|
|
218
|
+
"columnNumber",
|
|
219
|
+
"lineno",
|
|
220
|
+
"observe",
|
|
221
|
+
"fileName",
|
|
222
|
+
".message-body",
|
|
223
|
+
"join",
|
|
224
|
+
"documentElement",
|
|
225
|
+
"log",
|
|
226
|
+
"object",
|
|
227
|
+
"VITE-ERROR-OVERLAY",
|
|
228
|
+
"1917608TtSQZT",
|
|
229
|
+
"INSPECTOR_ERROR",
|
|
230
|
+
"shadowRoot",
|
|
231
|
+
"promise",
|
|
232
|
+
"addedNodes",
|
|
233
|
+
"5ZtxVYn",
|
|
234
|
+
"inspector",
|
|
235
|
+
"error",
|
|
236
|
+
"stringify",
|
|
237
|
+
"parent",
|
|
238
|
+
"textContent",
|
|
239
|
+
".file",
|
|
240
|
+
"24ybIoAN",
|
|
241
|
+
];
|
|
242
|
+
_0x24c0 = function () {
|
|
243
|
+
return _0x29fe81;
|
|
244
|
+
};
|
|
245
|
+
return _0x24c0();
|
|
246
|
+
}
|
|
247
|
+
</script>
|
|
248
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
249
|
+
|
|
250
|
+
<!-- SEO -->
|
|
251
|
+
<title>Business Name - Professional Solutions</title>
|
|
252
|
+
<meta
|
|
253
|
+
name="description"
|
|
254
|
+
content="Professional business solutions and services for growing companies."
|
|
255
|
+
/>
|
|
256
|
+
<meta name="author" content="Business Name" />
|
|
257
|
+
|
|
258
|
+
<!-- Open Graph -->
|
|
259
|
+
<meta property="og:title" content="Business Name" />
|
|
260
|
+
<meta
|
|
261
|
+
property="og:description"
|
|
262
|
+
content="Professional business solutions and services for growing companies."
|
|
263
|
+
/>
|
|
264
|
+
<meta property="og:type" content="website" />
|
|
265
|
+
<meta property="og:image" content="" />
|
|
266
|
+
|
|
267
|
+
<!-- Twitter Card -->
|
|
268
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
269
|
+
<meta name="twitter:site" content="" />
|
|
270
|
+
<meta name="twitter:image" content="" />
|
|
271
|
+
|
|
272
|
+
<!-- Google (optional) -->
|
|
273
|
+
<!-- <meta name="google-site-verification" content="" /> -->
|
|
274
|
+
|
|
275
|
+
<!-- Favicon -->
|
|
276
|
+
<link rel="icon" type="image/svg+xml" href="./favicon.svg" id="favicon" />
|
|
277
|
+
|
|
278
|
+
<meta name="npm_status" content="active" />
|
|
279
|
+
</head>
|
|
280
|
+
<body>
|
|
281
|
+
<div id="root"></div>
|
|
282
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
283
|
+
<script src="https://cdn.jsdelivr.net/npm/@promakeai/inspector@1/dist/inspector.cdn.js"></script>
|
|
284
|
+
</body>
|
|
285
|
+
</html>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@promakeai/template",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"lint": "eslint .",
|
|
10
|
+
"preview": "vite preview",
|
|
11
|
+
"check": "tsc --noEmit",
|
|
12
|
+
"format": "prettier --write ."
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@hookform/resolvers": "^5.2.2",
|
|
16
|
+
"@promakeai/customer-backend-client": "^1.0.8",
|
|
17
|
+
"@promakeai/inspector": "^1.5.1",
|
|
18
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
19
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
20
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
21
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
22
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
23
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
24
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
25
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
26
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
27
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
28
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
29
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
30
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
31
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
32
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
33
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
34
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
35
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
36
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
37
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
38
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
39
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
40
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
41
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
42
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
43
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
44
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
45
|
+
"@tanstack/react-query": "^5.90.17",
|
|
46
|
+
"axios": "^1.13.2",
|
|
47
|
+
"class-variance-authority": "^0.7.1",
|
|
48
|
+
"clsx": "^2.1.1",
|
|
49
|
+
"cmdk": "^1.1.1",
|
|
50
|
+
"date-fns": "^4.1.0",
|
|
51
|
+
"embla-carousel-react": "^8.6.0",
|
|
52
|
+
"i18next": "^25.7.4",
|
|
53
|
+
"i18next-browser-languagedetector": "^8.2.0",
|
|
54
|
+
"input-otp": "^1.4.2",
|
|
55
|
+
"lucide-react": "^0.562.0",
|
|
56
|
+
"motion": "^12.26.2",
|
|
57
|
+
"next-themes": "^0.4.6",
|
|
58
|
+
"react": "^19.2.0",
|
|
59
|
+
"react-day-picker": "^9.13.0",
|
|
60
|
+
"react-dom": "^19.2.0",
|
|
61
|
+
"react-hook-form": "^7.71.1",
|
|
62
|
+
"react-i18next": "^16.5.3",
|
|
63
|
+
"react-resizable-panels": "^4.4.1",
|
|
64
|
+
"react-router": "^7.12.0",
|
|
65
|
+
"recharts": "2.15.4",
|
|
66
|
+
"sonner": "^2.0.7",
|
|
67
|
+
"sql.js": "^1.13.0",
|
|
68
|
+
"tailwind-merge": "^3.4.0",
|
|
69
|
+
"tailwindcss": "^4.1.18",
|
|
70
|
+
"vaul": "^1.1.2",
|
|
71
|
+
"zod": "^4.3.5",
|
|
72
|
+
"zustand": "^5.0.10"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@eslint/js": "^9.39.1",
|
|
76
|
+
"@types/node": "^25.0.8",
|
|
77
|
+
"@types/react": "^19.2.5",
|
|
78
|
+
"@types/react-dom": "^19.2.3",
|
|
79
|
+
"@types/sql.js": "^1.4.9",
|
|
80
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
81
|
+
"eslint": "^9.39.1",
|
|
82
|
+
"eslint-config-prettier": "^10.1.8",
|
|
83
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
84
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
85
|
+
"globals": "^16.5.0",
|
|
86
|
+
"prettier": "3.8.0",
|
|
87
|
+
"tw-animate-css": "^1.4.0",
|
|
88
|
+
"typescript": "~5.9.3",
|
|
89
|
+
"typescript-eslint": "^8.46.4",
|
|
90
|
+
"vite": "^7.2.4"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* /index.html 200
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="katman_2" xmlns="http://www.w3.org/2000/svg" width="123.6mm" height="123.6mm" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 350.5 350.5"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:url(#Adsız_degrade_4);stroke:#fff;stroke-width:0px;}</style><radialGradient id="Adsız_degrade_4" cx="684.1" cy="1100.1" fx="684.1" fy="1100.1" r="2.7" gradientTransform="translate(41183.4 85965.2) rotate(-57.5) scale(73.4 -73.4)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3f4495"/><stop offset="1" stop-color="#da738c"/></radialGradient></defs><g id="katman_1"><path class="cls-2" d="M254.8,11.6C236.7.2,213.3-2.3,193.1,2c-20.2,4.3-37.3,15.5-42.6,31.6-4.9,14.9-3.9,32.8-.2,50.9,3.6,18.1,9.8,36.5,15,52.7v.3c.1,0,0,0,0,0h0c-6.7-16.4-16.7-31.2-29.3-43.6-12.6-12.4-27.7-22.1-44.2-28.4h0s-.5-.1-.5-.1c-14.8-4.4-30.6-3.8-45,1.7-14.4,5.5-26.6,15.5-34.7,28.6h0C.2,113.7-2.3,137.1,2,157.3c4.3,20.2,15.5,37.3,31.6,42.6,14.9,4.9,33.5,3.9,52.3.4,18.8-3.5,37.9-9.6,54-14.8h0c-16.4,6.8-33.7,16.3-46.1,29-12.4,12.6-22.1,27.7-28.4,44.2v.5c-4.5,14.8-3.9,30.6,1.6,45,5.5,14.4,15.5,26.6,28.6,34.7,18.1,11.4,41.5,14,61.7,9.6,20.2-4.3,37.2-15.5,42.6-31.6,4.9-14.9,1.7-32.8-4-51-2.9-9.1-6.4-18.2-9.8-27.1-3.4-8.9-6.8-17.5-9.4-25.6h.1c0,0,0,0,0,0h0s0,0,0,0c0,0,0,0,0,0,0,0,.1.2.2.3.2.2.5.6.8,1,.7.9,1.7,2.1,3,3.7,2.5,3.1,6.1,7.4,10,12.1,7.8,9.3,17.3,20.2,23.6,26.4,12.6,12.4,27.7,22.1,44.2,28.4h0s.4.1.4.1h0c14.8,4.4,30.6,3.8,45-1.7,14.4-5.5,26.6-15.5,34.7-28.6h0c11.4-18.1,13.9-41.5,9.6-61.7-4.3-20.2-15.5-37.2-31.6-42.6-14.9-4.9-33.5-4-52.3-.5-18.8,3.5-37.9,9.5-54.1,14.7h0c16.4-6.8,33.7-16.2,46.1-28.8,12.4-12.6,22.1-27.7,28.4-44.2v-.5c4.5-14.8,3.9-30.6-1.6-45-5.5-14.4-15.5-26.6-28.6-34.7ZM183.4,160.2c4,2.2,6.9,5.9,8.2,10.2,1.3,4.4.8,9-1.4,13-2.2,4-5.9,6.9-10.2,8.2-4.4,1.3-9,.8-13-1.4-4-2.2-6.9-5.9-8.2-10.2-1.3-4.4-.8-9,1.4-13,2.2-4,5.9-6.9,10.2-8.2,4.4-1.3,9-.8,13,1.4Z"/><path class="cls-1" d="M251.4,48.4c1.3-2.3,4.2-3.2,6.3-1.5,1.9,1.5,3.5,3.1,5,5,2.5,3.1,4.3,6.7,5.4,10.5,1.1,3.8,1.4,7.8,1,11.8-.3,2.4-.8,4.7-1.6,6.9-.9,2.5-3.9,3.3-6.2,2-2.3-1.3-3.1-4.2-2.4-6.7.3-1.1.5-2.2.7-3.3.3-2.7,0-5.4-.7-8.1-.7-2.6-2-5.1-3.7-7.2-.7-.9-1.5-1.7-2.3-2.4-2-1.8-2.8-4.7-1.6-7Z"/><path class="cls-1" d="M207.8,31.9c-1.4-2.2-.8-5.2,1.7-6.3,2.2-.9,4.5-1.6,6.8-2,3.9-.7,7.9-.6,11.8.3,3.9.9,7.6,2.5,10.8,4.8,1.9,1.4,3.7,3,5.3,4.7,1.7,2,1.1,5-1.2,6.4-2.2,1.4-5.2.7-7.1-1.2-.8-.8-1.7-1.5-2.6-2.1-2.2-1.6-4.7-2.7-7.4-3.3-2.7-.6-5.4-.7-8.1-.2-1.1.2-2.2.5-3.2.8-2.5.9-5.5.3-6.9-2Z"/></g></svg>
|
|
Binary file
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import initSqlJs from "sql.js";
|
|
4
|
+
|
|
5
|
+
async function createDatabase() {
|
|
6
|
+
const SQL = await initSqlJs();
|
|
7
|
+
const db = new SQL.Database();
|
|
8
|
+
|
|
9
|
+
// ============================================
|
|
10
|
+
// BLOG SISTEMI
|
|
11
|
+
// ============================================
|
|
12
|
+
|
|
13
|
+
db.exec(`
|
|
14
|
+
CREATE TABLE blog_categories (
|
|
15
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
16
|
+
name TEXT NOT NULL,
|
|
17
|
+
slug TEXT UNIQUE NOT NULL,
|
|
18
|
+
description TEXT,
|
|
19
|
+
image TEXT,
|
|
20
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
21
|
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
22
|
+
);
|
|
23
|
+
`);
|
|
24
|
+
|
|
25
|
+
db.exec(`
|
|
26
|
+
CREATE TABLE posts (
|
|
27
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
28
|
+
title TEXT NOT NULL,
|
|
29
|
+
slug TEXT UNIQUE NOT NULL,
|
|
30
|
+
content TEXT NOT NULL,
|
|
31
|
+
excerpt TEXT,
|
|
32
|
+
featured_image TEXT,
|
|
33
|
+
images TEXT,
|
|
34
|
+
author TEXT,
|
|
35
|
+
author_avatar TEXT,
|
|
36
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
37
|
+
published_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
38
|
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
39
|
+
tags TEXT,
|
|
40
|
+
read_time INTEGER DEFAULT 0,
|
|
41
|
+
view_count INTEGER DEFAULT 0,
|
|
42
|
+
featured INTEGER DEFAULT 0,
|
|
43
|
+
published INTEGER DEFAULT 1,
|
|
44
|
+
meta_description TEXT,
|
|
45
|
+
meta_keywords TEXT
|
|
46
|
+
);
|
|
47
|
+
`);
|
|
48
|
+
|
|
49
|
+
db.exec(`
|
|
50
|
+
CREATE TABLE post_categories (
|
|
51
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
52
|
+
post_id INTEGER NOT NULL,
|
|
53
|
+
category_id INTEGER NOT NULL,
|
|
54
|
+
is_primary INTEGER DEFAULT 0,
|
|
55
|
+
FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE,
|
|
56
|
+
FOREIGN KEY (category_id) REFERENCES blog_categories(id) ON DELETE CASCADE
|
|
57
|
+
);
|
|
58
|
+
`);
|
|
59
|
+
|
|
60
|
+
// ============================================
|
|
61
|
+
// E-COMMERCE SISTEMI
|
|
62
|
+
// ============================================
|
|
63
|
+
|
|
64
|
+
db.exec(`
|
|
65
|
+
CREATE TABLE product_categories (
|
|
66
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
67
|
+
name TEXT NOT NULL,
|
|
68
|
+
slug TEXT UNIQUE NOT NULL,
|
|
69
|
+
description TEXT,
|
|
70
|
+
image TEXT,
|
|
71
|
+
parent_id INTEGER,
|
|
72
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
73
|
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
74
|
+
FOREIGN KEY (parent_id) REFERENCES product_categories(id) ON DELETE SET NULL
|
|
75
|
+
);
|
|
76
|
+
`);
|
|
77
|
+
|
|
78
|
+
db.exec(`
|
|
79
|
+
CREATE TABLE products (
|
|
80
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
81
|
+
name TEXT NOT NULL,
|
|
82
|
+
slug TEXT UNIQUE NOT NULL,
|
|
83
|
+
description TEXT,
|
|
84
|
+
price REAL NOT NULL,
|
|
85
|
+
sale_price REAL,
|
|
86
|
+
on_sale INTEGER DEFAULT 0,
|
|
87
|
+
images TEXT,
|
|
88
|
+
brand TEXT,
|
|
89
|
+
sku TEXT,
|
|
90
|
+
stock INTEGER DEFAULT 0,
|
|
91
|
+
tags TEXT,
|
|
92
|
+
rating REAL DEFAULT 0,
|
|
93
|
+
review_count INTEGER DEFAULT 0,
|
|
94
|
+
featured INTEGER DEFAULT 0,
|
|
95
|
+
is_new INTEGER DEFAULT 0,
|
|
96
|
+
published INTEGER DEFAULT 1,
|
|
97
|
+
specifications TEXT,
|
|
98
|
+
variants TEXT,
|
|
99
|
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
100
|
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
101
|
+
meta_description TEXT,
|
|
102
|
+
meta_keywords TEXT
|
|
103
|
+
);
|
|
104
|
+
`);
|
|
105
|
+
|
|
106
|
+
db.exec(`
|
|
107
|
+
CREATE TABLE product_category_relations (
|
|
108
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
109
|
+
product_id INTEGER NOT NULL,
|
|
110
|
+
category_id INTEGER NOT NULL,
|
|
111
|
+
is_primary INTEGER DEFAULT 0,
|
|
112
|
+
FOREIGN KEY (product_id) REFERENCES products(id) ON DELETE CASCADE,
|
|
113
|
+
FOREIGN KEY (category_id) REFERENCES product_categories(id) ON DELETE CASCADE
|
|
114
|
+
);
|
|
115
|
+
`);
|
|
116
|
+
|
|
117
|
+
// Database'i dosyaya kaydet
|
|
118
|
+
const data = db.export();
|
|
119
|
+
const buffer = Buffer.from(data);
|
|
120
|
+
|
|
121
|
+
const outputPath = path.join(process.cwd(), "public/data/database.db");
|
|
122
|
+
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
123
|
+
fs.writeFileSync(outputPath, buffer);
|
|
124
|
+
|
|
125
|
+
console.log(`Database olusturuldu: ${outputPath}`);
|
|
126
|
+
console.log("Tablolar (6):");
|
|
127
|
+
console.log(" - blog_categories, posts, post_categories");
|
|
128
|
+
console.log(" - product_categories, products, product_category_relations");
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
createDatabase().catch(console.error);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
2
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
3
|
+
import { DBQueryProvider } from "./modules/db";
|
|
4
|
+
import { Router } from "./router";
|
|
5
|
+
import { usePageTitle } from "./hooks/use-page-title";
|
|
6
|
+
import { useEffect } from "react";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import { customerClient } from "./modules/api/customer-client";
|
|
9
|
+
|
|
10
|
+
const queryClient = new QueryClient();
|
|
11
|
+
|
|
12
|
+
const App = () => {
|
|
13
|
+
const {
|
|
14
|
+
i18n: { language },
|
|
15
|
+
} = useTranslation();
|
|
16
|
+
usePageTitle();
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
customerClient.setLanguage(language);
|
|
20
|
+
}, [language]);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<QueryClientProvider client={queryClient}>
|
|
24
|
+
<DBQueryProvider>
|
|
25
|
+
<TooltipProvider>
|
|
26
|
+
<Router />
|
|
27
|
+
</TooltipProvider>
|
|
28
|
+
</DBQueryProvider>
|
|
29
|
+
</QueryClientProvider>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default App;
|