Skip to content

Folder Structure

ahmedazz260 edited this page May 9, 2021 · 1 revision

Folder Structure in pbrn-users/src

Config

Contains error status code and error formatter

Controllers

Contains the logic for user and user authentication once a route is called

Database

  • Contains atomic apporation
  • User Model
  • Connection Setup

Interface

Contains the interface of the user Model

Middleware

Contains the logic that is used to make sure the token is valid when a request is made

Routes

Contains all the API's call path for user and user authentication

Services

Logic used to send emails when:

  • Password reset/change
  • Admin approving a user by clicking on a link
  • User himself receive a message to approve his account creation

Utils

Contains the logic to hash the password

Validators

Contains the logic to validate the parameters that are sent when an API's request is made

Clone this wiki locally