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
This framework is built as a monorepo for ease of development. It uses Lerna 6. Standard lerna commands for building and publishing are applicable.
- 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.
- 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.
- lib/* contains common libs used across topcoder services.
- NodeJS 18+
- Yarn 1.22+
- Lerna 6+
- Install dependencies.
yarn i
Running the above command in the workspace will ensure each of the packages have all of their dependencies installed.
- See
scripts/packages/*
for package level commands such as building and linting. Seescripts/workspace/*
for workspace level commands.
- See
publishConfig
in package.json for details on the registry the packages are published to. Currently AWS CodeArtifact is used. - 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