department-of-veterans-affairs / Vets Api

Licence: other
API powering VA.gov

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Vets Api

Decidim
The participatory democracy framework. A generator and multiple gems made with Ruby on Rails
Stars: ✭ 894 (+841.05%)
Mutual labels:  rails, civic-tech
Smart sms
The easiest way to integrate SMS service in China
Stars: ✭ 92 (-3.16%)
Mutual labels:  rails
Covid Volunteers
Organizing and matching volunteers with COVID-19 projects
Stars: ✭ 87 (-8.42%)
Mutual labels:  rails
Translate enum
Easily Translate Enums in Rails
Stars: ✭ 90 (-5.26%)
Mutual labels:  rails
Instuigram
🎓 Learning Ruby on Rails through building the Instagram Application.
Stars: ✭ 88 (-7.37%)
Mutual labels:  rails
Javlibrary Rails
Elegant way to build your own javlibrary database.
Stars: ✭ 91 (-4.21%)
Mutual labels:  rails
Pager Api
Easy API pagination for Rails
Stars: ✭ 86 (-9.47%)
Mutual labels:  rails
Validates timeliness
Date and time validation plugin for ActiveModel and Rails. Supports multiple ORMs and allows custom date/time formats.
Stars: ✭ 1,319 (+1288.42%)
Mutual labels:  rails
Administrate Field Active storage
support active storage in administrate
Stars: ✭ 92 (-3.16%)
Mutual labels:  rails
Reactchat
A chat app built with React.js and ActionCable in Ruby on Rails 5.1
Stars: ✭ 90 (-5.26%)
Mutual labels:  rails
Gorailsyourself
A suite of useful functions needed when porting/mixing Go/Rails code.
Stars: ✭ 89 (-6.32%)
Mutual labels:  rails
Errdo
A simple plugin to handle, log, and customize production errors in Rails applications
Stars: ✭ 88 (-7.37%)
Mutual labels:  rails
Liquid Rails
Renders liquid templates with layout and partial support
Stars: ✭ 91 (-4.21%)
Mutual labels:  rails
Simpleadmin Rails
SimpleAdmin - Dashboard for modern website without wasting time
Stars: ✭ 87 (-8.42%)
Mutual labels:  rails
Carrierwave Video Thumbnailer
A thumbnailer plugin for Carrierwave that makes easy thumbnailing of your uploaded videos
Stars: ✭ 92 (-3.16%)
Mutual labels:  rails
Csso Rails
CSS Optimizer(csso) ruby wrapper for Rails Asset pipeline
Stars: ✭ 86 (-9.47%)
Mutual labels:  rails
Jquery Slick Rails
Integrates Slick carousel, a jQuery plugin, into your Rails app.
Stars: ✭ 89 (-6.32%)
Mutual labels:  rails
Activeadmin
The administration framework for Ruby on Rails applications.
Stars: ✭ 9,096 (+9474.74%)
Mutual labels:  rails
Resubject
Resubject makes easy to decorate your objects
Stars: ✭ 94 (-1.05%)
Mutual labels:  rails
Npm Pipeline Rails
Use npm as part of your Rails asset pipeline
Stars: ✭ 93 (-2.11%)
Mutual labels:  rails

Vets API

Build Status Yard Docs Maintainability Test Coverage License: CC0-1.0

This project provides common APIs for applications that live on VA.gov (formerly vets.gov APIs).

For frontend, see vets-website and vets-content repos.

Base setup

  1. Clone the vets-api repo:

    git clone https://github.com/department-of-veterans-affairs/vets-api.git
    
  2. Setup key & cert for localhost authentication to ID.me:

    • Create a folder in your vets-api directory:

      mkdir config/certs
      touch config/certs/vetsgov-localhost.crt
      touch config/certs/vetsgov-localhost.key
      
    • Copy example configuration file:

      cp config/settings.local.yml.example config/settings.local.yml
      
    • Edit config/settings.local.yml to disable signed authentication requests:

      # settings.local.yml
      saml:
        authn_requests_signed: false
      
  3. If you are developing features that need Sidekiq Enterprise, you must have access to the va.gov-team-sensitive repo and install the sidekiq enterprise license

    Sidekiq Enterprise is used for worker rate limiting and additional reliability in production and requires a license be configured on your development machine. If you do not have a license configured, the open source version of Sidekiq will be installed instead. This is not an issue unless you are specifically developing features that need Sidekiq Enterprise.

    DO NOT commit local Gemfile modifications that remove the sidekiq-ent and sidekiq-pro gems.

  4. Developers who work with vets-api daily tend to prefer the native setup because they don't have to deal with the abstraction of docker-compose while those who would to spend less time on getting started prefer the docker setup. Docker is also useful when it's necessary to have a setup as close to production as possible.

Running the app

Configuration

Vets API is configured with Config. The default configuration is contained in settings.yml. To customize your setup, you can create a config/settings.local.yml file with configuration specific to your needs. For example, to configure Redis and PostgreSQL (PostGIS is required), place something like this in that file:

database_url: postgis://pg_host:9999/custom_db

redis:
  host: redis_host
  port: 9999

This is also where you will place any other customizations, such as API tokens or certificate paths.

Config settings that vary in value depending on the deployment environment will also need to be set appropriately for each environment in the relevant devops (Private Repo) configurations (dev-, staging-, and prod-settings.local.yml.j2).

Some examples of configuration that will need to be added to these files are:

  • API keys/tokens
  • 3rd party service hostnames, ports, and certificates/keys.
  • Betamocks settings

Optional application configuration

The following features require additional configuration, click for details.

To mock one or more of the above services see Betamocks

Vets API will still run in a limited capacity without configuring any of these features, and will run the unit tests successfully.

Deployment instructions

Jenkins deploys vets-api upon each merge to master:

http://jenkins.vfs.va.gov/job/testing/job/vets-api/job/master/

Each deploy is available here:

https://dev-api.va.gov/v0/status

Additional deployment details can be found here:

additional deployment details

API request key formatting

When sending HTTP requests use the X-Key-Inflection request header to specify which case your client wants to use. Valid cases are camel, dash, and snake. For example if you set X-Key-Inflection: camel then you can use camelCase keys in your JSON request body and you will get back data with camelCase keys in the response body. If the header is not provided then the server will expect snake_case keys in the request body and output snake_case in the response.

Versions

The version of Ruby and gem dependencies (including Rails) used are defined in the included Gemfile. The currently used versions of gems are maintained with Bundler and stored in the Gemfile.lock.

Version Policy

The goal is to have vets-api use supported versions of gems and Ruby, which is often the latest. However the versions are generally updated as need or availability arise. If you need a newer version of a gem, please submit a pull-request marked as draft with just the gem updated and passing tests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].