This project is built using NestJS, featuring a complete authentication system implemented with Prisma and PostgreSQL for logging in. It incorporates class-validator for DTO validation and utilizes JWT tokens and refresh tokens for authentication.
-
Clone the repository:
git clone https://github.com/Matheuscara/nest-auth.git
-
Navigate to the project directory:
cd Nest-Auth
-
Install dependencies:
npm install
-
Initialize Prisma:
npx prisma init
-
Run database migrations:
npx prisma migrate dev
-
Install Prisma provider to verify the database (optional):
npx prisma studio
-
Configure your database environment variables. Refer to the Prisma documentation for guidance on managing environment variables and setting up your
.env
file. -
Run Dockerfile (if applicable).
To start the development server, use the following command:
npm run start:dev
Make sure you have Docker installed and running if you plan to utilize Dockerfile.