Skip to content

Group project, Educational project from Turing School of Software and Design

Notifications You must be signed in to change notification settings

kcockett/next-steps-back-end

 
 

Repository files navigation

Next Steps - Project README

Back-End

Link to Next Steps Website

Table of Contents

  1. Project Description
  2. Usage
  3. Endpoints
  4. Future Iterations
  5. Suggestions for Contribution
  6. Contributors

Setup

Project Description

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.

User-Friendly Resource Access

  • 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.

Provider Profiles

  • 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.

Usage

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).

Database Schema

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

Endpoints

Will return the first 10 results from the search

  1. GET /api/v0/search?keyword=="checkbox"&location="location_entry"
{
  "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."
               }
         }
    ]
}

If you are dealing with providers that register with our service use:

  1. POST /api/v0/providers
  2. GET /api/v0/providers/:id
  3. PATCH /api/v0/providers/:id
  4. DELETE /api/v0/providers/:id

If you are dealing with providers that exist from 211 database use:

  1. GET /api/v0/provider_details/:211_id

The Endpoints we are utilizing from the 211 Search API are:

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.

  1. GET https://api.211.org/search/v1/api/Search/Keyword?Keyword=#{keyword}&Location=#{location}&Distance=10

  2. 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

Future Iterations

  • 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.

Suggestions for Contribution

If you would like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or endpoint. e.g., git checkout -b <your-feature>
  3. Commit your changes: git commit -m "Add new feature"
  4. Push the branch to your fork: git push origin your-feature
  5. Create a pull request outlining your changes.

Contributors

About

Group project, Educational project from Turing School of Software and Design

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.7%
  • Other 0.3%