A new digital procurement platform for the NSW Government.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.ebextensions
.elasticbeanstalk
app
bin
config Fix build failure Dec 20, 2018
db
docs update documentation for latest features (#355) Sep 7, 2018
lib 102 - implemented data-migrate gem to populate sme fields and future … Dec 17, 2018
log
public
spec
tmp Initialise base Rails 5.1.5 application Feb 28, 2018
vendor
.ebignore
.env.development
.env.test
.gitignore
.rspec
.rubocop.yml
.rubocop_airbnb.yml add rubocop linting (#385) Oct 5, 2018
.rubocop_todo.yml
.ruby-version
Gemfile Merge branch 'release-4' into 102-update-user-sme-rake-task Dec 18, 2018
Gemfile.lock
LICENSE.md
Procfile
README.md
Rakefile
app.json
config.ru
cron.yaml invalid events in admin and changing doc expiry schedule Dec 7, 2018
custom_plan.rb
package.json
yarn.lock Add a visual password strength indicator May 21, 2018

README.md

buy.nsw

Build Status Maintainability

A new digital procurement platform for the NSW Government.

Technical documentation

This is a Ruby on Rails application which contains functionality for external and internal users.

Dependencies

  • Ruby – currently 2.5.0 (as defined in .ruby-version)
  • Bundler – install with gem install bundler
  • Yarn – for assets. On a Mac, install with brew install yarn
  • PostgreSQL – On a Mac, use Postgres.app)
  • ChromeDriver and Chrome – for running feature tests. On a Mac, install with Caskroom: brew cask install chromedriver
  • MailCatcher (optional) – for receiving emails in development. Install with gem install mailcatcher
  • ClamAV - used for virus scanning of uploaded documents

Setting up the application

If you are running the application for the first time, run bin/setup to install Ruby dependencies and initialize the database.

The application configuration in the development environment, including database names, is defined in .env.development, and loaded automatically in dev.

Running the application

foreman start

The app will launch by default at http://localhost:5000. (If you configure Foreman differently, the port may change.)

Running the test suite

bin/rake

This will run:

  • the RSpec test suite (in /spec)
  • an RCov coverage report, which will be saved to coverage/

Sending emails in development

To receive emails in development, use MailCatcher. It runs an SMTP server which catches emails and displays it in a web interface.

Install MailCatcher with gem install mailcatcher, then run mailcatcher in your console to start the server. Don't commit it to the Gemfile, as it causes conflicts.

Deployment to production

The app is a standard 12 factor app that should be possible to install on many platforms. It has been successfully installed on Heroku and Elastic Beanstalk on Amazon Web Services (AWS).

There is some configuration for Elastic Beanstalk in .ebextensions and .elasticbeanstalk.

Continuous integration

We have been using CircleCI to run automated tests and deployment to testing environments. You will find configurations in .circleci.

We have two testing environments calls testing and staging. As you can find in circleci config file, commiting to master and staging branches will start a deploy to these environments.

How the application works

Documentation explaining the application architecture is available in the docs directory of this repo.

Copyright & Licence

Copyright NSW Department of Finance, Services and Innovation.

Licensed under the MIT License.