pintoderian / next-directus-auth-ts

Template for project structure with nextjs 14 - next auth - directus and typescript
MIT License
46 stars 5 forks source link
admin adminui dashboard dashboard-templates directus directus-sdk husky javascript next-auth next-theme nextjs nextjs14 prettier shadcn-ui tailwindcss template typescript

Simple Dashboard Template with Next.js 14, Tailwind CSS, NextAuth.js, and Directus

This project is a starting point for building a modern web dashboard using a robust technology stack. It provides you with the basic structure and tools necessary to kickstart the development of your own dashboard application.

Screenshots

Login Page

Login page

Light mode

Light mode

Dark mode

Dark mode

Sheet menu

Key Features

Technologies Used

Requirements

Make sure you have the following installed before running the project:

Configuration

Clone the repository:

git clone https://github.com/pintoderian/next-directus-auth-ts.git
cd your-project

Install dependencies:

npm run install

Prepare husky:

npm run prepare

Configure environment variables: Create a .env.local file at the root of the project and define the necessary environment variables. Here's an example:

NEXT_PUBLIC_DIRECTUS_API=
NEXTAUTH_SECRET=
NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_SITE_NAME="Acme Inc"
NEXT_PUBLIC_SITE_DESCRIPTION="Lorem, ipsum dolor sit amet consectetur adipisicing elit."

Command for NEXTAUTH_SECRET

openssl rand -base64 32

Running the Project

To run the project in a development environment, use the following command:

npm run dev

The project will be available at http://localhost:3000.

Production

To build and run the project in a production environment, use the following commands:

npm run build

npm start

If you like my work, consider buying me a coffee!

Ko-fi