As of 27 October 2020, this repo is no longer in use and is no longer being maintained. See waste-carriers-engine and its host apps instead.
The Waste Carrier Registrations Service allows businesses, who deal with waste and thus have to register according to the regulations, to register online. Once registered, businesses can sign in again to edit their registrations if needed.
The service also allows authorised agency users and NCCC contact centre staff to create and manage registrations on a user's behalf, e.g. to support 'Assisted Digital' registrations. The service provides an internal user account management facility which allows authorised administrators to create and manage other agency user accounts.
The service is implemented as a frontend web application, with a service API and a document-oriented database (MongoDB) underneath.
For authentication purposes the application uses the Devise gem (https://github.com/plataformatec/devise) to manage the user accounts of waste carriers (i.e. external users), and internal users (agency users such as NCCC contact centre staff and administrators). User account information managed by the Devise gem is stored in MongoDB.
The application sends emails using the Sendgrid e-mail service.
Clone the repo and drop into the project
git clone https://github.com/DEFRA/waste-carriers-frontend.git && cd waste-carriers-frontend
Then install the dependencies bundle install
.
A Vagrant instance has been created allowing easy setup of the waste carriers service. It includes installing all applications, databases and dependencies. This is located within Gitlab (speak to the ruby team).
Download the vagrant project and create the VM using the instructions in its README. It includes installing and running a version of the frontend app, however if you intend to work with it locally and just use the box for dependencies you'll need to:
ps ax
identify the pid of the running frontend appkill [pid id]
Once you've created a .env
file (see below) you should be reading to work with and run the project locally.
Most settings are driven through environment variables as per 12 factor app, however when working locally we use Dotenv and a .env
file to load them. This saves having to add them to each session or update your ~/.bash_profile
. See .env.example
for details of the environment variables that can be set. Also check the environment files as detailed above, because in some cases a default will be used negating the need to set the environment variable.
We use wkhtmltopdf to create PDF files. On Ubuntu this can be installed with
sudo apt-get install wkhtmltopdf
While in development, the application contains a (temporary) root index page which shows a variety of links for the typical entry points into the application.
RSpec unit tests are available. Run bundle exec rspec
to run all tests.
Unit tests aree located in the spec
directory.
Cucumber feature tests are available. Run bundle exec cucumber
to run all tests.
Feature tests are located in the features
directory.
Please read the contribution guidelines before submitting a pull request.
THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:
http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3
The following attribution statement MUST be cited in your products and applications when using this information.
Contains public sector information licensed under the Open Government license v3
The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.
It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.