Skip to content

DailyDisco/next-js-architecture-template

Repository files navigation

What is this?

This is a template to help create a Next.js project with NextAuth.js and Prisma from scratch quickly.

What's included?

Why?

I wanted to create a template that was easy to use and had everything I needed to get started with a new project.

The project began with Typescript, TailwindCSS, and Next JS, to help me development begin quickly and securely. Husky, ESLint, Prettier, were then added to help keep the code and commit history clean and readable whether working solo, or in a group.

Prisma, ZOD, and tRPC were added after reviewing the "T3 Stack". Prisma is a great ORM which supports various DBs, ZOD is a schema validation library, and tRPC is a great Typesafe API routing library.

Getting Started

Create a .env file with these variables: DATABASE_URL="file:./dev.db"

NextAuth.js

NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET=""

NextAuth.js Providers

Discord Login (Example)

DISCORD_CLIENT_ID="" DISCORD_CLIENT_SECRET=""

Run NPM Install

npm install
# or
yarn

Run the development server:

npm run dev
# or
yarn dev

Open [http://localhost:3000]

Open http://localhost:3000 with your browser to see the result.

Commit Messages

This project uses commitlint to enforce commit message conventions. This helps to keep the commit history clean and readable.

Use the following commit message format: Ex: fix: commit message

[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
'translation',
'security',
'changeset',
],

Notes

To destructure objects, use the following example format:

    { variable1 } : { variable1: string }
    // or
    { variable1, variable2 } : { variable1: string, variable2: string }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published