This repo contains the Angular-based UI for the Starter UI app. This README file details everything you need to know about this project.
- Node 14.17.0
- Angular CLI 12.0.0
- Docker 20.10.6, build 370c289
- Docker Compose 1.29.1, build c34c88b2
The following instructions assumes that you are attempting to setup the project on an Ubuntu 20.04 machine. The responsibility of making necessary adjustments to the steps below rests on the follower of these instructions.
- Setup Docker
- Setup Docker Compose
- Setup Node using NVM
- Setup Angular CLI globally
npm install -g @angular/cli
- Create the new project with
ng new starter-ui
and use the following options for configuration:-- Would you like to add Angular routing? Yes
- Which stylesheet format would you like to use? SCSS
- Enter the project folder with
cd
- Build and tag a Docker image with
docker build -t starter-ui:dev .
- Spin up the Docker container with
docker run -v ${PWD}:/app -v /app/node_modules -p 4201:4200 --rm starter-ui:dev
- The application should be available on
https://localhost/4201
- The application should be available on
- Install Scully with
npm install @scullyio/init
- Build the app with
ng build
- Run scully with
npm run scully
- Test the build with
npm run scully serve
- Once tested successfully, go to Netlify dashboard and create a new site from git and connect the Git branch that needs to be deployed. Use the following configuration:-
- Leave the base directory field empty
- publish directory should be
dist/static/
- Build command should be
npm run build
, which actually runsrm dist -rf && ng build --prod && npm run scully && git add . && git commit -m'Rebuild and deploy' && git push origin scully
- Set the
Build image
field underBuild & Deploy
to "Ubuntu Xenial 16.04". By default this would be "Ubuntu Focal 20.04" or whichever is the latest version of Ubuntu, but this would create issues with Puppeteer. Setting it to 16.04 averts the issue. - Trigger a deploy and it should work.
- We're recognizing User Groups through User Roles and they are identified not by the id of the User Role record, but by name. So the names of the User Roles need to be constant and standard. They're stored in the UI in the
shared/common/constants.ts
file and the same object can be found in teh API in thecommon.constants.py
. So when creating these User Roles in the DB for the first, the same names must be used as in these constants files.