NOTE The name of the organisation has changed from DIT to DBT. In all user-facing pages this change has been made, but some existing entities like databases may continue to be called ukti.
We aim to follow GDS service standards and GDS design principles.
-
Copy the application configuration
$ cp config/application.example.yml config/application.yml
-
Have an instance of postgres running and configured in your
application.yml
docker run --rm -p 5432:5432 postgres:10.3
-
Have an instance of redis-server running and configured in your
application.yml
docker run --rm -p 6379:6379 redis
-
Have an instance of elasticsearch running (can be default localhost:9200) and configured in your
application.yml
docker run --rm -p 9200:9200 elasticsearch:5.6.8
-
Increase the max window size to >=100_000 using something like this:
curl -XPUT "http://<host>:<port>/<index_name>/_settings" -d '{ "index" : { "max_result_window" : 500000 } }'
-
After setting up your database with rake db:migrate, you need to run the 2 elasticsearch rake tasks to setup the elasticsearch indexes:
- rake elasticsearch:import_opportunities
- rake elasticsearch:import_subscriptions
Install PhantomJS, then run tests with bundle exec rspec
Run style checks with rubocop -c rubocop.yml
. This checks code against the Ruby Style Guide, with a couple of customisations.
Configure your editor's syntax checker to flag up rubocop rules.
-
There was originally a model called
User
which stored details of people who could access the admin site. This has been renamed toEditor
, soUser
can be instead used for end-users who subscribe and apply for opportunities. -
Editors can be one of four roles: Uploader, Previewer, Publisher or Administrator:
- Uploaders can add new opportunities and edit ones they created. Can view only opportunities and enquiries of his own or that belong to the service provider he belongs to.
- Previewers can view all opportunities, edit none. Can view all opportunities and enquiries.
- Publishers can additionally publish opportunities so they appear on the site. Can view all opportunities and enquiries.
- Administrators can also manage editor accounts. Can view all opportunities and enquiries.
MIT licensed. See the bundled LICENSE file for more details.
- You can deploy the project on Heroku or CF Gov PaaS with minimum effort as long as you setup environmental variables like you would do in localhost.
You are welcome to contribute, please get in touch with Alex Giamas, Steven Burnell, William Taylor or Mateusz Lapsa Malawski.