Skip to content

NestJS and GraphQL based project simulating an account service with permission control

Notifications You must be signed in to change notification settings

henriqueweiand/nestjs-account-graphql

Repository files navigation

Nestjs-account-graphql

NestJS and GraphQL based project simulating an account service with permission control

Watch the video

Schema

Watch the video

Features

  • ✅ CRUD Account with relations roles
  • ✅ CRUD Roles with relations actions
  • ✅ CRUD Actions
  • ✅ Login ➡ generate JWT
  • ✅ JWT Guard

Requirements

  1. Database
  2. Configure ormconfig.json file with database data
  3. Install dependencies yarn install
  4. Copy .env.example to .env

Setup

  1. Run project yarn start:dev
  2. Access http://localhost:3000/graphql
  3. Create a account
  4. Access login route
  5. Set header token for use other routes
{
  "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijc5YTdhNjgwLTRlMWYtNDU5OC1hNjk1LTExNWEwZTkxM2JlYyIsImVtYWlsIjoiaGVucmlxdWV3ZWlhbmRAZ21haWwuY29tIiwiaWF0IjoxNTg2NjE3OTY1LCJleHAiOjE1ODY2MjE1NjV9.Sqv24CLalMw1YiTeAsPDKeuchIMSHii-N64RMVBV0f8"
}

Changelog project

  • Module account
  • Add AuthGuard on routes
  • Add authentication methods
  • Module Roles
  • Module Actions
  • Add exceptions
  • Tests for all features

About

NestJS and GraphQL based project simulating an account service with permission control

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published