Skip to content

Commit e52f2ea

Browse files
committed
initial updates
0 parents  commit e52f2ea

Some content is hidden

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

71 files changed

+9539
-0
lines changed

Diff for: .eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

Diff for: .gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Dilum Sanjaya
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# nextjs-shadcn-dashboard
2+
Next.js dashboard starter with shadcn
3+
4+
Demo URL : [https://nextjs-shadcn-dashboard.netlify.app/](https://nextjs-shadcn-dashboard.netlify.app/)
5+
6+
7+
8+
![demo image](https://res.cloudinary.com/ds574fco0/image/upload/v1693927076/demo_f6qtc2.jpg)

Diff for: app/(dashboard)/dashboard/layout.tsx

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import type { Metadata } from "next";
2+
import { Inter } from "next/font/google";
3+
import ThemeProvider from "@/components/layout/ThemeProvider";
4+
import { Sidebar } from "@/components/layout/Sidebar/Sidebar";
5+
import Header from "@/components/layout/Header/Header";
6+
7+
const inter = Inter({ subsets: ["latin"] });
8+
9+
export const metadata: Metadata = {
10+
title: "Next Shadcn",
11+
description: "Basic dashboard with Next.js and Shadcn",
12+
};
13+
14+
export default function DashboardLayout({
15+
children,
16+
}: {
17+
children: React.ReactNode;
18+
}) {
19+
return (
20+
<>
21+
<Header />
22+
<div className="flex h-screen overflow-hidden">
23+
<Sidebar className="w-1/6" />
24+
<main className="grow pt-16 ">{children}</main>
25+
</div>
26+
</>
27+
);
28+
}

Diff for: app/(dashboard)/dashboard/page.tsx

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
import { Overview } from "@/components/overview";
2+
import { RecentSales } from "@/components/recent-sales";
3+
import { Button } from "@/components/ui/button";
4+
import {
5+
Card,
6+
CardContent,
7+
CardDescription,
8+
CardHeader,
9+
CardTitle,
10+
} from "@/components/ui/card";
11+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
12+
import React from "react";
13+
14+
export default function page() {
15+
return (
16+
<div>
17+
<div className="flex-1 space-y-4 p-8 pt-6">
18+
<div className="flex items-center justify-between space-y-2">
19+
<h2 className="text-3xl font-bold tracking-tight">Dashboard</h2>
20+
<div className="flex items-center space-x-2">
21+
{/* <CalendarDateRangePicker /> */}
22+
<Button>Download</Button>
23+
</div>
24+
</div>
25+
<Tabs defaultValue="overview" className="space-y-4">
26+
<TabsList>
27+
<TabsTrigger value="overview">Overview</TabsTrigger>
28+
<TabsTrigger value="analytics" disabled>
29+
Analytics
30+
</TabsTrigger>
31+
<TabsTrigger value="reports" disabled>
32+
Reports
33+
</TabsTrigger>
34+
<TabsTrigger value="notifications" disabled>
35+
Notifications
36+
</TabsTrigger>
37+
</TabsList>
38+
<TabsContent value="overview" className="space-y-4">
39+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4">
40+
<Card>
41+
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
42+
<CardTitle className="text-sm font-medium">
43+
Total Revenue
44+
</CardTitle>
45+
<svg
46+
xmlns="http://www.w3.org/2000/svg"
47+
viewBox="0 0 24 24"
48+
fill="none"
49+
stroke="currentColor"
50+
strokeLinecap="round"
51+
strokeLinejoin="round"
52+
strokeWidth="2"
53+
className="h-4 w-4 text-muted-foreground"
54+
>
55+
<path d="M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" />
56+
</svg>
57+
</CardHeader>
58+
<CardContent>
59+
<div className="text-2xl font-bold">$45,231.89</div>
60+
<p className="text-xs text-muted-foreground">
61+
+20.1% from last month
62+
</p>
63+
</CardContent>
64+
</Card>
65+
<Card>
66+
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
67+
<CardTitle className="text-sm font-medium">
68+
Subscriptions
69+
</CardTitle>
70+
<svg
71+
xmlns="http://www.w3.org/2000/svg"
72+
viewBox="0 0 24 24"
73+
fill="none"
74+
stroke="currentColor"
75+
strokeLinecap="round"
76+
strokeLinejoin="round"
77+
strokeWidth="2"
78+
className="h-4 w-4 text-muted-foreground"
79+
>
80+
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
81+
<circle cx="9" cy="7" r="4" />
82+
<path d="M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" />
83+
</svg>
84+
</CardHeader>
85+
<CardContent>
86+
<div className="text-2xl font-bold">+2350</div>
87+
<p className="text-xs text-muted-foreground">
88+
+180.1% from last month
89+
</p>
90+
</CardContent>
91+
</Card>
92+
<Card>
93+
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
94+
<CardTitle className="text-sm font-medium">Sales</CardTitle>
95+
<svg
96+
xmlns="http://www.w3.org/2000/svg"
97+
viewBox="0 0 24 24"
98+
fill="none"
99+
stroke="currentColor"
100+
strokeLinecap="round"
101+
strokeLinejoin="round"
102+
strokeWidth="2"
103+
className="h-4 w-4 text-muted-foreground"
104+
>
105+
<rect width="20" height="14" x="2" y="5" rx="2" />
106+
<path d="M2 10h20" />
107+
</svg>
108+
</CardHeader>
109+
<CardContent>
110+
<div className="text-2xl font-bold">+12,234</div>
111+
<p className="text-xs text-muted-foreground">
112+
+19% from last month
113+
</p>
114+
</CardContent>
115+
</Card>
116+
<Card>
117+
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
118+
<CardTitle className="text-sm font-medium">
119+
Active Now
120+
</CardTitle>
121+
<svg
122+
xmlns="http://www.w3.org/2000/svg"
123+
viewBox="0 0 24 24"
124+
fill="none"
125+
stroke="currentColor"
126+
strokeLinecap="round"
127+
strokeLinejoin="round"
128+
strokeWidth="2"
129+
className="h-4 w-4 text-muted-foreground"
130+
>
131+
<path d="M22 12h-4l-3 9L9 3l-3 9H2" />
132+
</svg>
133+
</CardHeader>
134+
<CardContent>
135+
<div className="text-2xl font-bold">+573</div>
136+
<p className="text-xs text-muted-foreground">
137+
+201 since last hour
138+
</p>
139+
</CardContent>
140+
</Card>
141+
</div>
142+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-7">
143+
<Card className="col-span-4">
144+
<CardHeader>
145+
<CardTitle>Overview</CardTitle>
146+
</CardHeader>
147+
<CardContent className="pl-2">
148+
<Overview />
149+
</CardContent>
150+
</Card>
151+
<Card className="col-span-3">
152+
<CardHeader>
153+
<CardTitle>Recent Sales</CardTitle>
154+
<CardDescription>
155+
You made 265 sales this month.
156+
</CardDescription>
157+
</CardHeader>
158+
<CardContent>
159+
<RecentSales />
160+
</CardContent>
161+
</Card>
162+
</div>
163+
</TabsContent>
164+
</Tabs>
165+
</div>
166+
</div>
167+
);
168+
}

Diff for: app/(dashboard)/dashboard/user/[userId]/page.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ProductForm } from "@/components/forms/product-form";
2+
import React from "react";
3+
4+
export default function Page() {
5+
return (
6+
<div className="flex-1 space-y-4 p-8 pt-6">
7+
<ProductForm categories={[]} initialData={[]} key={null} />
8+
</div>
9+
);
10+
}

Diff for: app/(dashboard)/dashboard/user/page.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { UserClient } from "@/components/tables/user-tables/client";
2+
import { users } from "@/constants/data";
3+
import React from "react";
4+
5+
export default function page() {
6+
return (
7+
<>
8+
<div className="flex-1 space-y-4 p-8 pt-6">
9+
<UserClient data={users} />
10+
</div>
11+
</>
12+
);
13+
}

Diff for: app/favicon.ico

25.3 KB
Binary file not shown.

Diff for: app/globals.css

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
:root {
7+
--background: 0 0% 100%;
8+
--foreground: 240 10% 3.9%;
9+
10+
--card: 0 0% 100%;
11+
--card-foreground: 240 10% 3.9%;
12+
13+
--popover: 0 0% 100%;
14+
--popover-foreground: 240 10% 3.9%;
15+
16+
--primary: 240 5.9% 10%;
17+
--primary-foreground: 0 0% 98%;
18+
19+
--secondary: 240 4.8% 95.9%;
20+
--secondary-foreground: 240 5.9% 10%;
21+
22+
--muted: 240 4.8% 95.9%;
23+
--muted-foreground: 240 3.8% 46.1%;
24+
25+
--accent: 240 4.8% 95.9%;
26+
--accent-foreground: 240 5.9% 10%;
27+
28+
--destructive: 0 84.2% 60.2%;
29+
--destructive-foreground: 0 0% 98%;
30+
31+
--border: 240 5.9% 90%;
32+
--input: 240 5.9% 90%;
33+
--ring: 240 10% 3.9%;
34+
35+
--radius: 0.5rem;
36+
}
37+
38+
.dark {
39+
--background: 240 10% 3.9%;
40+
--foreground: 0 0% 98%;
41+
42+
--card: 240 10% 3.9%;
43+
--card-foreground: 0 0% 98%;
44+
45+
--popover: 240 10% 3.9%;
46+
--popover-foreground: 0 0% 98%;
47+
48+
--primary: 0 0% 98%;
49+
--primary-foreground: 240 5.9% 10%;
50+
51+
--secondary: 240 3.7% 15.9%;
52+
--secondary-foreground: 0 0% 98%;
53+
54+
--muted: 240 3.7% 15.9%;
55+
--muted-foreground: 240 5% 64.9%;
56+
57+
--accent: 240 3.7% 15.9%;
58+
--accent-foreground: 0 0% 98%;
59+
60+
--destructive: 0 62.8% 30.6%;
61+
--destructive-foreground: 0 0% 98%;
62+
63+
--border: 240 3.7% 15.9%;
64+
--input: 240 3.7% 15.9%;
65+
--ring: 240 4.9% 83.9%;
66+
}
67+
}
68+
69+
@layer base {
70+
* {
71+
@apply border-border;
72+
}
73+
body {
74+
@apply bg-background text-foreground;
75+
}
76+
}

0 commit comments

Comments
 (0)