3.3 KiB
Notify UI
This is the Notify front-end for government users and admins. To see it in action, check out the demo site (contact team for credentials).
Through the interface, users can:
- Register and manage users
- Create and manage services
- Send batch SMS by uploading a CSV
- View their history of notifications
The Notify API provides the UI's backend and is required for most things to function. Set that up first!
Local setup
Direct setup
-
Get the API running
-
Install pipenv
-
Install Python and Node dependencies
make bootstrap -
Create the .env file
cp sample.env .env # follow the instructions in .env -
Run the Flask server
make run-flask -
Go to http://localhost:6012
VS Code && Docker installation
If you're working in VS Code, you can also leverage Docker for a containerized dev environment
-
Get the API running, including the Docker network
-
Create the .env file
cp sample.env .env # follow the instructions in .env -
Install the Remote-Containers plug-in in VS Code
-
Using the command palette (shift+cmd+p) or green button thingy in the bottom left, search and select “Remote Containers: Open Folder in Container...” When prompted, choose devcontainer-admin folder (note: this is a subfolder of notifications-admin). This will start the container in a new window, replacing the current one.
-
Wait a few minutes while things happen 🍵
-
Open a VS Code terminal and run the Flask application:
make run-flask -
Go to http://localhost:6012
NOTE: when you change .env in the future, you'll need to rebuild the devcontainer for the change to take effect. VS Code should detect the change and prompt you with a toast notification during a cached build. If not, you can find a manual rebuild in command pallette or just docker rm the notifications-api container.
To test the application
From a terminal within the running devcontainer:
# run all the tests
make test
# continuously run js tests
npm run test-watch
To run a specific JavaScript test, you'll need to copy the full command from package.json.
Running a11y-scans locally
Unlike most of the tests and scans, pa11y-ci cannot currently be run from within the VSCode dev container.
- Run
make run-flaskfrom within the devcontainer - Run
make a11y-scanfrom your host computer.
Further docs from UK
License && public domain
Work through commit 543be77 is licensed by the UK government under the MIT license. Work after that commit is in the worldwide public domain. See LICENSE.md for more information.
Contributing
As stated in CONTRIBUTING.md, all contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.