Police Suppression Order System.
This solution starter was created by technologists from IBM.
Jimmy Cesar, Benjamin Chance, Kallie Fergerson, Kimberly Holmes, Paul Jennas, Victoria Kanicka, Henry Nash, Joe Nichols, Jeremy O'Mard, Osai O Osaigbovo, Tiffani Rice, Andrea Ritterbeck, Thomas Schott
TBA
Provide a publically available, expandable system to enable attorneys and interested groups and individuals to have access to the details of suppression orders, searchable by officer, precinct and geographic area.
TBA
TBA
TBA
TBA
- Register for an IBM Cloud account.
- Install and configure IBM Cloud CLI.
- Install React Native CLI dependencies (for iOS).
- Clone the repository.
TBA - [if running in the sandbox, there is a short cut to this]
Log into the IBM Cloud and provision a CouchDB instance using Cloudant.
- From the catalog, select Databases and then the Cloudant panel.
- Once selected, you can choose your Cloudant plan -- there is a free tier for simple testing that is sufficient to run this CIR example. You should choose an appropriate region, give the service a name, and it is recommended you choose Use only IAM under Available authentication methods. You can leave the other settings with their defaults. Click the blue Create button when ready.
- Once your Cloudant instance has been created, you need to create a service credential that the CIR API Server can use to communicate with it. By selecting your running Cloudant instance, you can choose Service credentials from the left-hand menu. Create a new service credential and give it a name (it doesn't matter what you call it).
- Once created, you can display the credentials by selecting view service credentials, and then copy the credential, so you are ready to paste it into the code of the API server in Step 4.
To set up and launch the server application:
- Go to the
code/server-app
directory of the cloned repo. - Copy the
.env.example
file in thecode/server-app
directory, and create a new file named.env
. - Edit the newly created
.env
file and update theCLOUDANT_ID
andCLOUDANT_IAM_APIKEY
with the values from the service credential you created in Step 1. (Note that theusername
from the credential is what should be used for theCLOUDANT_ID
.) - Edit the name value in the
manifest.yml
file to your application name (for example, my-app-name). - From a terminal:
- Go to the
code/server-app
directory of the cloned repo. - Install the dependencies:
npm install
. - Launch the server application locally or deploy to IBM Cloud:
- To run locally:
- Start the application:
npm start
. - The server can be accessed at http://localhost:3000.
- Start the application:
- To deploy to IBM Cloud:
- Log in to your IBM Cloud account using the IBM Cloud CLI:
ibmcloud login
. - Target a Cloud Foundry org and space:
ibmcloud target --cf
. - Push the app to IBM Cloud:
ibmcloud app push
. - The server can be accessed at a URL using the name given in the
manifest.yml
file (for example, https://my-app-name.bluemix.net).
- Log in to your IBM Cloud account using the IBM Cloud CLI:
- To run locally:
- The api supports a swagger doc interface in a browser, served from
url
/api-docs. Substitutue your particular server address forurl
e.g. http://localhost:3000/api-docs if running locally.
- Go to the
To run the mobile application (using the Xcode iOS Simulator):
- Go to the
code/mobile-app
directory of the cloned repo. - Copy the
.env.example
file in thecode/mobile-app
directory, and create a file named.env
. - Edit the newly created
.env
file:- Update the
STARTER_KIT_SERVER_URL
with the URL to the server app launched in the previous step.
- Update the
- From a terminal:
- Go to the
code/mobile-app
directory. - Install the dependencies:
npm install
. - Go to the
ios
directory:cd ios
. - Install pod dependencies:
pod install
. - Return to the
mobile-app
directory:cd ../
. - Launch the app in the simulator:
npm run ios
. You should be running at least iOS 13.0. - The first time you launch the simulator, you should ensure that you set a Location in the Features menu.
- Go to the
With the application running in the simulator, you should be able to navigate through the various screens:
TBA
This solution starter is made available under the Apache 2 License.