Skip to content

sangdth/nextjs-starter

Repository files navigation

Next.js 14 Admin Dashboard Starter Template With Shadcn-ui
Built with the Next.js App Router

Overview

This is a starter template using the following stack:

If you are looking for a React admin dashboard starter, here is the repo.

Pages

Pages Specifications
Signup Authentication with NextAuth supports Social logins and email logins (Enter dummy email for demo).
Dashboard Cards with recharts graphs for analytics.
Employee Tanstack tables with server side searching, filter, pagination by Nuqs which is a Type-safe search params state manager in nextjs).
Employee/new A Employee Form with shadcn form (react-hook-form + zod).
Product Tanstack tables with server side searching, filter, pagination by Nuqs which is a Type-safe search params state manager in nextjs
Product/new A Product Form with shadcn form (react-hook-form + zod).
Profile Mutistep dynamic forms using react-hook-form and zod for form validation.
Kanban Board A Drag n Drop task management board with dnd-kit and zustand to persist state locally.
Not Found Not Found Page Added in the root level
- -

Getting Started

For Development

  • We use pnpm package manager. Get it here.
  • Make sure Docker up and running.
  • If your Docker account has 2FA enabled, you have to create a Personal Access Token and login before:
    • Follow this guide.
    • Login with docker login --username <your-username>

Clone the project

You can either use this template by:

  • Click the "Use this template" button and follow the instruction
  • Or using the script below:
pnpm dlx tiged sangdth/nextjs-starter your-project

Install dependencies

cd your-project
pnpm install

Setup environment variables

For the first time, you need some default environment variables:

cp .env.example .env

Then, run the development server:

pnpm dev

Then, run the development server:

pnpm dev

Setup Prisma

NOTE: The dev server need to be running, because we need Postgres instance.

Sometimes, for example in fresh database situation when you have just started:

pnpm prisma migrate dev

Create New Component

We use shadcn-ui in this stack, and create 2 helper scripts for you:

# for adding new component
pnpm ui:add <compnent-name>

# for checking diffs
pnpm ui:diff <component-name>

Start developing!

Open http://localhost:3000 with your browser and start developing.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6