mathewtrivett / outpost

Local government service directories done right, in an api-standards driven way.

Home Page:https://outpost-staging.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Service directories done right


Run tests

Staging site here

A standards-driven API and comprehensive set of admin tools for managing records about local community services, groups and activities.

It's a rails app backed by a postgres database.

Outpost works alongside a seperate API component.

We're also building an example front-end for Outpost.

Running it locally

You need ruby and node.js installed, plus PostgreSQL server running.

If you want to build a public index for the API, you'll also need a local MongoDB server.

First, clone the repo. Then:

bundle install
npm install
rails db:setup
rails s

# run tests
rspec

For the database seed to succeed, you need a source data file bucksfis.csv in the lib/seeds folder.

Building the public index

Outpost's API component relies on a public index stored on MongoDB.

You can run rails build_public_index to build the public index for the first time. Active record callbacks keep it up to date as services are changed, but it's a good idea to occasionally refresh the index by re-running that rake task

Running it on the web

Deploy

It's suitable for 12-factor app hosting like Heroku.

It has a Procfile that will automatically run pending rails migrations on every deploy, to reduce downtime.

Config

It needs the following extra environment variables to be set:

  • GOOGLE_API_KEY with the geocoding API enabled, to geocode postcodes
  • GOOGLE_CLIENT_KEY with the javascript and static maps APIs enabled, to add map views to admin screens
  • OFSTED_API_KEY to access the feed of Ofsted items

In production only:

  • SENDGRID_API_KEY to send emails
  • MAILER_HOST where the app lives on the web, to correctly form urls in emails
  • MAILER_FROM the email address emails will be delivered from

Running it locally

With docker-compose and docker, after cloning the project:

  • Bring up the databases with docker-compose up
  • Populate your environment variables
  • Run the application with rails s

E2E Test Coverage

See the readme here

About

Local government service directories done right, in an api-standards driven way.

https://outpost-staging.herokuapp.com/


Languages

Language:Ruby 45.3%Language:HTML 37.7%Language:SCSS 12.2%Language:JavaScript 3.8%Language:Gherkin 0.6%Language:CSS 0.4%