Simple Next.js Magic Link JWT Authentication with Prisma, PostgreSQL, and Resend
-
Clone the repository:
-
Install dependencies:
yarn install
-
Set up the environment variables:
- Copy the
.env.example
file to.env
:cp .env.example .env
- Open the
.env
file and fill in the necessary environment variables, including your PostgreSQL database URL
- Copy the
-
Set up Prisma and the database:
- Generate Prisma client:
yarn prisma generate
- Run migrations and seed initial data:
yarn prisma migrate dev
These commands will set up your database schema, apply all existing migrations, and populate the database with seed data.
- Generate Prisma client:
-
Start the development server:
yarn dev