Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

README.md

TAXONOMY MODEL APP

About

This is the backend of the Taxonomy Model App.

Prerequisites

To develop the backend locally, you must install the following:

Technologies

Installation

To develop this application locally, follow these steps:

  1. Ensure you have the prerequisites installed before proceeding.

  2. Clone the repository

  3. Navigate to the backend directory:

    cd ./backend
    
  4. Install the project's dependencies:

    yarn install
    

    After running the above command, the postinstall script in the package.json will also run, and it will build and link the api-specifications dependency.

Running

The backend project can't be run locally.

It is specifically designed for deployment on AWS Lambda, utilizing pulumi for its construction. It is composed of aws, Lambda functions, which are not designed for local execution.

For more information check the IaC README

Testing

Unit Tests

To run the unit test cases for the application, execute the following command:

yarn test

Note:
Code coverage is generated based on the unit tests.

Integration Tests

To run the integration test cases for the application, execute the following command:

yarn test:integration

Note:
Integration tests do not generate code coverage.

Building

To build the backend application, execute the following command:

yarn build

Note: We are using esbuild to build the backend code.

It generates multiple bundles for the application, which can then be deployed to separate AWS Lambdas, see creating a .zip deployment package with no dependencies.

It uses tree-shaking, and bundles ESM and CJS modules, and the produced bundles contain all runtime dependencies, independently of where they are declared (e.g. in the dependencies or devDependencies section of the package.json file). However, we do declare the dependencies is the correct section for the shake of clarity and to avoid confusion.

Additionally, even though the AWS Lambda environment includes the AWS SDK, we still include it in the bundles to ensure that the correct version is used. By doing so, under the AWS shared responsibility model, we are responsible for the management of the dependency in our functions.

Linting

To run the linter, execute the following command:

yarn lint

OpenAPI Documentation

The OpenAPI documentation for the backend is generated using the Swagger-jsdoc library. The documentation is generated from comments annotated with @openapi. For additional information, see the generateOpenApiDoc.ts file.

The API documentation is available in both Swagger UI and Redoc.

To generate the documentation locally, you can use the following commands:

yarn generate:openapi
yarn generate:swagger
yarn generate:redoc

To view the documentation locally, run:

yarn local-server:openapi

Database Schema

The image below shows an overview of the Database Schema of the Taxonomy Model App.

Tabiya Database Schema

Import Export CSV format documentation

The import and export of the CSV format documentation can be found here

Construction of hierarchies

When constructing hierarchies (either occupation hierarchies or skill hierarchies) use the guide here

Contributing

Contributions are highly valued in this project.

In addition to the contribution guidelines mentioned in the parent directory, please follow these specific rules while working on the frontend project: