Skip to content

Commit 782d070

Browse files
bagisto headless commerce v3 release
1 parent cecb785 commit 782d070

262 files changed

Lines changed: 17047 additions & 110 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

@types/graphql.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare module '*.graphql' {
2+
import { DocumentNode } from 'graphql';
3+
const Schema: DocumentNode;
4+
export = Schema;
5+
}

@types/next-auth.d.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { DefaultSession } from 'next-auth';
2+
3+
declare module 'next-auth' {
4+
/**
5+
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
6+
*/
7+
interface Session {
8+
user: {
9+
id: string;
10+
firstname?: string;
11+
lastname?: string;
12+
token?: string;
13+
accessToken?: string;
14+
apiToken?: string;
15+
role?: string;
16+
} & DefaultSession['user'];
17+
}
18+
19+
interface User {
20+
id: string;
21+
accessToken?: string;
22+
apiToken?: string;
23+
role?: string;
24+
tokenType?: string;
25+
expiresIn?: number;
26+
}
27+
}
28+
29+
declare module 'next-auth/jwt' {
30+
interface JWT {
31+
accessToken?: string;
32+
apiToken?: string;
33+
role?: string;
34+
id?: string;
35+
}
36+
}

eslint.config.mjs

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
1-
import { defineConfig } from "eslint/config";
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import nextVitals from "eslint-config-next/core-web-vitals";
3+
import nextTs from "eslint-config-next/typescript";
24

3-
export default defineConfig([
5+
const eslintConfig = defineConfig([
6+
...nextVitals,
7+
...nextTs,
48
{
5-
plugins: ["unicorn", "react", "jsx-a11y", "unused-imports"],
6-
extends: ["next", "prettier"],
7-
settings: {
8-
react: {
9-
version: "detect",
10-
},
11-
},
9+
files: ["src/**/*.{js,jsx,ts,tsx}"],
1210
rules: {
13-
"no-unused-vars": [
11+
"@typescript-eslint/no-unused-vars": [
1412
"error",
1513
{
16-
args: "after-used",
17-
caughtErrors: "none",
18-
ignoreRestSiblings: true,
19-
vars: "all",
2014
argsIgnorePattern: "^_",
2115
varsIgnorePattern: "^_",
16+
caughtErrorsIgnorePattern: "^_",
2217
},
2318
],
24-
"prefer-const": "error",
25-
"react-hooks/exhaustive-deps": "error",
26-
"unicorn/filename-case": [
27-
"error",
28-
{
29-
case: "kebabCase",
30-
},
31-
],
19+
"no-unused-vars": "off",
20+
"no-console": ["warn", { allow: ["warn", "error"] }],
21+
"@typescript-eslint/no-explicit-any": "warn",
22+
"@typescript-eslint/no-non-null-assertion": "warn",
23+
"react-hooks/exhaustive-deps": "warn",
24+
"react/no-unescaped-entities": "warn",
25+
"@typescript-eslint/no-empty-interface": "warn",
26+
"prefer-const": "warn",
27+
"no-var": "warn",
3228
},
3329
},
30+
globalIgnores([
31+
".next/**",
32+
"out/**",
33+
"build/**",
34+
"next-env.d.ts",
35+
]),
3436
]);
37+
38+
export default eslintConfig;

hero.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// hero.ts
2+
import { heroui } from "@heroui/react";
3+
// or import from theme package if you are using individual packages.
4+
// import { heroui } from "@heroui/theme";
5+
export default heroui();

next.config.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { configHeader } from '@/utils/constants';
2+
import type { NextConfig } from "next";
3+
4+
const nextConfig: NextConfig = {
5+
reactStrictMode: true,
6+
typescript: {
7+
ignoreBuildErrors: false,
8+
},
9+
images: {
10+
unoptimized: true,
11+
remotePatterns: [],
12+
},
13+
async headers() {
14+
return configHeader;
15+
},
16+
compress: true,
17+
experimental: {
18+
optimizePackageImports: ["lodash", "date-fns"],
19+
serverActions: {
20+
bodySizeLimit: "2mb",
21+
},
22+
},
23+
};
24+
25+
export default nextConfig;

package.json

Lines changed: 33 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,44 @@
11
{
2-
"name": "next-app-template",
2+
"name": "nextjs-commerce-updated",
3+
"version": "0.1.0",
34
"private": true,
4-
"packageManager": "pnpm@9.0.5",
5-
"version": "2.3.0",
6-
"engines": {
7-
"node": ">=18",
8-
"pnpm": ">=8"
9-
},
105
"scripts": {
11-
"dev": "next dev --turbopack",
12-
"build": "next build --turbopack",
6+
"dev": "next dev",
7+
"build": "NODE_ENV=production eslint . && next build",
138
"start": "next start",
14-
"lint": "eslint --fix",
15-
"test": "pnpm lint && pnpm prettier:check"
9+
"lint": "eslint .",
10+
"lint:fix": "next lint --fix",
11+
"package-version": "npx npm-check-updates"
1612
},
1713
"dependencies": {
14+
"@apollo/client": "^3.11.10",
1815
"@heroicons/react": "^2.2.0",
19-
"@heroui/accordion": "^2.2.21",
20-
"@heroui/alert": "^2.2.24",
21-
"@heroui/avatar": "^2.2.20",
22-
"@heroui/button": "2.2.24",
23-
"@heroui/card": "^2.2.23",
24-
"@heroui/checkbox": "^2.3.24",
25-
"@heroui/chip": "^2.2.20",
26-
"@heroui/code": "2.2.18",
27-
"@heroui/drawer": "^2.2.21",
28-
"@heroui/input": "2.4.25",
29-
"@heroui/kbd": "2.2.19",
30-
"@heroui/link": "2.2.21",
31-
"@heroui/listbox": "2.3.23",
32-
"@heroui/navbar": "2.2.22",
33-
"@heroui/popover": "^2.3.24",
34-
"@heroui/react": "^2.8.2",
35-
"@heroui/scroll-shadow": "^2.3.16",
36-
"@heroui/select": "^2.4.25",
37-
"@heroui/snippet": "2.2.25",
38-
"@heroui/switch": "2.2.22",
39-
"@heroui/system": "2.4.20",
40-
"@heroui/theme": "2.4.20",
41-
"@heroui/tooltip": "^2.2.22",
42-
"@react-aria/ssr": "3.9.10",
43-
"@react-aria/visually-hidden": "3.8.26",
44-
"@reduxjs/toolkit": "^2.8.2",
45-
"@tanstack/react-query": "^5.85.5",
46-
"clsx": "2.1.1",
47-
"framer-motion": "^12.23.12",
48-
"graphql": "^16.11.0",
49-
"graphql-request": "^7.2.0",
50-
"intl-messageformat": "10.7.16",
51-
"lru-cache": "^11.1.0",
52-
"next": "15.3.1",
53-
"next-auth": "^4.24.11",
54-
"next-themes": "0.4.6",
55-
"react": "18.3.1",
56-
"react-dom": "18.3.1",
57-
"react-hook-form": "^7.62.0",
58-
"react-redux": "^9.2.0",
59-
"tailwind-scrollbar": "^4.0.2"
16+
"@heroui/accordion": "^2.2.25",
17+
"@heroui/drawer": "^2.2.25",
18+
"@heroui/react": "^2.8.6",
19+
"@heroui/select": "^2.4.29",
20+
"@reduxjs/toolkit": "^2.10.1",
21+
"@tanstack/react-query": "^5.90.10",
22+
"clsx": "^2.1.1",
23+
"framer-motion": "^12.23.24",
24+
"graphql": "^16.12.0",
25+
"next": "16.0.10",
26+
"next-auth": "^4.24.13",
27+
"next-themes": "^0.4.6",
28+
"react": "19.2.0",
29+
"react-dom": "19.2.0",
30+
"react-hook-form": "^7.66.1",
31+
"react-redux": "^9.2.0"
6032
},
6133
"devDependencies": {
62-
"@eslint/compat": "^1.3.2",
63-
"@eslint/eslintrc": "^3.3.1",
64-
"@eslint/js": "^9.33.0",
65-
"@next/eslint-plugin-next": "15.3.4",
66-
"@react-types/shared": "3.30.0",
67-
"@tailwindcss/postcss": "4.1.11",
68-
"@types/node": "20.5.7",
69-
"@types/react": "18.3.3",
70-
"@types/react-dom": "18.3.0",
71-
"@typescript-eslint/eslint-plugin": "8.34.1",
72-
"@typescript-eslint/parser": "8.34.1",
73-
"eslint": "^9.34.0",
74-
"eslint-config-next": "15.3.4",
75-
"eslint-config-prettier": "9.1.0",
76-
"eslint-plugin-import": "2.31.0",
77-
"eslint-plugin-jsx-a11y": "6.10.2",
78-
"eslint-plugin-node": "11.1.0",
79-
"eslint-plugin-prettier": "5.2.1",
80-
"eslint-plugin-react": "7.37.5",
81-
"eslint-plugin-react-hooks": "5.2.0",
82-
"eslint-plugin-unicorn": "^60.0.0",
83-
"eslint-plugin-unused-imports": "4.1.4",
84-
"globals": "16.0.0",
85-
"postcss": "8.5.6",
86-
"prettier": "3.5.3",
87-
"tailwind-variants": "2.0.1",
88-
"tailwindcss": "4.1.11",
89-
"typescript": "5.6.3"
34+
"@tailwindcss/postcss": "^4",
35+
"@types/node": "^20",
36+
"@types/react": "^19",
37+
"@types/react-dom": "^19",
38+
"eslint": "^9",
39+
"eslint-config-next": "16.0.10",
40+
"tailwindcss": "^4",
41+
"ts-node": "^10.9.2",
42+
"typescript": "^5"
9043
}
9144
}

postcss.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const config = {
2+
plugins: {
3+
"@tailwindcss/postcss": {},
4+
},
5+
};
6+
7+
export default config;

public/favicon.ico

-25.3 KB
Binary file not shown.

public/next.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/vercel.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)