An open API service indexing awesome lists of open source software.

https://github.com/amirardalan/startup

A Next.js App Router starter project with TypeScript, Tailwind, NextAuth, Zustand, OG meta tags, and Dark Mode.
https://github.com/amirardalan/startup

app-router authjs clsx nextjs prettier tailwindcss typescript zustand

Last synced: 27 days ago
JSON representation

A Next.js App Router starter project with TypeScript, Tailwind, NextAuth, Zustand, OG meta tags, and Dark Mode.

Awesome Lists containing this project

README

          

# Startup

This is a [Next.js](https://nextjs.org/) App Router project with various features and utilities to quickly bootstrap a web app.

### Features

- Autentication with [Auth.js](https://authjs.dev/getting-started/installation?framework=next-js)
- State management with [Zustand](https://github.com/pmndrs/zustand)
- Light, Dark, and System Theme toggle
- Prettier code formatting with [Tailwind plugin](https://tailwindcss.com/blog/automatic-class-sorting-with-prettier)
- [CLSX](https://github.com/lukeed/clsx) for improved logic within `className`
- Next.js [optimized fonts](https://nextjs.org/learn/dashboard-app/optimizing-fonts-images)
- Dynamic theme-based favicon
- Dynamic Metadata and Page Titles
- Route-based active navigation highlighting
- Dynamic footer copyright date
- Tooltip component
- [OG Image](https://vercel.com/docs/functions/og-image-generation) metadata
- Dynamically-generated [sitemap.xml](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap)

## Getting Started

### Setup

```bash
npm install
```

Then, set up your [GitHub oAuth App](https://authjs.dev/getting-started/providers/github?framework=next-js) and add your GitHub Client ID and Secret in a `.env.local` file:

```
// .env.local
NEXT_PUBLIC_APP_URL="http://localhost:3000"

AUTH_GITHUB_ID=
AUTH_GITHUB_SECRET=

AUTH_TRUST_HOST=NEXT_PUBLIC_APP_URL
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=
```

And finally, generate a Next Auth secret which will automatically overwrite the placeholder in the `.env.local` file:

```bash
npx auth secret
```

### Run

```bash
npm run dev
```