Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 2.63 KB

README.md

File metadata and controls

45 lines (27 loc) · 2.63 KB

Topcoder Framework

This is a library that puts together common functionality used across the various topcoder services. Currently it's primarily used by services that use data access layer

  1. dynamo-access-layer
  2. domain-challenge
  3. anticorruption-layer

This framework is built as a monorepo for ease of development. It uses Lerna 6. Standard lerna commands for building and publishing are applicable.

  1. domains/* contains gRPC interfaces built for each of the relevant domain that can be used in a service to make gRPC calls to the domain gRPC service. For example, challenge API uses domain-challenge to make gRPC calls to domain-challenge gRPC service.
  2. clients/client-relational provides a database agnostic interface to make relational quries. Any service can imnport @topcoder-framework/client-relational and perform database operations using the relational interface. At present we only have an implementation for Informix. As long as the gRPC service implements the advertised interface, the consumer service doesn't care about the underlying database. This ensures the service is completely agnostice of the underlying database. The Informix Access Layer could be replaced with a postgres access layer for example, and everything would continue to work without any upstream code changes.
  3. lib/* contains common libs used across topcoder services.

Local Setup

Dependencies

  1. NodeJS 18+
  2. Yarn 1.22+
  3. Lerna 6+

Local Development

  1. Install dependencies.
yarn i

Running the above command in the workspace will ensure each of the packages have all of their dependencies installed.

  1. See scripts/packages/* for package level commands such as building and linting. See scripts/workspace/* for workspace level commands.

Publishing

  1. See publishConfig in package.json for details on the registry the packages are published to. Currently AWS CodeArtifact is used.
  2. To publish, ensure all updates are commited and ensure you have a valid AWS session, and then run the following command
lerna publish --loglevel verbose --registry https://topcoder-409275337247.d.codeartifact.us-east-1.amazonaws.com/npm/topcoder-framework/ from-package