To be able to start both backend and frontend locally you will need to:
- Install all needed dependencies with
npm install
- Start the application using
npm run dev
ornpm run start
If .env file is not preset during startup of the project, it will be created using example.env file template
The example.env
and .env
files are located in apps/backend
and apps/frontend
accordingly.
If you want to get something running for testing purposes only, you can run the docker compose file located at the root of the repository. Use the following steps:
- docker compose up
- For core visit localhost:3000
- For scheduler visit localhost:33000
- Use the default users for login, [email protected] (User Officer) or [email protected] (User) with password "Test1234!"
Plan on how to continue with the monorepo in the future:
- Start adding the shared libraries like: shared-types, validation and others that need to be shared between different apps (example here: https://github.com/martin-trajanovski/user-office-core-monorepo). It requires craco tool for building react apps that have sources outside src folder. This will cleanup the frontend app a lot because we can move all graphql files and scripts in the shared-types lib and validation will simplify things a lot if added directly as part of the monorepo libs.
In the project directory, you can run:
Runs the app in the development mode.
- Open http://localhost:4200 to view the GraphQL playground and schema in the browser.
- Open http://localhost:33000 to view the app in the browser.
- Open http://localhost:4100 to view the federated(core + scheduler) GraphQL playground and schema in the browser.
- Open http://localhost:3000 to view the core app in the browser.
Lints typescript code and log if there are any errors.
npm run lint:fix
should be used if you want to fix all auto-fixable errors and warnings.
Please refer to the Contribution guide to get information about contributing and versioning.
Happy coding! 👨💻