diff --git a/.eslintrc.json b/.eslintrc.json
index 37224185..a0d6fd91 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,3 +1,10 @@
{
- "extends": ["next/core-web-vitals", "next/typescript"]
+ "extends": [
+ "next/core-web-vitals",
+ "plugin:tailwindcss/recommended"
+ ],
+ "rules": {
+ "react/no-unescaped-entities": "off",
+ "react-hooks/rules-of-hooks": "off"
+ }
}
diff --git a/app/(customer)/dashboard/home/page.tsx b/app/(customer)/dashboard/home/page.tsx
new file mode 100644
index 00000000..f4e4d5e9
--- /dev/null
+++ b/app/(customer)/dashboard/home/page.tsx
@@ -0,0 +1,11 @@
+import {PageParams} from "@/types/next";
+
+export default async function RoutePage(props: PageParams<{}>) {
+
+ return(
+
+
+
Home
+
+ )
+}
\ No newline at end of file
diff --git a/app/(customer)/dashboard/layout.tsx b/app/(customer)/dashboard/layout.tsx
new file mode 100644
index 00000000..9ef39d4a
--- /dev/null
+++ b/app/(customer)/dashboard/layout.tsx
@@ -0,0 +1,49 @@
+import {SidebarInset, SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar"
+import {AppSidebar} from "@/components/wrappers/SideBar/app-sidebar";
+import {
+ Breadcrumb,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbList, BreadcrumbPage,
+ BreadcrumbSeparator
+} from "@/components/ui/breadcrumb";
+import {Separator} from "@/components/ui/separator";
+
+export default function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+
+ {/**/}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* Building Your Application*/}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* Data Fetching*/}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/*
*/}
+ {/**/}
+
+
+ {children}
+
+
+ )
+}
\ No newline at end of file
diff --git a/app/(customer)/dashboard/page.tsx b/app/(customer)/dashboard/page.tsx
new file mode 100644
index 00000000..8992e81c
--- /dev/null
+++ b/app/(customer)/dashboard/page.tsx
@@ -0,0 +1,13 @@
+import {PageParams} from "@/types/next";
+import {Button} from "@/components/ui/button";
+
+export default async function RoutePage(props: PageParams<{}>) {
+
+ return(
+
+
+
Ok
+
+
+ )
+}
\ No newline at end of file
diff --git a/app/(landing)/home/page.tsx b/app/(landing)/home/page.tsx
new file mode 100644
index 00000000..febe7fe8
--- /dev/null
+++ b/app/(landing)/home/page.tsx
@@ -0,0 +1,9 @@
+import Image from "next/image";
+
+export default function Home() {
+ return (
+
+
Text
+
+ );
+}
diff --git a/app/(landing)/page.tsx b/app/(landing)/page.tsx
new file mode 100644
index 00000000..756a908f
--- /dev/null
+++ b/app/(landing)/page.tsx
@@ -0,0 +1,14 @@
+import Home from "./home/page";
+import {redirect} from "next/navigation";
+
+export default async function Index() {
+
+ const user = true
+ if (user) {
+ redirect("/dashboard")
+ }
+
+ return (
+
+ );
+}
diff --git a/app/globals.css b/app/globals.css
index ac684423..4dc4ce04 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -84,6 +84,10 @@ body {
}
}
+
+
+
+
@layer base {
* {
@apply border-border;
diff --git a/app/layout.tsx b/app/layout.tsx
index a36cde01..eeeccb6c 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,35 +1,30 @@
-import type { Metadata } from "next";
-import localFont from "next/font/local";
+import type {Metadata} from "next";
import "./globals.css";
+import {Providers} from "./providers";
+import {cn} from "@/lib/utils";
+import {Inter} from "next/font/google";
-const geistSans = localFont({
- src: "./fonts/GeistVF.woff",
- variable: "--font-geist-sans",
- weight: "100 900",
-});
-const geistMono = localFont({
- src: "./fonts/GeistMonoVF.woff",
- variable: "--font-geist-mono",
- weight: "100 900",
-});
+
+const inter = Inter({subsets: ["latin"]});
export const metadata: Metadata = {
- title: "Create Next App",
- description: "Generated by create next app",
+ title: "Create Next App",
+ description: "Generated by create next app",
};
export default function RootLayout({
- children,
-}: Readonly<{
- children: React.ReactNode;
+ children,
+ }: Readonly<{
+ children: React.ReactNode;
}>) {
- return (
-
-
- {children}
-
-
- );
+ return (
+
+
+
+
+ {children}
+
+
+
+ );
}
diff --git a/app/page.tsx b/app/page.tsx
deleted file mode 100644
index 433c8aa7..00000000
--- a/app/page.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-import Image from "next/image";
-
-export default function Home() {
- return (
-
-
-
-
- -
- Get started by editing{" "}
-
- app/page.tsx
-
- .
-
- - Save and see your changes instantly.
-
-
-
-
-
-
- );
-}
diff --git a/app/providers.tsx b/app/providers.tsx
new file mode 100644
index 00000000..1c9a748a
--- /dev/null
+++ b/app/providers.tsx
@@ -0,0 +1,31 @@
+"use client"
+
+import {PropsWithChildren} from "react";
+import {ThemeProvider} from "@/features/theme/theme-provider";
+import {Toaster} from "@/components/ui/sonner";
+import {
+ QueryClient,
+ QueryClientProvider,
+} from '@tanstack/react-query'
+import {SessionProvider} from "next-auth/react";
+
+export type ProviderProps = PropsWithChildren<{}>;
+const queryClient = new QueryClient()
+
+export const Providers = (props: ProviderProps) => {
+ return (
+
+
+
+
+ {props.children}
+
+
+
+ )
+}
diff --git a/package-lock.json b/package-lock.json
index fa09793a..6dcf9339 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38,6 +38,7 @@
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.3",
+ "@tanstack/react-query": "^5.59.18",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
@@ -46,6 +47,8 @@
"input-otp": "^1.4.0",
"lucide-react": "^0.454.0",
"next": "14.2.16",
+ "next-auth": "^4.24.10",
+ "next-intl": "^3.24.0",
"next-themes": "^0.3.0",
"react": "^18",
"react-day-picker": "^8.10.1",
@@ -196,6 +199,56 @@
"integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==",
"license": "MIT"
},
+ "node_modules/@formatjs/ecma402-abstract": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-2.2.2.tgz",
+ "integrity": "sha512-zReeOJo3gA6Lgk4gTsUUdCwwTBa+Tw0LcqKHD84JCAJdPSxsxKdKPAPXihVgKDZevIWFGi4UTpy7JJ3D5EWeSw==",
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/fast-memoize": "2.2.3",
+ "@formatjs/intl-localematcher": "0.5.7",
+ "tslib": "2"
+ }
+ },
+ "node_modules/@formatjs/fast-memoize": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-2.2.3.tgz",
+ "integrity": "sha512-3jeJ+HyOfu8osl3GNSL4vVHUuWFXR03Iz9jjgI7RwjG6ysu/Ymdr0JRCPHfF5yGbTE6JCrd63EpvX1/WybYRbA==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2"
+ }
+ },
+ "node_modules/@formatjs/icu-messageformat-parser": {
+ "version": "2.9.2",
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.9.2.tgz",
+ "integrity": "sha512-WAQ2zGbroadkWXUDDjbGUOBN0TeDUEC47lcXV8wTtFN1QYCI1T26AVWOHqvVMVBqXHheKa82myjEVaXWVTwBNA==",
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/ecma402-abstract": "2.2.2",
+ "@formatjs/icu-skeleton-parser": "1.8.6",
+ "tslib": "2"
+ }
+ },
+ "node_modules/@formatjs/icu-skeleton-parser": {
+ "version": "1.8.6",
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.6.tgz",
+ "integrity": "sha512-rQXThZE7lxhw1eaOyu4mmFdKBYlh/dyYPSFB6hR3lZqPOm5vYdyHekQaxld9WIofZK2e3rxfel81RfAuy8kdIw==",
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/ecma402-abstract": "2.2.2",
+ "tslib": "2"
+ }
+ },
+ "node_modules/@formatjs/intl-localematcher": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.7.tgz",
+ "integrity": "sha512-GGFtfHGQVFe/niOZp24Kal5b2i36eE2bNL0xi9Sg/yd0TR8aLjcteApZdHmismP5QQax1cMnZM9yWySUUjJteA==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2"
+ }
+ },
"node_modules/@hookform/resolvers": {
"version": "3.9.1",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.9.1.tgz",
@@ -540,6 +593,15 @@
"node": ">=12.4.0"
}
},
+ "node_modules/@panva/hkdf": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.2.1.tgz",
+ "integrity": "sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/panva"
+ }
+ },
"node_modules/@pkgjs/parseargs": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
@@ -2048,6 +2110,32 @@
"tslib": "^2.4.0"
}
},
+ "node_modules/@tanstack/query-core": {
+ "version": "5.59.17",
+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.59.17.tgz",
+ "integrity": "sha512-jWdDiif8kaqnRGHNXAa9CnudtxY5v9DUxXhodgqX2Rwzj+1UwStDHEbBd9IA5C7VYAaJ2s+BxFR6PUBs8ERorA==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "node_modules/@tanstack/react-query": {
+ "version": "5.59.18",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.59.18.tgz",
+ "integrity": "sha512-tp/EP5q5ug9ijVB+3c9n4uULG9d2qmhMllqhtRMYv/l9PqqIA7C9s0ULsMxEeMNCQCdJ4gJqBSvqrC5Hz+fU+A==",
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/query-core": "5.59.17"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "react": "^18 || ^19"
+ }
+ },
"node_modules/@types/d3-array": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz",
@@ -3310,6 +3398,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -4900,6 +4997,18 @@
"node": ">=12"
}
},
+ "node_modules/intl-messageformat": {
+ "version": "10.7.4",
+ "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.7.4.tgz",
+ "integrity": "sha512-D4wGk8/XAp/5YMLtTXR+BUyGeSl4+28N43cwXXmIGQ8Tt+STA/oUsz9KUerzgiwBlJ+2dRDsQ3qQvvlVF6jzFA==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@formatjs/ecma402-abstract": "2.2.2",
+ "@formatjs/fast-memoize": "2.2.3",
+ "@formatjs/icu-messageformat-parser": "2.9.2",
+ "tslib": "2"
+ }
+ },
"node_modules/invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
@@ -5368,6 +5477,15 @@
"jiti": "bin/jiti.js"
}
},
+ "node_modules/jose": {
+ "version": "4.15.9",
+ "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.9.tgz",
+ "integrity": "sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/panva"
+ }
+ },
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -5649,6 +5767,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/negotiator": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/next": {
"version": "14.2.16",
"resolved": "https://registry.npmjs.org/next/-/next-14.2.16.tgz",
@@ -5699,6 +5826,59 @@
}
}
},
+ "node_modules/next-auth": {
+ "version": "4.24.10",
+ "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-4.24.10.tgz",
+ "integrity": "sha512-8NGqiRO1GXBcVfV8tbbGcUgQkAGsX4GRzzXXea4lDikAsJtD5KiEY34bfhUOjHLvr6rT6afpcxw2H8EZqOV6aQ==",
+ "license": "ISC",
+ "dependencies": {
+ "@babel/runtime": "^7.20.13",
+ "@panva/hkdf": "^1.0.2",
+ "cookie": "^0.7.0",
+ "jose": "^4.15.5",
+ "oauth": "^0.9.15",
+ "openid-client": "^5.4.0",
+ "preact": "^10.6.3",
+ "preact-render-to-string": "^5.1.19",
+ "uuid": "^8.3.2"
+ },
+ "peerDependencies": {
+ "@auth/core": "0.34.2",
+ "next": "^12.2.5 || ^13 || ^14 || ^15",
+ "nodemailer": "^6.6.5",
+ "react": "^17.0.2 || ^18",
+ "react-dom": "^17.0.2 || ^18"
+ },
+ "peerDependenciesMeta": {
+ "@auth/core": {
+ "optional": true
+ },
+ "nodemailer": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/next-intl": {
+ "version": "3.24.0",
+ "resolved": "https://registry.npmjs.org/next-intl/-/next-intl-3.24.0.tgz",
+ "integrity": "sha512-48X68QsI92grir2dH1W15yhyVnEjW4c9qmwNt+du+k6mI1QtlE6GyANWHoL4/leTixHv8knZ1y9B/Ys06gmKLg==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/amannn"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/intl-localematcher": "^0.5.4",
+ "negotiator": "^1.0.0",
+ "use-intl": "^3.24.0"
+ },
+ "peerDependencies": {
+ "next": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0"
+ }
+ },
"node_modules/next-themes": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.3.0.tgz",
@@ -5746,6 +5926,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/oauth": {
+ "version": "0.9.15",
+ "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
+ "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==",
+ "license": "MIT"
+ },
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@@ -5873,6 +6059,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/oidc-token-hash": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz",
+ "integrity": "sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw==",
+ "license": "MIT",
+ "engines": {
+ "node": "^10.13.0 || >=12.0.0"
+ }
+ },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -5883,6 +6078,42 @@
"wrappy": "1"
}
},
+ "node_modules/openid-client": {
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.7.0.tgz",
+ "integrity": "sha512-4GCCGZt1i2kTHpwvaC/sCpTpQqDnBzDzuJcJMbH+y1Q5qI8U8RBvoSh28svarXszZHR5BAMXbJPX1PGPRE3VOA==",
+ "license": "MIT",
+ "dependencies": {
+ "jose": "^4.15.9",
+ "lru-cache": "^6.0.0",
+ "object-hash": "^2.2.0",
+ "oidc-token-hash": "^5.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/panva"
+ }
+ },
+ "node_modules/openid-client/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/openid-client/node_modules/object-hash": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",
+ "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/optionator": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
@@ -6198,6 +6429,28 @@
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
"license": "MIT"
},
+ "node_modules/preact": {
+ "version": "10.24.3",
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.3.tgz",
+ "integrity": "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/preact"
+ }
+ },
+ "node_modules/preact-render-to-string": {
+ "version": "5.2.6",
+ "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz",
+ "integrity": "sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==",
+ "license": "MIT",
+ "dependencies": {
+ "pretty-format": "^3.8.0"
+ },
+ "peerDependencies": {
+ "preact": ">=10"
+ }
+ },
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
@@ -6208,6 +6461,12 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/pretty-format": {
+ "version": "3.8.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz",
+ "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==",
+ "license": "MIT"
+ },
"node_modules/prisma": {
"version": "5.21.1",
"resolved": "https://registry.npmjs.org/prisma/-/prisma-5.21.1.tgz",
@@ -7437,6 +7696,19 @@
}
}
},
+ "node_modules/use-intl": {
+ "version": "3.24.0",
+ "resolved": "https://registry.npmjs.org/use-intl/-/use-intl-3.24.0.tgz",
+ "integrity": "sha512-lmrARod7yjMYehbyY9xBLjjgnlNcJsl1UAltAPlgspRG7RH6H0JYaGo4C3PZW/BTy0Dgmcvcl8rH/VemzGIhgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@formatjs/fast-memoize": "^2.2.0",
+ "intl-messageformat": "^10.5.14"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0"
+ }
+ },
"node_modules/use-sidecar": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz",
@@ -7465,6 +7737,15 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT"
},
+ "node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "license": "MIT",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
"node_modules/vaul": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/vaul/-/vaul-1.1.1.tgz",
@@ -7709,6 +7990,12 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "license": "ISC"
+ },
"node_modules/yaml": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz",
diff --git a/package.json b/package.json
index 1f81049c..163f29e0 100644
--- a/package.json
+++ b/package.json
@@ -39,6 +39,7 @@
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.3",
+ "@tanstack/react-query": "^5.59.18",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
@@ -47,6 +48,8 @@
"input-otp": "^1.4.0",
"lucide-react": "^0.454.0",
"next": "14.2.16",
+ "next-auth": "^4.24.10",
+ "next-intl": "^3.24.0",
"next-themes": "^0.3.0",
"react": "^18",
"react-day-picker": "^8.10.1",
diff --git a/components/ui/accordion.tsx b/src/components/ui/accordion.tsx
similarity index 100%
rename from components/ui/accordion.tsx
rename to src/components/ui/accordion.tsx
diff --git a/components/ui/alert-dialog.tsx b/src/components/ui/alert-dialog.tsx
similarity index 100%
rename from components/ui/alert-dialog.tsx
rename to src/components/ui/alert-dialog.tsx
diff --git a/components/ui/alert.tsx b/src/components/ui/alert.tsx
similarity index 100%
rename from components/ui/alert.tsx
rename to src/components/ui/alert.tsx
diff --git a/components/ui/aspect-ratio.tsx b/src/components/ui/aspect-ratio.tsx
similarity index 100%
rename from components/ui/aspect-ratio.tsx
rename to src/components/ui/aspect-ratio.tsx
diff --git a/components/ui/avatar.tsx b/src/components/ui/avatar.tsx
similarity index 100%
rename from components/ui/avatar.tsx
rename to src/components/ui/avatar.tsx
diff --git a/components/ui/badge.tsx b/src/components/ui/badge.tsx
similarity index 100%
rename from components/ui/badge.tsx
rename to src/components/ui/badge.tsx
diff --git a/components/ui/breadcrumb.tsx b/src/components/ui/breadcrumb.tsx
similarity index 100%
rename from components/ui/breadcrumb.tsx
rename to src/components/ui/breadcrumb.tsx
diff --git a/components/ui/button.tsx b/src/components/ui/button.tsx
similarity index 100%
rename from components/ui/button.tsx
rename to src/components/ui/button.tsx
diff --git a/components/ui/calendar.tsx b/src/components/ui/calendar.tsx
similarity index 100%
rename from components/ui/calendar.tsx
rename to src/components/ui/calendar.tsx
diff --git a/components/ui/card.tsx b/src/components/ui/card.tsx
similarity index 100%
rename from components/ui/card.tsx
rename to src/components/ui/card.tsx
diff --git a/components/ui/carousel.tsx b/src/components/ui/carousel.tsx
similarity index 100%
rename from components/ui/carousel.tsx
rename to src/components/ui/carousel.tsx
diff --git a/components/ui/chart.tsx b/src/components/ui/chart.tsx
similarity index 100%
rename from components/ui/chart.tsx
rename to src/components/ui/chart.tsx
diff --git a/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx
similarity index 100%
rename from components/ui/checkbox.tsx
rename to src/components/ui/checkbox.tsx
diff --git a/components/ui/collapsible.tsx b/src/components/ui/collapsible.tsx
similarity index 100%
rename from components/ui/collapsible.tsx
rename to src/components/ui/collapsible.tsx
diff --git a/components/ui/command.tsx b/src/components/ui/command.tsx
similarity index 100%
rename from components/ui/command.tsx
rename to src/components/ui/command.tsx
diff --git a/components/ui/context-menu.tsx b/src/components/ui/context-menu.tsx
similarity index 100%
rename from components/ui/context-menu.tsx
rename to src/components/ui/context-menu.tsx
diff --git a/components/ui/dialog.tsx b/src/components/ui/dialog.tsx
similarity index 100%
rename from components/ui/dialog.tsx
rename to src/components/ui/dialog.tsx
diff --git a/components/ui/drawer.tsx b/src/components/ui/drawer.tsx
similarity index 100%
rename from components/ui/drawer.tsx
rename to src/components/ui/drawer.tsx
diff --git a/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx
similarity index 100%
rename from components/ui/dropdown-menu.tsx
rename to src/components/ui/dropdown-menu.tsx
diff --git a/components/ui/form.tsx b/src/components/ui/form.tsx
similarity index 100%
rename from components/ui/form.tsx
rename to src/components/ui/form.tsx
diff --git a/components/ui/hover-card.tsx b/src/components/ui/hover-card.tsx
similarity index 100%
rename from components/ui/hover-card.tsx
rename to src/components/ui/hover-card.tsx
diff --git a/components/ui/input-otp.tsx b/src/components/ui/input-otp.tsx
similarity index 100%
rename from components/ui/input-otp.tsx
rename to src/components/ui/input-otp.tsx
diff --git a/components/ui/input.tsx b/src/components/ui/input.tsx
similarity index 100%
rename from components/ui/input.tsx
rename to src/components/ui/input.tsx
diff --git a/components/ui/label.tsx b/src/components/ui/label.tsx
similarity index 100%
rename from components/ui/label.tsx
rename to src/components/ui/label.tsx
diff --git a/components/ui/menubar.tsx b/src/components/ui/menubar.tsx
similarity index 100%
rename from components/ui/menubar.tsx
rename to src/components/ui/menubar.tsx
diff --git a/components/ui/navigation-menu.tsx b/src/components/ui/navigation-menu.tsx
similarity index 100%
rename from components/ui/navigation-menu.tsx
rename to src/components/ui/navigation-menu.tsx
diff --git a/components/ui/pagination.tsx b/src/components/ui/pagination.tsx
similarity index 100%
rename from components/ui/pagination.tsx
rename to src/components/ui/pagination.tsx
diff --git a/components/ui/popover.tsx b/src/components/ui/popover.tsx
similarity index 100%
rename from components/ui/popover.tsx
rename to src/components/ui/popover.tsx
diff --git a/components/ui/progress.tsx b/src/components/ui/progress.tsx
similarity index 100%
rename from components/ui/progress.tsx
rename to src/components/ui/progress.tsx
diff --git a/components/ui/radio-group.tsx b/src/components/ui/radio-group.tsx
similarity index 100%
rename from components/ui/radio-group.tsx
rename to src/components/ui/radio-group.tsx
diff --git a/components/ui/resizable.tsx b/src/components/ui/resizable.tsx
similarity index 100%
rename from components/ui/resizable.tsx
rename to src/components/ui/resizable.tsx
diff --git a/components/ui/scroll-area.tsx b/src/components/ui/scroll-area.tsx
similarity index 100%
rename from components/ui/scroll-area.tsx
rename to src/components/ui/scroll-area.tsx
diff --git a/components/ui/select.tsx b/src/components/ui/select.tsx
similarity index 100%
rename from components/ui/select.tsx
rename to src/components/ui/select.tsx
diff --git a/components/ui/separator.tsx b/src/components/ui/separator.tsx
similarity index 100%
rename from components/ui/separator.tsx
rename to src/components/ui/separator.tsx
diff --git a/components/ui/sheet.tsx b/src/components/ui/sheet.tsx
similarity index 100%
rename from components/ui/sheet.tsx
rename to src/components/ui/sheet.tsx
diff --git a/components/ui/sidebar.tsx b/src/components/ui/sidebar.tsx
similarity index 100%
rename from components/ui/sidebar.tsx
rename to src/components/ui/sidebar.tsx
diff --git a/components/ui/skeleton.tsx b/src/components/ui/skeleton.tsx
similarity index 100%
rename from components/ui/skeleton.tsx
rename to src/components/ui/skeleton.tsx
diff --git a/components/ui/slider.tsx b/src/components/ui/slider.tsx
similarity index 100%
rename from components/ui/slider.tsx
rename to src/components/ui/slider.tsx
diff --git a/components/ui/sonner.tsx b/src/components/ui/sonner.tsx
similarity index 100%
rename from components/ui/sonner.tsx
rename to src/components/ui/sonner.tsx
diff --git a/components/ui/switch.tsx b/src/components/ui/switch.tsx
similarity index 100%
rename from components/ui/switch.tsx
rename to src/components/ui/switch.tsx
diff --git a/components/ui/table.tsx b/src/components/ui/table.tsx
similarity index 100%
rename from components/ui/table.tsx
rename to src/components/ui/table.tsx
diff --git a/components/ui/tabs.tsx b/src/components/ui/tabs.tsx
similarity index 100%
rename from components/ui/tabs.tsx
rename to src/components/ui/tabs.tsx
diff --git a/components/ui/textarea.tsx b/src/components/ui/textarea.tsx
similarity index 100%
rename from components/ui/textarea.tsx
rename to src/components/ui/textarea.tsx
diff --git a/components/ui/toast.tsx b/src/components/ui/toast.tsx
similarity index 100%
rename from components/ui/toast.tsx
rename to src/components/ui/toast.tsx
diff --git a/components/ui/toaster.tsx b/src/components/ui/toaster.tsx
similarity index 100%
rename from components/ui/toaster.tsx
rename to src/components/ui/toaster.tsx
diff --git a/components/ui/toggle-group.tsx b/src/components/ui/toggle-group.tsx
similarity index 100%
rename from components/ui/toggle-group.tsx
rename to src/components/ui/toggle-group.tsx
diff --git a/components/ui/toggle.tsx b/src/components/ui/toggle.tsx
similarity index 100%
rename from components/ui/toggle.tsx
rename to src/components/ui/toggle.tsx
diff --git a/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx
similarity index 100%
rename from components/ui/tooltip.tsx
rename to src/components/ui/tooltip.tsx
diff --git a/src/components/wrappers/SideBar/app-sidebar.tsx b/src/components/wrappers/SideBar/app-sidebar.tsx
new file mode 100644
index 00000000..90b8addb
--- /dev/null
+++ b/src/components/wrappers/SideBar/app-sidebar.tsx
@@ -0,0 +1,128 @@
+import {
+ Sidebar,
+ SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent,
+ SidebarGroupLabel,
+ SidebarHeader, SidebarInset,
+ SidebarMenu,
+ SidebarMenuButton,
+ SidebarMenuItem, SidebarTrigger
+} from "@/components/ui/sidebar"
+import {DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger} from "@/components/ui/dropdown-menu";
+import {Calendar, ChevronDown, ChevronUp, Home, Inbox, Search, Settings, User2} from "lucide-react";
+import {Separator} from "@radix-ui/react-menu";
+import {Breadcrumb} from "@/components/ui/breadcrumb";
+import Link from "next/link";
+
+export function AppSidebar() {
+
+ const BASE_URL = "/dashboard";
+
+ // Menu items.
+ const items = [
+ {
+ title: "Home",
+ url: "/",
+ icon: Home,
+ },
+ {
+ title: "Inbox",
+ url: "/home",
+ icon: Inbox,
+ },
+ {
+ title: "Calendar",
+ url: "#",
+ icon: Calendar,
+ },
+ {
+ title: "Search",
+ url: "#",
+ icon: Search,
+ },
+ {
+ title: "Settings",
+ url: "#",
+ icon: Settings,
+ },
+ ]
+
+
+
+
+
+ return (
+
+
+
+
+
+
+
+ Select Workspace
+
+
+
+
+
+ Acme Inc
+
+
+ Acme Corp.
+
+
+
+
+
+
+
+
+ Application
+
+
+ {items.map((item) => (
+
+
+
+
+ {item.title}
+
+
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+ Username
+
+
+
+
+
+ Account
+
+
+ Billing
+
+
+ Sign out
+
+
+
+
+
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/features/theme/theme-provider.tsx b/src/features/theme/theme-provider.tsx
new file mode 100644
index 00000000..914e7616
--- /dev/null
+++ b/src/features/theme/theme-provider.tsx
@@ -0,0 +1,9 @@
+"use client"
+
+import * as React from "react"
+import { ThemeProvider as NextThemesProvider } from "next-themes"
+import { type ThemeProviderProps } from "next-themes/dist/types"
+
+export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
+ return {children}
+}
\ No newline at end of file
diff --git a/hooks/use-mobile.tsx b/src/hooks/use-mobile.tsx
similarity index 100%
rename from hooks/use-mobile.tsx
rename to src/hooks/use-mobile.tsx
diff --git a/hooks/use-toast.ts b/src/hooks/use-toast.ts
similarity index 100%
rename from hooks/use-toast.ts
rename to src/hooks/use-toast.ts
diff --git a/lib/utils.ts b/src/lib/utils.ts
similarity index 100%
rename from lib/utils.ts
rename to src/lib/utils.ts
diff --git a/src/types/next.ts b/src/types/next.ts
new file mode 100644
index 00000000..1dc13a40
--- /dev/null
+++ b/src/types/next.ts
@@ -0,0 +1,10 @@
+export type LayoutParams> = {
+ children: React.ReactNode;
+ params: T;
+
+};
+
+export type PageParams> = {
+ params: T;
+ searchParams: {[key: string]: string | string[] | undefined};
+};
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 84b1093a..8294e919 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,95 +1,80 @@
-import type { Config } from "tailwindcss";
+import type { Config } from "tailwindcss"
-const config: Config = {
- darkMode: ["class"],
- content: [
- "./pages/**/*.{js,ts,jsx,tsx,mdx}",
- "./components/**/*.{js,ts,jsx,tsx,mdx}",
- "./app/**/*.{js,ts,jsx,tsx,mdx}",
- ],
- theme: {
- extend: {
- colors: {
- background: 'hsl(var(--background))',
- foreground: 'hsl(var(--foreground))',
- card: {
- DEFAULT: 'hsl(var(--card))',
- foreground: 'hsl(var(--card-foreground))'
- },
- popover: {
- DEFAULT: 'hsl(var(--popover))',
- foreground: 'hsl(var(--popover-foreground))'
- },
- primary: {
- DEFAULT: 'hsl(var(--primary))',
- foreground: 'hsl(var(--primary-foreground))'
- },
- secondary: {
- DEFAULT: 'hsl(var(--secondary))',
- foreground: 'hsl(var(--secondary-foreground))'
- },
- muted: {
- DEFAULT: 'hsl(var(--muted))',
- foreground: 'hsl(var(--muted-foreground))'
- },
- accent: {
- DEFAULT: 'hsl(var(--accent))',
- foreground: 'hsl(var(--accent-foreground))'
- },
- destructive: {
- DEFAULT: 'hsl(var(--destructive))',
- foreground: 'hsl(var(--destructive-foreground))'
- },
- border: 'hsl(var(--border))',
- input: 'hsl(var(--input))',
- ring: 'hsl(var(--ring))',
- chart: {
- '1': 'hsl(var(--chart-1))',
- '2': 'hsl(var(--chart-2))',
- '3': 'hsl(var(--chart-3))',
- '4': 'hsl(var(--chart-4))',
- '5': 'hsl(var(--chart-5))'
- },
- sidebar: {
- DEFAULT: 'hsl(var(--sidebar-background))',
- foreground: 'hsl(var(--sidebar-foreground))',
- primary: 'hsl(var(--sidebar-primary))',
- 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
- accent: 'hsl(var(--sidebar-accent))',
- 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
- border: 'hsl(var(--sidebar-border))',
- ring: 'hsl(var(--sidebar-ring))'
- }
- },
- borderRadius: {
- lg: 'var(--radius)',
- md: 'calc(var(--radius) - 2px)',
- sm: 'calc(var(--radius) - 4px)'
- },
- keyframes: {
- 'accordion-down': {
- from: {
- height: '0'
- },
- to: {
- height: 'var(--radix-accordion-content-height)'
- }
- },
- 'accordion-up': {
- from: {
- height: 'var(--radix-accordion-content-height)'
- },
- to: {
- height: '0'
- }
- }
- },
- animation: {
- 'accordion-down': 'accordion-down 0.2s ease-out',
- 'accordion-up': 'accordion-up 0.2s ease-out'
- }
- }
- },
- plugins: [require("tailwindcss-animate")],
-};
-export default config;
+const config = {
+ darkMode: ["class"],
+ content: [
+ './pages/**/*.{ts,tsx}',
+ './components/**/*.{ts,tsx}',
+ './app/**/*.{ts,tsx}',
+ './src/**/*.{ts,tsx}',
+ ],
+ prefix: "",
+ theme: {
+ container: {
+ center: true,
+ padding: "2rem",
+ screens: {
+ "2xl": "1400px",
+ },
+ },
+ extend: {
+ colors: {
+ border: "hsl(var(--border))",
+ input: "hsl(var(--input))",
+ ring: "hsl(var(--ring))",
+ background: "hsl(var(--background))",
+ foreground: "hsl(var(--foreground))",
+ primary: {
+ DEFAULT: "hsl(var(--primary))",
+ foreground: "hsl(var(--primary-foreground))",
+ },
+ secondary: {
+ DEFAULT: "hsl(var(--secondary))",
+ foreground: "hsl(var(--secondary-foreground))",
+ },
+ destructive: {
+ DEFAULT: "hsl(var(--destructive))",
+ foreground: "hsl(var(--destructive-foreground))",
+ },
+ muted: {
+ DEFAULT: "hsl(var(--muted))",
+ foreground: "hsl(var(--muted-foreground))",
+ },
+ accent: {
+ DEFAULT: "hsl(var(--accent))",
+ foreground: "hsl(var(--accent-foreground))",
+ },
+ popover: {
+ DEFAULT: "hsl(var(--popover))",
+ foreground: "hsl(var(--popover-foreground))",
+ },
+ card: {
+ DEFAULT: "hsl(var(--card))",
+ foreground: "hsl(var(--card-foreground))",
+ },
+ },
+ borderRadius: {
+ lg: "var(--radius)",
+ md: "calc(var(--radius) - 2px)",
+ sm: "calc(var(--radius) - 4px)",
+ },
+ keyframes: {
+ "accordion-down": {
+ from: { height: "0" },
+ to: { height: "var(--radix-accordion-content-height)" },
+ },
+ "accordion-up": {
+ from: { height: "var(--radix-accordion-content-height)" },
+ to: { height: "0" },
+ },
+ },
+ animation: {
+ "accordion-down": "accordion-down 0.2s ease-out",
+ "accordion-up": "accordion-up 0.2s ease-out",
+ },
+ },
+ },
+ plugins: [require("tailwindcss-animate")],
+} satisfies Config
+
+export default config
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index e7ff90fd..f53b1567 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,9 +1,13 @@
{
"compilerOptions": {
- "lib": ["dom", "dom.iterable", "esnext"],
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "esnext"
+ ],
"allowJs": true,
"skipLibCheck": true,
- "strict": true,
+ // "strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
@@ -18,9 +22,19 @@
}
],
"paths": {
- "@/*": ["./*"]
- }
+ "@/*": [
+ "./src/*"
+ ]
+ },
+ "strict": false
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
- "exclude": ["node_modules"]
+ "include": [
+ "next-env.d.ts",
+ "**/*.ts",
+ "**/*.tsx",
+ ".next/types/**/*.ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ]
}