Service directories done right
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.
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.
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
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.
It needs the following extra environment variables to be set:
GOOGLE_API_KEY
with the geocoding API enabled, to geocode postcodesGOOGLE_CLIENT_KEY
with the javascript and static maps APIs enabled, to add map views to admin screensOFSTED_API_KEY
to access the feed of Ofsted items
In production only:
SENDGRID_API_KEY
to send emailsMAILER_HOST
where the app lives on the web, to correctly form urls in emailsMAILER_FROM
the email address emails will be delivered from
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
See the readme here