Link to Next Steps Website
- Ruby 3.2.2
- Rails 7.0.7.2
- Faraday gem to interact with APIs
- JSONAPI Serializer gem for formatting JSON responses
- SimpleCov gem for code coverage tracking
- ShouldaMatchers gem for testing assertions
- VCR / Webmock to stub HTTP requests in tests to simulate API interactions
Next Steps is a full-stack project that leverages the 211 API along with geolocation to assist individuals in finding community resources in their vicinity. We thought it was particularly important to create search options catered to persons who may not have the ability to navigate existing resources. This repository contains the back-end portion of the project, providing an API for the front-end application.
This project has been deployed using Heroku, and Circle CI was used for Continuous Integration.
- Users of the app can access community resources anonymously.
- Pre-built search queries are available to streamline the resource-finding process.
- An option to search for resources using keyword endpoints from 211 API.
- Service providers can create accounts to add information about their specific services.
- Providers offering specialized services such as housing for justice-affected individuals, LGBTQIA+ friendly services, emergency shelter, or any service relevant to vulnerable communities can create profiles to make their services searchable.
- Provider application are reviewed by Admin users and can be approved or denied by Admin.
This API was created to expose endpoints for specialized search queries and used with the sister front-end application. The endpoint takes in two parameters, "keyword" and "location". We provide the user with some keywords built in, such as "basic needs", "shelters", "medical care", "mental health care", and others. They can select keywords from our provided options, or utilize the search bar to search their own keyword(s).
create_table "providers", force: :cascade do |t|
t.string "name"
t.text "description"
t.string "street"
t.string "city"
t.string "state", limit: 2
t.string "zipcode", limit: 5
t.string "website"
t.string "phone"
t.string "fees"
t.text "schedule"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "users", force: :cascade do |t|
t.string "username"
t.string "password_digest"
t.string "authentication_token"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
GET /api/v0/search?keyword=="checkbox"&location="location_entry"
- Try it out: https://ancient-reaches-38594-79ad833137d5.herokuapp.com/api/v0/search?keyword=healthcare&location=denver Example Response:
{
"data": [
{
"id": "211contrac-1561",
"type": "filtered_provider",
"attributes": {
"category": "healthcare",
"provider_name": "DAVITA HEALTHCARE PARTNERS (DIALYSIS CENTERS)",
"street": "2000 16th Street",
"city": "Denver",
"state": "CO",
"lat": "39.753627",
"lon": "-105.003635",
"description": "Provides dialysis services for those diagnosed with chronic kidney failure, a condition also known as chronic kidney disease (CKD). Provides locations of over 2,000 outpatient dialysis facilities and acute units in over 800 hospitals 46 states and the District of Columbia. Website offers extensive information about CKD."
}
},
{
"id": "211contrac-1562",
"type": "filtered_provider",
"attributes": {
"category": "healthcare",
"provider_name": "DAVITA HEALTHCARE PARTNERS (DISEASE/DISABILITY INFORMATION)",
"street": "2000 16th Street",
"city": "Denver",
"state": "CO",
"lat": "39.753627",
"lon": "-105.003635",
"description": "Provides dialysis services for those diagnosed with chronic kidney failure, a condition also known as chronic kidney disease (CKD). Provides locations of over 2,000 outpatient dialysis facilities and acute units in over 800 hospitals 46 states and the District of Columbia. Website offers extensive information about CKD."
}
}
]
}
POST /api/v0/providers
GET /api/v0/providers/:id
PATCH /api/v0/providers/:id
DELETE /api/v0/providers/:id
GET /api/v0/provider_details/:211_id
Note: The 211 allows trial usage, it will only give you the first 10 results; You must get an API key to access any part of the 211 API, We hid ours by utilizing built-in Rails Credentials.
-
GET https://api.211.org/search/v1/api/Search/Keyword?Keyword=#{keyword}&Location=#{location}&Distance=10
-
GET https://api.211.org/search/v1/api/ServiceAtLocation?idServiceAtLocation=#{service_id}
- The Service ID can be accessed from the JSON response from the first endpoint
- Scale: Utilize cloud storage to store data for Providers and resource list saved by the user.
- Utilize Open AI API for generating motivational statements based on user's identified needs.
- Create additional pre-built search options that make finding resources easy and convenient.
- Admin functionality.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or endpoint. e.g.,
git checkout -b <your-feature>
- Commit your changes:
git commit -m "Add new feature"
- Push the branch to your fork:
git push origin your-feature
- Create a pull request outlining your changes.
- Allen Russell - GitHub: @garussell
- Weston Schutt - GitHub: @westonio
- Kaina Cockett - GitHub: @kcockett
- Zanna Fitch - GitHub: @z-fitch
- Jorja Flemming - GitHub: @jorjaf