- Project setup
- Available scripts
- Updating dependencies
- CI/CD
- Release process
- Feature Flags
- Testing
- Folder structure
- Naming convention
- Project vocabulary
- Tech stack
Add .env
file to the /apps/eodh-fe
dir. Ask your teammates about its content.
Run husky install
manually if you have problems with husky.
npm run start
- starting application in dev modenpm run build
- build production versionnpm run test
- run all testsnpm run test:unit
- run unit and integration testsnpm run test:storybook
- run storybook testsnpm run test:e2e
- run e2e testsnpm run lint:check
/npm run lint:fix
- running eslintnpm run format:check
/npm run format:fix
- running prettiernpm run code:check
/npm run code:fix
- eslint + prettiernpm run translation:extract
- generate translation keys fromeodh-fe
andlibs
npm run translation:type:generate
- generate interfaces for translations fromeodh-fe
andlibs
Run npx nx migrate
. This command will run nx migrate
underneath. (For more information visit NX documentation).
Do not update dependencies manually (instead use NX for that) due to different libraries versions problem.
GitHub's pipelines are used for ci/cd. Check .github
directory for more detailed information about pipeline configuration.
We use adjusted GitFlow
- instead of testing from feature branches, we do tests from development
branch.
Feature flags are described in docs/feature-flags.md
- Create
release
branch with releaseversion
, eg.v.1.0.0
.Release
branch should be created fromdevelop
branch. - If any fixes needed merge them into
release
branch. - Update
version
in package.json file. - Tag
version
ingit
:git tag v1.0.0
. - Merge
release
branch intomaster
branch. - Merge
master
branch intorelease
branch. This is a very important step! It has to be done otherwise history inmaster
anddevelop
branches will be different!
husky
is used for git hooks:
pre-push
- test and linters are required to passpre-commit
- conventional commit naming convention for commit message is required
All linters and tests has to pass on pipelines. Before sending any changes make sure you run those commands:
npm run test:unit
- check if all test passnpm run code:fix
- format code
- Run
npm run test
command to run tests for all project. - Run
npm run test:unit
command to run unit tests for all project. - Run
npm run test:storybook
command to run storybook tests for all project. - Run
npm run test:e2e
command to run e2e tests for all project.
vitest
is used as a test engine
There is no differentiation between unit and integration tests, all those tests are run by one command. Unit tests with mocks are used for more technical stuff like utility libraries. Integration tests are used for business scenarios.
Storybook tests are somewhere in between integration and e2e tests. They allow us test full flow of the application in the isolation.
E2E tests are used to test application end-to-end (using real data).
Folder structure in Marlin is described in docs/architecture.md
- kebab case
- each file should have its type as a suffix. Suffix is added after dot (eg: alert-list.component, use-filtering.hook). Simple files (eg model/content) doesn't require to have a suffix.
Package @typescript-eslint/naming-convention
is used for naming convention:
- interfaces should start with
I
letter - types should start with
T
letter - variables should be camelCase
- enums should be UPPER_CASE
Check @typescript-eslint/naming-convention
section in .eslint.json
file in root directory to see all rules.
Conventional commits convention is used as commits naming convention. Visit the conventional commits page to learn more.
- CWL - Common Workflow Language. Links: 2. Basics 3. Standard 4. CWL 1.2 5. User Guide
- STAC, links: 5. STAC Index 6. EODH STAC BROWSER 7. eodhp-ades-demonstration 8. Earth Observation Application Package 9. STAC API - Collection Search
Feature layer
- A page with routingUI layer
- Small featureData access layer
- API/data caching part of the applicationUtils layer
- utility librariesTheme layer
- theme configuration and utility functionsDesign System layer
- components related to design system
Dependencies and relations between layers are described in docs/architecture.md
This project uses nx as its primary build and run tool. NX is described in docs/nx.md
Other tools used:
npm
React.js
Eslint
/Prettier
- linting toolsVite
- js bundlerhusky
- library for running git hooks
Run npm run nx reset
if you have any problems with NX.