Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.
/ SAP4Kids Public archive

A cloud-native application that leverages various SAP technologies to ensure families have access to the food and resources they need during the COVID-19 crisis. This project can be deployed to your free SAP BTP Trial account.

License

Notifications You must be signed in to change notification settings

SAP-archive/SAP4Kids

Repository files navigation

Important Notice

This public repository is read-only and no longer maintained. For the latest sample code repositories, visit the SAP Samples organization.

SAP4Kids

REUSE status

In response to the current COVID-19 pandemic and its resulting impact on students and families, GENYOUth, child health and wellness nonprofit, and SAP, market leader in enterprise software sales, have created the SAP4Kids application.

It's our goal to ensure families have access to the food and resources they need when they need them. For this, we developed an application they can use to find available resources in their neighborhood.

Screenshots

Check out the application running in production for a live demo.

Description

This repository contains the entire source code of this application, so it can be adapted and used by other organizations. We also think it is an excellent resource for many developers to see how SAP technology can be used to make the world run better. This project consists of three distinct web applications:

  • Assistance Entry Form

    Provides a quick way for organizations to submit information on feeding
    

    sites and other free resources (i.e. financial, workforce, housing, and healthcare) they provide to help students and families.

  • Approval List

    All entered data needs to be approved by an admin to be shown on the map.

  • Resource Locator

    An interactive map that helps students and families find resources near them.

Requirements

  • Create your own Google Maps API Key

  • Install Node.js LTS version 12 from https://nodejs.org/en/download/.

  • Create an SAP Cloud Platform trial account in the region Europe (Frankfurt)

  • Follow this tutorial to install the Cloud Foundry command-line tool.

  • Add the Multi-Target Application Cloud Foundry CLI Plugin.

    cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org
    cf install-plugin multiapps
    
  • Install make via a package manager...

    ...for Mac users: This tool should be preinstalled on your machine.

    ...for Windows users (install chocolatey first).

    choco install make
    
  • Install SQLite3 via a package manager...

    ...for Mac users (install brew first).

    brew install sqlite
    

    ...for Windows users (install chocolatey first).

    choco install sqlite
    

Optional: Set up the SAP Web Analytics service if you want to add it to the project

Download and Installation

Cloud Deployment

  1. Clone the project.
    git clone https://github.com/SAP-samples/SAP4Kids
    cd SAP4Kids
    npm install
    
  2. Open the project with VS Code.
    code .
    
  3. Replace the placeholder for the Google Maps Key, the reCaptcha site key, and the Web Analytics token in the key files (ui_form/webapp/resources/keys.js and ui_map/webapp/resources/keys.js)
  4. Build and deploy the project to the cloud.
    npm run deploy # deploys to a production account
    # npm run deploy:trial # deploys to a trial account
  5. Wait until the process completed and look for the output line, which references the URL of the started app router. Open the displayed URL in a browser.
  6. Open the SAP Cloud Platform Cockpit and assign the role collection DataAdmin to your user (compare to step two of this tutorial)

Local Development

Explain why local DB just for assistance entry / FE app

  1. Clone the project.
    git clone https://github.com/SAP-samples/SAP4Kids
    cd SAP4Kids
    npm install
    
  2. Open the project with VS Code.
    code .
    
  3. Replace the placeholder for the Google Maps Key, the reCaptcha site key, and the Web Analytics token in the key files (ui_form/webapp/resources/keys.js and ui_map/webapp/resources/keys.js)
  4. Initialize the SQLite database via npm run deploy:cds.
  5. Start the app with npm start
  6. The backend service will run on http://localhost:4004 and the web apps on port 8080 (entry form), 8081 (interactive map), and 8082 (approval app).

When prompted for a password, enter the user name alice and confirm with an empty string as password.

Architecture

The project consists of the following modules and services: Diagram Have a look at the detailed architecture page for more information.

Known Issues

  • The map only displays records within a 200 mile radius of the specified location. Interacting with the map (dragging or zooming in/out) has no effect on the displayed assistance locations.

How to obtain support

This content is provided "as-is" with no other support.

Env Variables for USDA API

cf set-env sap4kids-srv destinations "[{name: "usda_arcgis",url: "https://services1.arcgis.com/RLQu0rK7h4kbsBq5/ArcGIS/rest/services/Summer_Meal_Sites_2020/FeatureServer/0/"}]"

About

A cloud-native application that leverages various SAP technologies to ensure families have access to the food and resources they need during the COVID-19 crisis. This project can be deployed to your free SAP BTP Trial account.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published