Skip to content

Mono-repo for the Tupaia project, mapping health data across the Pacific

License

Notifications You must be signed in to change notification settings

beyondessential/lesmis-tupaia

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tupaia

Codeship Status for beyondessential/tupaia#dev

This is a mono-repo

It is set up using yarn workspaces, meaning any command you would normally run inside a package can be run from the root directory using yarn workspace @tupaia/package-name command, e.g. yarn workspace @tupaia/central-server start-dev

Packages

The easiest way to open the packages in vscode is to double click 'tupaia-packages.code-workspace'. This opens all packages as roots in the workspace, and means linting etc. will work correctly.

Main packages

Any of the main packages can be run using yarn workspace @tupaia/package-name start-dev. In the case of the two servers, this will also build and watch all of the internal dependencies, so that hot reload detects changes to other packages within the mono-repo. As this delays startup time, if you prefer to pre-build internal dependencies, add --skip-internal to the above command.

Internal dependencies

Getting started

Secrets

Most packages will require a .env file. .env.example files indicate the required variables per package.

🔑 BES internal: Adding .env files

Local database

🔑 BES internal: Tupaia monorepo setup - steps 4 and 5

Dependencies

We use yarn workspaces to manage our packages, which allows us to run yarn once at the project root, and it will install dependencies everywhere.

CI/CD

We use codeship for the CI/CD

🔑 BES internal: CI/CD using Codeship

Tests

Most of the packages support the following scripts for testing:


yarn test
yarn test:coverage # also displays code coverage

Style Guide

We use a combination of ESlint configs to detect quality and formatting issues in code:

The config for this repository is defined in .eslintrc under the root folder. Additional rules/overrides per package are specified in this file.

⚠️ Please do not use individual eslint configs, but update the main configuration file instead.

Auto-formatting in Visual Studio Code

In order to automatically format code in VSCode according to our style guide:

  1. Install Prettier for VSCode
  2. Enable the Editor: Format on Save setting
  3. Your files will now be formatted automatically when you save them

About

Mono-repo for the Tupaia project, mapping health data across the Pacific

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 87.1%
  • TypeScript 9.2%
  • PLpgSQL 2.2%
  • Python 0.7%
  • Shell 0.5%
  • HTML 0.2%
  • Other 0.1%