React frontend for UMCCR Data Portal API
- See build specification
buildspec.ymlreference for AWS CodeBuild
NOTE: Here, we use GitOps and, release to deployment environments are all tracked by long-running Git branches as follows.
- The default branch is
dev. Any merges are CI/CD toDEVaccount environment. - The staging branch is
stg. Any merges are CI/CD toSTGaccount environment. - The
mainbranch is production. Any merges are CI/CD toPRODaccount environment.
-
Typically, make your feature branch out from
devto work on your story point. Then please submit PR todev. -
Upon finalising release, create PR using GitHub UI from
devtostgor; fromstgtomainaccordingly. -
Merge to
stgshould be fast-forward merge fromdevto maintain sync and linearity as follows:
git checkout stg
git merge --ff-only dev
git push origin stg
- Merge to
mainshould be fast-forward merge fromstgto maintain sync and linearity as follows:
git checkout main
git merge --ff-only stg
git push origin main
node -v
v20.17.0
npm i -g yarn
(NOTE: yarn should auto resolve to local version from `.yarn` that configure in `package.json` > `packageManager`)
yarn -v
4.5.0
yarn install
aws sso login --profile dev
export AWS_PROFILE=dev
yarn start
(CTRL+C to stop the dev server)
See htsget/README for local dev htsget server setup
- Run prettier:
yarn prettier - Fix prettier:
yarn prettier-fix
- Run eslint:
yarn lint - See eslint help:
yarn lint --help
- Run
yarn auditfor package security vulnerabilities - Recommend fixing/updating any package with direct dependencies
- If vulnerabilities found in transitive dependency, but it has yet to resolve, then list them in
package.json > resolutionsnode as Selective Dependency Resolutions condition explained here.
NOTE: We use pre-commit. It will guard and enforce static code analysis such as
lintand any securityauditvia pre-commit hook. You are encouraged to fix those. If you wish to skip this for good reason, you can by-pass Git pre-commit hooks by usinggit commit --no-verifyflag.
git config --unset core.hooksPath
pre-commit install
pre-commit run --all-files