Skip to content

Architecture

Alexis Araujo edited this page Jun 1, 2020 · 9 revisions

REST API

The app has a layered architecture and modular.

Authentication

This layer management the authentication. The api use basic authentication and api key for sing in and generate a JSON Web Token (jwt). All routes use bearer token authentication. This layer maintain high security, and can be improved without affecting the routes.

Routes

This layer management the endpoints. This is modular, each endpoint is independent. Allowed routes are:

/api/auth

This route handles authentication.

/api/users

This route handles users.

/api/exams

This route handles enables medical exams.

/api/orders

This route handles patients orders.

/api/results

This route handles results of test.

/api/pdfs

This route handles test results pdf.

/api/messages

This route handles messages.

Validation

Boom and Mongoose

Mongoose and boom are libraries that are used to validate schemas and handle errors.

Services

The structure of the files respected the principle of sole responsability.

This design pattern that is scalable and optimized

Data

We are using Mongo Atlas cloud as a one as single layer to optimized and is scalable.

Sentry used capture all our errors.