Skip to content

Provides a curated, searchable list of pharmaceutical products, each with an immutable code. A GraphQL API, a REST API and website are available for interaction with the database.

Notifications You must be signed in to change notification settings

msupply-foundation/unified-codes

Repository files navigation

Universal Codes

Welcome! This is Universal Codes!

This is a responsive web application over a GraphQL API.

It is built using Typescript and Rust, with a React Frontend and a DGraph database. The code is heavily 'borrowed' Notify

The test framework is jest; functional areas are separated into packages and managed with lerna

Usage

Frontend

  1. Start the frontend: yarn start-frontend

Testing

  • Unit tests across frontend and the backend:
    • yarn test
  • Test frontend:
    • yarn test-frontend
  • Test backend (unit tests):
    • yarn test-backend
  • Integration tests:
    • yarn test-integration

Other scripts

  • Generate GraphQL Types:
    • yarn generate

Build and release

We will need to make some updates to our release scripts since the code rearrange, and for the new frontend, but we'll cross that bridge when we get there :)

Git hooks

The prepare script enables Husky, which we use for our git hooks. It only needs to be run once to be configured.

The prepare script should run automatically on post-install (after yarn install). If need be, you can also run it manually with yarn prepare.

Development

  • master branch - is the stable release branch
  • develop branch - the main development branch

When developing, create an issue first then a branch based on the issue number. Current practice is to use the format #[issue number]-some-description for the branch name. When ready, create a PR which targets develop and when approved, merge to develop. We aim to review PRs promptly and keep the PR list as low as possible as a kindness to other developers ( and reduce merge hell! )

Wiki

There is also a extensive wiki which we may need to update the live system.

https://github.com/msupply-foundation/unified-codes/wiki/

About

Provides a curated, searchable list of pharmaceutical products, each with an immutable code. A GraphQL API, a REST API and website are available for interaction with the database.

Topics

Resources

Stars

Watchers

Forks