-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
143 changed files
with
20,538 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Next auth https://next-auth.js.org/configuration/options | ||
# Run this command to generate a a new NEXTAUTH_SECRET | ||
# $ openssl rand -base64 32 | ||
|
||
NEXTAUTH_URL = http://localhost:3000 | ||
NEXTAUTH_SECRET=TOBEMODIFIED | ||
|
||
# Go to github and setup the oauth configuration | ||
# https://next-auth.js.org/providers/github#configuration | ||
# https://github.com/settings/developers | ||
|
||
GITHUB_ID = TOBEMODIFIED | ||
GITHUB_SECRET = TOBEMODIFIED | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"extends": "next/core-web-vitals", | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }], | ||
"import/no-unresolved": "error", | ||
"import/named": "off", | ||
"no-console": "warn" | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"typescript": { | ||
"project": "./tsconfig.json" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"semi": true, | ||
"useTabs": false, | ||
"trailingComma": "none", | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"endOfLine": "lf", | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"useTabs": true, | ||
"semi": true, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true, | ||
"quoteProps": "as-needed", | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"bracketSameLine": false, | ||
"printWidth": 300, | ||
"tabWidth": 4, | ||
"plugins": [ | ||
"@trivago/prettier-plugin-sort-imports" | ||
], | ||
"importOrder": [ | ||
"^node_modules/(.*)$", | ||
"^@/(.*)$", | ||
"^[./]" | ||
], | ||
"importOrderSeparation": false, | ||
"importOrderSortSpecifiers": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,65 @@ | ||
# beresin-next-frontend-dashboard | ||
Frontend Web for Admin Dashboard BeresIn | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/9113740/201498864-2a900c64-d88f-4ed4-b5cf-770bcb57e1f5.png"> | ||
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/9113740/201498152-b171abb8-9225-487a-821c-6ff49ee48579.png"> | ||
</picture> | ||
|
||
<div align="center"><strong>Next.js 14 Admin Dashboard Starter Template With Shadcn-ui</strong></div> | ||
<div align="center">Built with the Next.js App Router</div> | ||
<br /> | ||
<div align="center"> | ||
<a href="https://next-shadcn-dashboard-starter.vercel.app">View Demo</a> | ||
<span> | ||
</div> | ||
|
||
## Overview | ||
|
||
This is a starter template using the following stack: | ||
|
||
- Framework - [Next.js 14](https://nextjs.org/13) | ||
- Language - [TypeScript](https://www.typescriptlang.org) | ||
- Styling - [Tailwind CSS](https://tailwindcss.com) | ||
- Components - [Shadcn-ui](https://ui.shadcn.com) | ||
- Schema Validations - [Zod](https://zod.dev) | ||
- State Management - [Zustand](https://zustand-demo.pmnd.rs) | ||
- Search params state manager - [Nuqs](https://nuqs.47ng.com/) | ||
- Auth - [Auth.js](https://authjs.dev/) | ||
- Tables - [Tanstack Tables](https://ui.shadcn.com/docs/components/data-table) | ||
- Forms - [React Hook Form](https://ui.shadcn.com/docs/components/form) | ||
- Linting - [ESLint](https://eslint.org) | ||
- Pre-commit Hooks - [Husky](https://typicode.github.io/husky/) | ||
- Formatting - [Prettier](https://prettier.io) | ||
|
||
_If you are looking for a React admin dashboard starter, here is the [repo](https://github.com/beresindev/beresin-nextjs-frontend-dashboard.git)._ | ||
|
||
## Pages | ||
|
||
| Pages | Specifications | | ||
| :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------- | | ||
| [Signup](https://next-shadcn-dashboard-starter.vercel.app/) | Authentication with **NextAuth** supports Social logins and email logins (Enter dummy email for demo). | | ||
| [Dashboard](https://next-shadcn-dashboard-starter.vercel.app/dashboard) | Cards with recharts graphs for analytics. | | ||
| [Employee](https://next-shadcn-dashboard-starter.vercel.app/dashboard/employee) | Tanstack tables with server side searching, filter, pagination by Nuqs which is a Type-safe search params state manager in nextjs). | | ||
| [Employee/new](https://next-shadcn-dashboard-starter.vercel.app/dashboard/employee/new) | A Employee Form with shadcn form (react-hook-form + zod). | | ||
| [Product](https://next-shadcn-dashboard-starter.vercel.app/dashboard/product) | Tanstack tables with server side searching, filter, pagination by Nuqs which is a Type-safe search params state manager in nextjs | | ||
| [Product/new](https://next-shadcn-dashboard-starter.vercel.app/dashboard/product/new) | A Product Form with shadcn form (react-hook-form + zod). | | ||
| [Profile](https://next-shadcn-dashboard-starter.vercel.app/dashboard/profile) | Mutistep dynamic forms using react-hook-form and zod for form validation. | | ||
| [Kanban Board](https://next-shadcn-dashboard-starter.vercel.app/dashboard/kanban) | A Drag n Drop task management board with dnd-kit and zustand to persist state locally. | | ||
| [Not Found](https://next-shadcn-dashboard-starter.vercel.app/dashboard/notfound) | Not Found Page Added in the root level | | ||
| - | - | | ||
|
||
## Getting Started | ||
|
||
Follow these steps to clone the repository and start the development server: | ||
|
||
- `https://github.com/beresindev/beresin-nextjs-frontend-dashboard.git` | ||
- `npm install` | ||
- Create a `.env.local` file by copying the example environment file: | ||
`cp env.example.txt .env.local` | ||
- Add the required environment variables to the `.env.local` file. | ||
- `npm run dev` | ||
|
||
You should now be able to access the application at http://localhost:3000. | ||
|
||
> [!WARNING] | ||
> After cloning or forking the repository, be cautious when pulling or syncing with the latest changes, as this may result in breaking conflicts. | ||
Cheers! 🥂 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "new-york", | ||
"rsc": true, | ||
"tsx": true, | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "app/globals.css", | ||
"baseColor": "zinc", | ||
"cssVariables": true | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Next auth https://next-auth.js.org/configuration/options | ||
# Run this command to generate a a new NEXTAUTH_SECRET | ||
# $ openssl rand -base64 32 | ||
|
||
NEXTAUTH_URL = http://localhost:3000 | ||
NEXTAUTH_SECRET= | ||
|
||
# Go to github and setup the oauth configuration | ||
# https://next-auth.js.org/providers/github#configuration | ||
# https://github.com/settings/developers | ||
|
||
GITHUB_ID = | ||
GITHUB_SECRET = | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Protecting routes with next-auth | ||
// https://next-auth.js.org/configuration/nextjs#middleware | ||
// https://nextjs.org/docs/app/building-your-application/routing/middleware | ||
|
||
import NextAuth from 'next-auth'; | ||
import authConfig from './src/auth.config'; | ||
|
||
const { auth } = NextAuth(authConfig); | ||
|
||
export default auth((req) => { | ||
if (!req.auth) { | ||
const url = req.url.replace(req.nextUrl.pathname, '/'); | ||
return Response.redirect(url); | ||
} | ||
}); | ||
|
||
export const config = { matcher: ['/dashboard/:path*'] }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
images: { | ||
remotePatterns: [ | ||
{ | ||
protocol: 'https', | ||
hostname: 'utfs.io', | ||
port: '' | ||
}, | ||
{ | ||
protocol: 'https', | ||
hostname: 'api.slingacademy.com', | ||
port: '' | ||
} | ||
] | ||
}, | ||
transpilePackages: ['geist'] | ||
}; | ||
|
||
module.exports = nextConfig; |
Oops, something went wrong.