kyrylo-1 / Help-desk

Help desk web app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help-desk

How to setup locally?

  • go to "help-desk-client" folder -> run "npm i"
  • go to "Help-desk.API/Help-desk.API" folder -> run "dotnet run"
  • go to "help-desk-client" folder -> run "npm run start"

To Run Unit tests:

  • go to "Help-desk.API/HelpDesk.API.Tests" folder -> run "dotnet test"

Design overview

Schema

Explanation of major components

  • Database has 2 tables: User and Ticket. Those tables represented as models in my Asp.net core web api

Authentication

  • In order to register user, AuthController makes a POST request with name and password and returns a token
  • Token is signed by secret key. Every time request hits UserController endpoint, Entity Framework verifies that this token is valid
  • During login, program fetch from db user's passwordHash and passwordSalt, computes them and verifies with provided password

Security

  • It a role base application, so when user login, application gets his role for allowing or restricting certain functionality. Restriction happens in the web api and on the client as well.
  • Web api can send BadRequest or Unauthorized
  • Examples of restrictions on frontend: HelpDeskUser can't delete ticket and can't see tickets from all users. TeamMember can't add tickets

Client React app screenshot

Snapshot

Improvements to do:

  • add tests
  • format ticket's date on client

About

Help desk web app


Languages

Language:C# 56.2%Language:JavaScript 33.6%Language:CSS 9.2%Language:HTML 1.0%