Template for project structure with nextjs 14 - next auth - directus and typescript
MIT License
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.
Make sure you have the following installed before running the project:
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
To run the project in a development environment, use the following command:
npm run dev
The project will be available at http://localhost:3000.
To build and run the project in a production environment, use the following commands:
npm run build
npm start