This project encapsulates the Renegade Portal react website and backend server.
To Setup the project, clone the repo & run yarn install to download all the dependencies:
The first time you setup the repo after installing the dependencies you will want to do the initial build by running yarn build from the root directory
First start the database docker container locally by running: (Requires Docker to be installed)
To Start the backend server for development with hot-reloading run the following commands in 2 separate terminals which will start the server on http://localhost:3001:
Open a new terminal and run the following command to serve the react website with hot-reloading on http://localhost:3000
Open a new terminal and run the following command to serve the react website with hot-reloading on http://localhost:3000
To Start the sync service for development with hot-reloading run the following commands in 2 separate terminals which will start the server on http://localhost:3002: (Sync Service is required for Sending emails, pulling results from Orchard etc.)
In the terminal run the command yarn migration:create define-change-to-database. You would replace the "define-change-to-database" with an explanation of what you're changing. For example "add-users-types-table" or "add-name-to-users-table" etc.
After you run the command you should see a new migration file created in /server/src/lib/migrations
The file will have a timestamp added to the beginning of your definition, this allows the migration to run in a process of first to last which is important because if a migration is created that references a table that doesn't exist yet, it will cause issues, so the order in which you create migrations is important.
When installing dependencies you need to change directories into the 'server', 'web-provider' or 'web-patient' first folders before using yarn to add the dependency. This way it will only add the dependency to the appropriate application folder.
Export Server Config - STAGING cd ./server && yarn app-config create -s --environmentOverride staging -f json && cd ../
Export Sync Service Config - STAGING cd ./sync-service && yarn app-config create -s --environmentOverride staging -f json && cd ../
Export Server Config - PRODUCTION cd ./server && yarn app-config create -s --environmentOverride production -f json && cd ../
Export Sync Service Config - PRODUCTION cd ./sync-service && yarn app-config create -s --environmentOverride production -f json && cd ../