Skip to content

Commit f32df11

Browse files
committed
readme prettier
1 parent 648ffe7 commit f32df11

Some content is hidden

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

41 files changed

+559
-656
lines changed

Diff for: .prettierrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

Diff for: LICENSE

-21
This file was deleted.

Diff for: README.md

+40-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,40 @@
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)
1+
<picture>
2+
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/9113740/201498864-2a900c64-d88f-4ed4-b5cf-770bcb57e1f5.png">
3+
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/9113740/201498152-b171abb8-9225-487a-821c-6ff49ee48579.png">
4+
</picture>
5+
6+
<div align="center"><strong>Next.js 14 Admin Dashboard Starter Template With Shadcn-ui</strong></div>
7+
<div align="center">Built with the Next.js App Router</div>
8+
<br />
9+
<div align="center">
10+
<a href="http://next-dashboard-starter.vercel.app">View Demo</a>
11+
<span>
12+
</div>
13+
14+
## Overview
15+
16+
This is a starter template using the following stack:
17+
18+
- Framework - [Next.js 14](https://nextjs.org/13)
19+
- Language - [TypeScript](https://www.typescriptlang.org)
20+
- Styling - [Tailwind CSS](https://tailwindcss.com)
21+
- Components - [Shadcn-ui](https://ui.shadcn.com)
22+
- Schema Validations - [Zod](https://zod.dev)
23+
- File Uploading - [Uploadthing](https://uploadthing.com)
24+
- Tables - [Tanstack Tables](https://ui.shadcn.com/docs/components/data-table)
25+
- Forms - [React Hook Form](https://ui.shadcn.com/docs/components/form)
26+
- Linting - [ESLint](https://eslint.org)
27+
- Formatting - [Prettier](https://prettier.io)
28+
29+
## Getting Started
30+
31+
Clone this repo
32+
33+
Run the following commands to start the development server:
34+
35+
```
36+
npm install
37+
npm run dev
38+
```
39+
40+
You should now be able to access the application at http://localhost:3000.

Diff for: app/(auth)/(signin)/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function AuthenticationPage() {
1717
href="/examples/authentication"
1818
className={cn(
1919
buttonVariants({ variant: "ghost" }),
20-
"absolute right-4 hidden top-4 md:right-8 md:top-8"
20+
"absolute right-4 hidden top-4 md:right-8 md:top-8",
2121
)}
2222
>
2323
Login

Diff for: components.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"components": "@/components",
1414
"utils": "@/lib/utils"
1515
}
16-
}
16+
}

Diff for: components/breadcrumb.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function BreadCrumb({ items }: BreadCrumbPropsType) {
3030
"font-medium",
3131
index === items.length - 1
3232
? "text-foreground pointer-events-none"
33-
: "text-muted-foreground"
33+
: "text-muted-foreground",
3434
)}
3535
>
3636
{item.title}

Diff for: components/dashboard-nav.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function DashboardNav({ items }: DashboardNavProps) {
2929
className={cn(
3030
"group flex items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground",
3131
path === item.href ? "bg-accent" : "transparent",
32-
item.disabled && "cursor-not-allowed opacity-80"
32+
item.disabled && "cursor-not-allowed opacity-80",
3333
)}
3434
>
3535
<Icon className="mr-2 h-4 w-4" />

Diff for: components/date-range-picker.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function CalendarDateRangePicker({
2929
variant={"outline"}
3030
className={cn(
3131
"w-[260px] justify-start text-left font-normal",
32-
!date && "text-muted-foreground"
32+
!date && "text-muted-foreground",
3333
)}
3434
>
3535
<CalendarIcon className="mr-2 h-4 w-4" />

Diff for: components/layout/Header/user-nav.tsx

+55-59
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,58 @@
1+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
2+
import { Button } from "@/components/ui/button";
13
import {
2-
Avatar,
3-
AvatarFallback,
4-
AvatarImage,
5-
} from "@/components/ui/avatar"
6-
import { Button } from "@/components/ui/button"
7-
import {
8-
DropdownMenu,
9-
DropdownMenuContent,
10-
DropdownMenuGroup,
11-
DropdownMenuItem,
12-
DropdownMenuLabel,
13-
DropdownMenuSeparator,
14-
DropdownMenuShortcut,
15-
DropdownMenuTrigger,
16-
} from "@/components/ui/dropdown-menu"
17-
18-
export function UserNav() {
19-
return (
20-
<DropdownMenu>
21-
<DropdownMenuTrigger asChild>
22-
<Button variant="ghost" className="relative h-8 w-8 rounded-full">
23-
<Avatar className="h-8 w-8">
24-
<AvatarImage src="/avatars/01.png" alt="@shadcn" />
25-
<AvatarFallback>SC</AvatarFallback>
26-
</Avatar>
27-
</Button>
28-
</DropdownMenuTrigger>
29-
<DropdownMenuContent className="w-56" align="end" forceMount>
30-
<DropdownMenuLabel className="font-normal">
31-
<div className="flex flex-col space-y-1">
32-
<p className="text-sm font-medium leading-none">shadcn</p>
33-
<p className="text-xs leading-none text-muted-foreground">
34-
35-
</p>
36-
</div>
37-
</DropdownMenuLabel>
38-
<DropdownMenuSeparator />
39-
<DropdownMenuGroup>
40-
<DropdownMenuItem>
41-
Profile
42-
<DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>
43-
</DropdownMenuItem>
44-
<DropdownMenuItem>
45-
Billing
46-
<DropdownMenuShortcut>⌘B</DropdownMenuShortcut>
47-
</DropdownMenuItem>
48-
<DropdownMenuItem>
49-
Settings
50-
<DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
51-
</DropdownMenuItem>
52-
<DropdownMenuItem>New Team</DropdownMenuItem>
53-
</DropdownMenuGroup>
54-
<DropdownMenuSeparator />
4+
DropdownMenu,
5+
DropdownMenuContent,
6+
DropdownMenuGroup,
7+
DropdownMenuItem,
8+
DropdownMenuLabel,
9+
DropdownMenuSeparator,
10+
DropdownMenuShortcut,
11+
DropdownMenuTrigger,
12+
} from "@/components/ui/dropdown-menu";
13+
14+
export function UserNav() {
15+
return (
16+
<DropdownMenu>
17+
<DropdownMenuTrigger asChild>
18+
<Button variant="ghost" className="relative h-8 w-8 rounded-full">
19+
<Avatar className="h-8 w-8">
20+
<AvatarImage src="/avatars/01.png" alt="@shadcn" />
21+
<AvatarFallback>SC</AvatarFallback>
22+
</Avatar>
23+
</Button>
24+
</DropdownMenuTrigger>
25+
<DropdownMenuContent className="w-56" align="end" forceMount>
26+
<DropdownMenuLabel className="font-normal">
27+
<div className="flex flex-col space-y-1">
28+
<p className="text-sm font-medium leading-none">shadcn</p>
29+
<p className="text-xs leading-none text-muted-foreground">
30+
31+
</p>
32+
</div>
33+
</DropdownMenuLabel>
34+
<DropdownMenuSeparator />
35+
<DropdownMenuGroup>
5536
<DropdownMenuItem>
56-
Log out
57-
<DropdownMenuShortcut>⇧⌘Q</DropdownMenuShortcut>
37+
Profile
38+
<DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>
5839
</DropdownMenuItem>
59-
</DropdownMenuContent>
60-
</DropdownMenu>
61-
)
62-
}
40+
<DropdownMenuItem>
41+
Billing
42+
<DropdownMenuShortcut>⌘B</DropdownMenuShortcut>
43+
</DropdownMenuItem>
44+
<DropdownMenuItem>
45+
Settings
46+
<DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
47+
</DropdownMenuItem>
48+
<DropdownMenuItem>New Team</DropdownMenuItem>
49+
</DropdownMenuGroup>
50+
<DropdownMenuSeparator />
51+
<DropdownMenuItem>
52+
Log out
53+
<DropdownMenuShortcut>⇧⌘Q</DropdownMenuShortcut>
54+
</DropdownMenuItem>
55+
</DropdownMenuContent>
56+
</DropdownMenu>
57+
);
58+
}

Diff for: components/ui/alert.tsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as React from "react"
2-
import { cva, type VariantProps } from "class-variance-authority"
1+
import * as React from "react";
2+
import { cva, type VariantProps } from "class-variance-authority";
33

4-
import { cn } from "@/lib/utils"
4+
import { cn } from "@/lib/utils";
55

66
const alertVariants = cva(
77
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
@@ -16,8 +16,8 @@ const alertVariants = cva(
1616
defaultVariants: {
1717
variant: "default",
1818
},
19-
}
20-
)
19+
},
20+
);
2121

2222
const Alert = React.forwardRef<
2323
HTMLDivElement,
@@ -29,8 +29,8 @@ const Alert = React.forwardRef<
2929
className={cn(alertVariants({ variant }), className)}
3030
{...props}
3131
/>
32-
))
33-
Alert.displayName = "Alert"
32+
));
33+
Alert.displayName = "Alert";
3434

3535
const AlertTitle = React.forwardRef<
3636
HTMLParagraphElement,
@@ -41,8 +41,8 @@ const AlertTitle = React.forwardRef<
4141
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
4242
{...props}
4343
/>
44-
))
45-
AlertTitle.displayName = "AlertTitle"
44+
));
45+
AlertTitle.displayName = "AlertTitle";
4646

4747
const AlertDescription = React.forwardRef<
4848
HTMLParagraphElement,
@@ -53,7 +53,7 @@ const AlertDescription = React.forwardRef<
5353
className={cn("text-sm [&_p]:leading-relaxed", className)}
5454
{...props}
5555
/>
56-
))
57-
AlertDescription.displayName = "AlertDescription"
56+
));
57+
AlertDescription.displayName = "AlertDescription";
5858

59-
export { Alert, AlertTitle, AlertDescription }
59+
export { Alert, AlertTitle, AlertDescription };

Diff for: components/ui/avatar.tsx

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
"use client"
1+
"use client";
22

3-
import * as React from "react"
4-
import * as AvatarPrimitive from "@radix-ui/react-avatar"
3+
import * as React from "react";
4+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
55

6-
import { cn } from "@/lib/utils"
6+
import { cn } from "@/lib/utils";
77

88
const Avatar = React.forwardRef<
99
React.ElementRef<typeof AvatarPrimitive.Root>,
@@ -13,12 +13,12 @@ const Avatar = React.forwardRef<
1313
ref={ref}
1414
className={cn(
1515
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
16-
className
16+
className,
1717
)}
1818
{...props}
1919
/>
20-
))
21-
Avatar.displayName = AvatarPrimitive.Root.displayName
20+
));
21+
Avatar.displayName = AvatarPrimitive.Root.displayName;
2222

2323
const AvatarImage = React.forwardRef<
2424
React.ElementRef<typeof AvatarPrimitive.Image>,
@@ -29,8 +29,8 @@ const AvatarImage = React.forwardRef<
2929
className={cn("aspect-square h-full w-full", className)}
3030
{...props}
3131
/>
32-
))
33-
AvatarImage.displayName = AvatarPrimitive.Image.displayName
32+
));
33+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
3434

3535
const AvatarFallback = React.forwardRef<
3636
React.ElementRef<typeof AvatarPrimitive.Fallback>,
@@ -40,11 +40,11 @@ const AvatarFallback = React.forwardRef<
4040
ref={ref}
4141
className={cn(
4242
"flex h-full w-full items-center justify-center rounded-full bg-muted",
43-
className
43+
className,
4444
)}
4545
{...props}
4646
/>
47-
))
48-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
47+
));
48+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
4949

50-
export { Avatar, AvatarImage, AvatarFallback }
50+
export { Avatar, AvatarImage, AvatarFallback };

Diff for: components/ui/button.tsx

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as React from "react"
2-
import { Slot } from "@radix-ui/react-slot"
3-
import { cva, type VariantProps } from "class-variance-authority"
1+
import * as React from "react";
2+
import { Slot } from "@radix-ui/react-slot";
3+
import { cva, type VariantProps } from "class-variance-authority";
44

5-
import { cn } from "@/lib/utils"
5+
import { cn } from "@/lib/utils";
66

77
const buttonVariants = cva(
88
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
@@ -31,27 +31,27 @@ const buttonVariants = cva(
3131
variant: "default",
3232
size: "default",
3333
},
34-
}
35-
)
34+
},
35+
);
3636

3737
export interface ButtonProps
3838
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
3939
VariantProps<typeof buttonVariants> {
40-
asChild?: boolean
40+
asChild?: boolean;
4141
}
4242

4343
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
4444
({ className, variant, size, asChild = false, ...props }, ref) => {
45-
const Comp = asChild ? Slot : "button"
45+
const Comp = asChild ? Slot : "button";
4646
return (
4747
<Comp
4848
className={cn(buttonVariants({ variant, size, className }))}
4949
ref={ref}
5050
{...props}
5151
/>
52-
)
53-
}
54-
)
55-
Button.displayName = "Button"
52+
);
53+
},
54+
);
55+
Button.displayName = "Button";
5656

57-
export { Button, buttonVariants }
57+
export { Button, buttonVariants };

0 commit comments

Comments
 (0)