-
Notifications
You must be signed in to change notification settings - Fork 26
UI updates & parse script #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alaaltoros
wants to merge
12
commits into
scrtlabs:master
Choose a base branch
from
alaaltoros:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a787766
Google login
alaaltoros da9c0d4
Contribute page component skeleton
alaaltoros 499d814
Contribute page steps
alaaltoros 3cf78a6
Contribute, Auth & page 3
alaaltoros 2b57f8c
Parse script updated
alaaltoros 7a93763
Integrate login with API
alaaltoros f439ac0
Rrport & Location history upload
alaaltoros e551d3f
Remove UIcode/server.js and update directory structure
alaaltoros 6a218af
Results formatting
alaaltoros afa8762
Correct README.md
alaaltoros b75469e
Updating enclave.js
alaaltoros 74644cb
MAINT: remove conflicting yarn.lock
lacabra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,3 +124,4 @@ backend/data/ | |
|
||
enigma-types.h | ||
|
||
UIcode/.env.development |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
REACT_APP_API_URL=http://localhost:4080 | ||
REACT_APP_GOOGLE_CLIENT_ID=119469794689-hhq7rpcmd88c7r5gkiom0u2pakfka3cd.apps.googleusercontent.com | ||
REACT_APP_ENCLAVE_URL=https://safetrace.enigma.co | ||
REACT_APP_GOOGLE_MAPS_API_KEY=AIzaSyCmJYELeiVHdM8w8azo-T3W3ainZEv2QfQ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
REACT_APP_API_URL= | ||
REACT_APP_GOOGLE_CLIENT_ID= | ||
REACT_APP_ENCLAVE_URL=https://safetrace.enigma.co | ||
REACT_APP_GOOGLE_MAPS_API_KEY= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,49 @@ | ||
# React File Upload | ||
|
||
> This is a full stack React-Express file uploader but could easily be modified to work with any back-end including cloud storage | ||
- This is a React UI to interact with the backend and the Enclave service. | ||
- It is still in development, for now using it client you can report new user data and upload location history. | ||
- For simplicity, we are currently only supporting Google sign-in | ||
|
||
## Quick Start | ||
|
||
```bash | ||
# Install dependencies server/client | ||
npm install | ||
cd client | ||
# Install dependencies | ||
npm install | ||
|
||
# Create .env.development file as follows | ||
touch .env.development | ||
``` | ||
|
||
Obtain a Google client ID following the instructions on [https://developers.google.com/identity/sign-in/web/sign-in](https://developers.google.com/identity/sign-in/web/sign-in) and make sure to include the `localhost:3000` to authorized origins. | ||
Then add this variable to your `.env.development` | ||
|
||
```bash | ||
#set google client id i.e. 119469794689-hhq7rpcmd88c7r5gkiom0u2pakfka3cd.apps.googleusercontent.com | ||
echo "REACT_APP_GOOGLE_CLIENT_ID=119469794689-hhq7rpcmd88c7r5gkiom0u2pakfka3cd.apps.googleusercontent.com" >> .env.development | ||
``` | ||
|
||
Top run the backend API check [https://github.com/cmalfesi/SafeTrace/tree/master/backend](https://github.com/cmalfesi/SafeTrace/tree/master/backend) | ||
Then add the API URL to your `.env.development` | ||
|
||
```bash | ||
#set google client id i.e. 119469794689-hhq7rpcmd88c7r5gkiom0u2pakfka3cd.apps.googleusercontent.com | ||
echo "REACT_APP_API_URL=http://localhost:4080" >> .env.development | ||
``` | ||
|
||
Include the Enclave URL in your `.env.development` | ||
```bash | ||
echo "REACT_APP_ENCLAVE_URL=https://safetrace.enigma.co" >> .env.development | ||
``` | ||
|
||
Include Google Maps API Key in your `.env.development`, you can find instructions on how to obtain it here [https://developers.google.com/maps/documentation/javascript/get-api-key](https://developers.google.com/maps/documentation/javascript/get-api-key) | ||
|
||
```bash | ||
echo "REACT_APP_GOOGLE_MAPS_API_KEY=AaLeiVHdICmJYzM8w8aSyEzo-TainZ3W3Ev2QfQ" >> .env.development | ||
``` | ||
|
||
Finally to run the client execute the following commands: | ||
|
||
```bash | ||
# Serve on localhost:3000 | ||
npm run dev | ||
npm start | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.