Git Product home page Git Product logo

uktrade / export-opportunities Goto Github PK

View Code? Open in Web Editor NEW
6.0 24.0 2.0 493.06 MB

UK - Great.gov - Export Opportunities - Find and apply for overseas opportunities from businesses looking for products or services like yours.

Home Page: https://opportunities.export.great.gov.uk/

License: MIT License

Ruby 31.02% HTML 49.61% JavaScript 6.60% CSS 1.49% Shell 0.01% PHP 0.05% SCSS 7.21% Haml 4.00% Procfile 0.01%
live opportunities export-opportunities dit

export-opportunities's Introduction

CircleCI Dependency Status

DBT Exporting is GREAT

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.

Installation

  • 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

Running tests

Install PhantomJS, then run tests with bundle exec rspec

Style checking

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.

Concepts

Users / Editors

  • There was originally a model called User which stored details of people who could access the admin site. This has been renamed to Editor, so User 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.

License

MIT licensed. See the bundled LICENSE file for more details.

Deployment

  • 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.

Contribution

You are welcome to contribute, please get in touch with Alex Giamas, Steven Burnell, William Taylor or Mateusz Lapsa Malawski.

export-opportunities's People

Contributors

agiamas avatar appility avatar bobby-didcoding avatar dependabot[bot] avatar dvadgama avatar eadpearce avatar hal274 avatar jeanettemariemurphy avatar lgarvey avatar luptonm avatar michalc avatar nusnewob avatar rafa-garcia avatar seijihg avatar stevenburnell-dit avatar timothypatterson avatar willtaylor22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

agiamas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.