This project was generated using Nx.
🔎 Smart, Fast and Extensible Build System
We should create a new branch for each small task and then create a Pull request to dev
branch once the task is done.
Never push code to the main
branch since it will be use for production only.
Also do not spend many days without creating a PR for your branch otherwise we may have many merge conflicts to solve in order to merge your branch.
There are 3 projects in this monorepo:
-
web
(the web frontend application with react) -
mobile
(the react native application) -
api
(The backend graphQL api)
To lunch the app run:
yarn start:web
for web appyarn start:mobile
for metro bundleryarn start:ios
to run iosyarn start:android
to run androidyarn start:api
oryarn start
for the api
We can create multiple applications and libraries in the same workspace. But since the 3 applications are already created the only elements you may need to create is a library.
We create library when we want to have a code (type, utils function, style, ...) that we may need to share between our 3 medixbot projects (api, web, mobile).
Run nx g @nrwl/react:lib my-lib
to generate react a library.
Run nx generate @nrwl/js:library --name=my-lib
to generate typescript a library.
I recommend you to use the nx console
extension for vscode. It is a graphical version gor managing the monorepo.
The libraries created can be imported from @medixbot/mylib
.
Run nx g @nrwl/react:component my-component --project=my-app
to generate a new react component.
Run nx build my-app
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run nx e2e my-app
to execute the end-to-end tests via Cypress.
Run nx affected:e2e
to execute the end-to-end tests affected by a change.
Run nx graph
to see a diagram of the dependencies of our projects.
Visit the Nx Documentation to learn more.