Last commit was about 2 months agoView on GitHub Go to website
service directories platform
Local government service directories done right, in an API-standards driven way.
Service directories done right
Example screens from the app
A standards-driven API and comprehensive set of admin tools for managing records about local community services, groups and activities.
Outpost works alongside a seperate API component.
We're also building an example front-end for Outpost.
It's a Rails app backed by a PostgreSQL database.
It can also act as an OAuth provider via Doorkeeper.
It uses Google APIs for geocoding and map features, and Sendgrid to send emails.
For more information see getting started
You need ruby and node.js installed, plus a 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 yarn rails db:setup rails s # run end-to-end and unit tests rake
The database will be seeded with realistic fake data.
It will be on
localhost:3000. You can log in with
[email protected] and the initial password you set [in the configuration](#-configuration).
To see multiple directories in Outpost, run the app with:
INSTANCE=buckinghamshire rails s
This will start the app with the directories listed in
To add more directories, or set up another instance with separate directories,
With docker-compose and docker, after cloning the project:
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.
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.
Outpost depends on on several important
Some of these can be run manually, and some are best scheduled using Heroku Scheduler or similar.
||Run the bespoke import job from Open Objects. For this to succeed, you need several source CSV data files in the
||Build the initial public index for the API service to use.||One-off|
||Permanently delete any services and users that have been "discarded" for more than 30 days.||Weekly|
||Build the initial Ofsted items table||One-off|
||Check for any changes to Ofsted items against the Ofsted API||Daily, overnight|
||Update the counter caches to keep them in sync||Daily, overnight|
You can provide config with a
.env file. Run
cp .env.example .env to create a fresh one.
It needs the following extra environment variables to be set:
||with the geocoding API enabled, to geocode postcodes||Yes, for geocoding features|
||to access the feed of Ofsted items||Only if running Ofsted rake tasks|
||to send emails with Notify||In production only|
||ID of a notify template, as described here||In production only|
||where the app lives on the web, to correctly form urls in emails||https://example.com||In production only|
||a form where users can submit feedback about the website||https://example.com||In production only|
||the main PostgreSQL database||postgres://user:password
|Yes, if different from default, and in production|
||the MongoDB database for the public index||mongodb://user:password
|Yes, if using the API service|
||an initial admin password to log in with for local development||Locally only|
||show a bright warning banner on non-production environments||staging||Only to warn about non-production environments|
||Name of the google cloud project||*||No|
||Name of the google cloud bucket||*||No|
||Name of the google cloud project id||*||No|
||Google cloud private key id||*||No|
||Google cloud private key||*||No|
||Google cloud client email||*||No|
||Google cloud client id||*||No|
||Google cloud x509 certificate||*||No|
See documentation on [data import](lib/tasks/data_import/README.md).
Outpost can work as an identity provider for other apps. Users with the highest permissions can access the
/oauth/applications route to create credentials.
Once authenticated, consumer apps can fetch information about the currently logged in user with the
It has some rspec tests on key functionality. Run them with:
bundle exec rspec
SimpleCov and Codecov are set up to track code coverage. To see the code
coverage on a local branch, run the test suite and open
rake open coverage/index.html
The coverage report is sent to Codecov after the tests run in CI. Once you open
a PR, Codecov will post a comment with a handy coverage delta and a link to view
line-by-line coverage for the PR.