React frontend for UMCCR Data Portal API
- See build specification
buildspec.yml
reference 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 toDEV
account environment. - The staging branch is
stg
. Any merges are CI/CD toSTG
account environment. - The
main
branch is production. Any merges are CI/CD toPROD
account environment.
-
Typically, make your feature branch out from
dev
to work on your story point. Then please submit PR todev
. -
Upon finalising release, create PR using GitHub UI from
dev
tostg
or; fromstg
tomain
accordingly. -
Merge to
stg
should be fast-forward merge fromdev
to maintain sync and linearity as follows:
git checkout stg
git merge --ff-only dev
git push origin stg
- Merge to
main
should be fast-forward merge fromstg
to 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 audit
for 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 > resolutions
node as Selective Dependency Resolutions condition explained here.
NOTE: We use pre-commit. It will guard and enforce static code analysis such as
lint
and any securityaudit
via 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-verify
flag.
git config --unset core.hooksPath
pre-commit install
pre-commit run --all-files