A front-end to interact with the fan and the display its status and settings.
Ideally use these Government of Nova Scotia UI frameworks Forms & Services Building Blocks Pattern Library
A back-end to handle the logic for operating the fan as follows:
- The fan has two pull cords:
- One to increase the speed each time it is pulled. 0, 1, 2, 3 speeds
- If pulled on speed 3, returns to 0 (“off”)
- One to reverse direction at the current speed setting
- Remain in same direction as speeds are cycled, until reversed again
Please note the Following instructions are for a linux distro. Instructions on other operating system might vary.
Requires following to be installed on the machine.
- git (latest)
- docker - version 20.10.16 or higher
- docker-compose - version 1.29.2 or higher
- git clone ns-ceiling-fan monorepo
git clone https://github.com/dinbtechit/ns-ceiling-fan.git
- cd into the cloned repo
cd ns-ceiling-fan
- git pull all submodules
git submodule init
git pull --recurse-submodules && git submodule update --recursive
git submodule update --remote --merge
- Build Images and bring up the application.
docker-compose up -d --build frontend backend
output:
Successfully built 2e19b15cdbd8
Successfully tagged ns-ceiling-fan_frontend:latest
Creating frontend ... done
Creating redis ... done
Creating backend ... done
- Open browser preferably chrome (NSFan is not supported on IE)
Note: website is accessible only on localhost.
http://localhost:8080
- NSFan Demo
- To stop all the containers & clean all the docker images
docker-compose down -v --remove-orphans --rmi all
output
Stopping frontend ... done
Stopping backend ... done
Stopping redis ... done
Removing frontend ... done
Removing backend ... done
Removing redis ... done
Removing network ns-ceiling-fan_default
Removing volume ns-ceiling-fan_my-redis-local
Removing image redis
Removing image ns-ceiling-fan_backend
Removing image ns-ceiling-fan_frontend