Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henchoznoe/nextauthtemplate
Basic authentication template using Next.js, NextAuth, Prisma and PostgreSQL. It uses the credentials provider.
https://github.com/henchoznoe/nextauthtemplate
nextauth nextjs postgresql prisma typescript
Last synced: 22 days ago
JSON representation
Basic authentication template using Next.js, NextAuth, Prisma and PostgreSQL. It uses the credentials provider.
- Host: GitHub
- URL: https://github.com/henchoznoe/nextauthtemplate
- Owner: henchoznoe
- Created: 2024-06-14T10:24:36.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-14T15:20:35.000Z (7 months ago)
- Last Synced: 2024-06-14T16:52:13.234Z (7 months ago)
- Topics: nextauth, nextjs, postgresql, prisma, typescript
- Language: TypeScript
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next.js Authentication Template
## Description
This project is a template for setting up authentication in a Next.js application using Next-Auth, Prisma, and PostgreSQL. It provides a solid foundation for quickly getting started with authentication best practices.## Prerequisites
- Node.js
- PostgreSQL database## Installation Steps
### 1. Clone the Repository
### 2. Install Dependencies
Install the necessary dependencies by running:
```bash
npm install
```### 3. Configure Environment Variables
Rename the .env.example file to .env and update the environment variables accordingly.### 4. Prisma Setup
Run the following command to push the Prisma schema to your database:
```bash
npx prisma db push
```
If you need to apply migrations (recommended for production setups), use:
```bash
npx prisma migrate dev --name init
```### 5. Run the Development Server
Start the development server with:
```bash
npm run dev
```## Usage
* Visit http://localhost:3000 in your browser.
* Signup and login with an account.