This public repository is read-only and no longer maintained. For the latest sample code repositories, visit the SAP Samples organization.
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.
Check out the application running in production for a live demo.
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.
-
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
- Clone the project.
git clone https://github.com/SAP-samples/SAP4Kids cd SAP4Kids npm install
- Open the project with VS Code.
code .
- 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
andui_map/webapp/resources/keys.js
) - 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
- 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.
- Open the SAP Cloud Platform Cockpit and assign the role collection
DataAdmin
to your user (compare to step two of this tutorial)
Explain why local DB just for assistance entry / FE app
- Clone the project.
git clone https://github.com/SAP-samples/SAP4Kids cd SAP4Kids npm install
- Open the project with VS Code.
code .
- 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
andui_map/webapp/resources/keys.js
) - Initialize the SQLite database via
npm run deploy:cds
. - Start the app with
npm start
- 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.
The project consists of the following modules and services: Have a look at the detailed architecture page for more information.
- 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.
This content is provided "as-is" with no other support.
cf set-env sap4kids-srv destinations "[{name: "usda_arcgis",url: "https://services1.arcgis.com/RLQu0rK7h4kbsBq5/ArcGIS/rest/services/Summer_Meal_Sites_2020/FeatureServer/0/"}]"