Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

alphagov/anthology

Repository files navigation

Anthology

An easier way to keep track of the books on your office bookshelf.

  • Uses Google authentication
  • Keeps track of multiple copies of each book
  • Looks up book details from Google Books and Openlibrary based on the ISBN

Getting started

bundle install
bundle exec puma -p 5000

If you're in the development or test environments, OmniAuth's developer strategy is available, and selected by default. This allows you to authenticate without using Google by providing details for a stub user. If configuration for Google is present, Anthology will default to using authentication with Google instead.

Configuration

The app is configured with a collection of environment variables:

  • LIBRARY_TITLE - (optional) name of the library, displayed throughout the app. This will default to "Library" if this is not set.
  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • RAILS_SECRET_TOKEN
  • PERMITTED_EMAIL_HOSTNAMES - the hostname(s) that are allowed to log in to the app
  • DB_USERNAME - (optional) Defaults to "books" if this is not set.
  • DB_PASSWORD - (optional)
  • DB_HOST - (optional)
  • DB_PORT - (optional)

Setting up the Google Client ID and Google Client Secret

To set up the Google authentication, you will need to get a GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET by visiting the Google API console and choosing the option to create an "OAuth Client ID". You should select 'Web application' as the application type and enter <site-address>/auth/google/callback as the "authorised redirect URI". No additional OAuth 2.0 scopes need to be added.

CI setup

CI runs using GitHub Actions

Licence

Anthology is released under the MIT Licence.

About

The GDS Library web app.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published