Skip to content

Commit 1421fb2

Browse files
committed
first commit 🎉
0 parents  commit 1421fb2

File tree

120 files changed

+37251
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+37251
-0
lines changed

.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
REACT_APP_FIRE_BASE_KEY = ''
2+
REACT_APP_FIRE_BASE_PROJECT_ID = ''
3+
REACT_APP_FIRE_BASE_AUTH_DOMAIN = ''
4+
REACT_APP_FIRE_BASE_DB_URL = ''
5+
REACT_APP_FIRE_BASE_STORAGE_BUCKET = ''
6+
REACT_APP_FIRE_BASE_MESSAGING_SENDER_ID = ''
7+
REACT_APP_FIRE_BASE_APP_ID = ''
8+
REACT_APP_FIRE_BASE_MEASURMENT_ID = ''
9+
REACT_APP_CLOUD_FUNCTIONS_REST_API = '<FIREBASE_CLOUD_FUNCTIONS_URL>/requestsApp'
10+
REACT_APP_LOGIN_PAGE_URL = 'http://localhost:3000/login'

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/*
2+
functions/*

.eslintrc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"extends": [
3+
"airbnb",
4+
"prettier",
5+
"prettier/react",
6+
"plugin:jest/recommended"
7+
],
8+
"plugins": ["prettier", "jest"],
9+
"rules": {
10+
"react/jsx-filename-extension": [
11+
1,
12+
{
13+
"extensions": [".js", ".jsx"]
14+
}
15+
],
16+
"react/prop-types": 0,
17+
"no-underscore-dangle": 0,
18+
"import/imports-first": ["error", "absolute-first"],
19+
"import/newline-after-import": "error",
20+
"import/prefer-default-export": 0,
21+
"semi": "error",
22+
"jsx-a11y/click-events-have-key-events": 0,
23+
"jsx-a11y/no-static-element-interactions": 0,
24+
"jsx-a11y/anchor-is-valid": 0,
25+
"react/require-default-props": 0,
26+
"jest/expect-expect": 0,
27+
"import/no-cycle": 0,
28+
"react/button-has-type": 0
29+
},
30+
"globals": {
31+
"window": true,
32+
"document": true,
33+
"localStorage": true,
34+
"FormData": true,
35+
"FileReader": true,
36+
"Blob": true,
37+
"navigator": true,
38+
"Headers": true,
39+
"Request": true,
40+
"fetch": true,
41+
"reducerTester": true,
42+
"mountWithProvider": true,
43+
"shallowWithProvider": true,
44+
"shallowWithRouter": true,
45+
"mountWithRouter": true
46+
},
47+
"parser": "babel-eslint"
48+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Production CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Setup Node.js environment
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: '12.x'
18+
- name: npm install, build, and test
19+
run: |
20+
npm ci
21+
npm run build
22+
env:
23+
REACT_APP_FIRE_BASE_KEY: ${{ secrets.FIRE_BASE_KEY_PRODUCTION }}
24+
REACT_APP_FIRE_BASE_AUTH_DOMAIN: ${{ secrets.FIRE_BASE_AUTH_DOMAIN_PRODUCTION }}
25+
REACT_APP_FIRE_BASE_DB_URL: ${{ secrets.FIRE_BASE_DB_URL_PRODUCTION }}
26+
REACT_APP_FIRE_BASE_PROJECT_ID: ${{ secrets.FIRE_BASE_PROJECT_ID_PRODUCTION }}
27+
REACT_APP_FIRE_BASE_STORAGE_BUCKET: ${{ secrets.FIRE_BASE_STORAGE_BUCKET_PRODUCTION }}
28+
REACT_APP_FIRE_BASE_MESSAGING_SENDER_ID: ${{ secrets.FIRE_BASE_MESSAGING_SENDER_ID_PRODUCTION }}
29+
REACT_APP_FIRE_BASE_APP_ID: ${{ secrets.FIRE_BASE_APP_ID_PRODUCTION }}
30+
REACT_APP_FIRE_BASE_MEASURMENT_ID: ${{ secrets.FIRE_BASE_MEASURMENT_ID_PRODUCTION }}
31+
REACT_APP_CLOUD_FUNCTIONS_REST_API: ${{ secrets.CLOUD_FUNCTIONS_REST_API_PRODUCTION }}
32+
REACT_APP_LOGIN_PAGE_URL: ${{ secrets.LOGIN_PAGE_URL_PRODUCTION }}
33+
- name: Firebase deployment
34+
run: |
35+
npm install -g firebase-tools
36+
firebase deploy -P production --token $FIREBASE_TOKEN
37+
env:
38+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

.github/workflows/pull-requests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Pull Request CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- development
8+
- feature/*
9+
10+
jobs:
11+
build:
12+
name: Build
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@master
18+
with:
19+
ref: ${{ github.ref }}
20+
- name: Setup Node.js environment
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: '12.x'
24+
- name: Installing dependencies
25+
run: npm ci
26+
- name: Building project
27+
run: npm run build
28+
tests:
29+
name: Testing
30+
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v1
35+
- name: Setup Node.js environment
36+
uses: actions/setup-node@v1
37+
with:
38+
node-version: '12.x'
39+
- name: Installing dependencies
40+
run: npm ci
41+
- name: Running project tests
42+
run: CI=true npm test
43+
env:
44+
REACT_APP_FIRE_BASE_KEY: ${{ secrets.FIREBASE_TOKEN }}
45+
REACT_APP_FIRE_BASE_AUTH_DOMAIN: ${{ secrets.FIRE_BASE_AUTH_DOMAIN_STAGING }}
46+
REACT_APP_FIRE_BASE_DB_URL: ${{ secrets.FIRE_BASE_DB_URL_STAGING }}
47+
REACT_APP_FIRE_BASE_PROJECT_ID: ${{ secrets.FIRE_BASE_PROJECT_ID_STAGING }}
48+
REACT_APP_FIRE_BASE_STORAGE_BUCKET: ${{ secrets.FIRE_BASE_STORAGE_BUCKET_STAGING }}
49+
REACT_APP_FIRE_BASE_MESSAGING_SENDER_ID: ${{ secrets.FIRE_BASE_MESSAGING_SENDER_ID_STAGING }}
50+
REACT_APP_FIRE_BASE_APP_ID: ${{ secrets.FIRE_BASE_APP_ID_STAGING }}
51+
REACT_APP_FIRE_BASE_MEASURMENT_ID: ${{ secrets.FIRE_BASE_MEASURMENT_ID_STAGING }}
52+
REACT_APP_CLOUD_FUNCTIONS_REST_API: ${{ secrets.CLOUD_FUNCTIONS_REST_API_STAGING }}
53+
REACT_APP_LOGIN_PAGE_URL: ${{ secrets.LOGIN_PAGE_URL_STAGING }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Staging CI
2+
3+
on:
4+
push:
5+
branches:
6+
- development
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Setup Node.js environment
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: '12.x'
18+
- name: npm install, build, and test
19+
run: |
20+
npm ci
21+
cd functions
22+
npm ci
23+
cd ..
24+
npm run build
25+
env:
26+
REACT_APP_FIRE_BASE_KEY: ${{ secrets.FIRE_BASE_KEY_STAGING }}
27+
REACT_APP_FIRE_BASE_AUTH_DOMAIN: ${{ secrets.FIRE_BASE_AUTH_DOMAIN_STAGING }}
28+
REACT_APP_FIRE_BASE_DB_URL: ${{ secrets.FIRE_BASE_DB_URL_STAGING }}
29+
REACT_APP_FIRE_BASE_PROJECT_ID: ${{ secrets.FIRE_BASE_PROJECT_ID_STAGING }}
30+
REACT_APP_FIRE_BASE_STORAGE_BUCKET: ${{ secrets.FIRE_BASE_STORAGE_BUCKET_STAGING }}
31+
REACT_APP_FIRE_BASE_MESSAGING_SENDER_ID: ${{ secrets.FIRE_BASE_MESSAGING_SENDER_ID_STAGING }}
32+
REACT_APP_FIRE_BASE_APP_ID: ${{ secrets.FIRE_BASE_APP_ID_STAGING }}
33+
REACT_APP_FIRE_BASE_MEASURMENT_ID: ${{ secrets.FIRE_BASE_MEASURMENT_ID_STAGING }}
34+
REACT_APP_CLOUD_FUNCTIONS_REST_API: ${{ secrets.CLOUD_FUNCTIONS_REST_API_STAGING }}
35+
REACT_APP_LOGIN_PAGE_URL: ${{ secrets.LOGIN_PAGE_URL_STAGING }}
36+
- name: Firebase deployment
37+
run: |
38+
npm install -g firebase-tools
39+
firebase deploy -P staging --token $FIREBASE_TOKEN
40+
env:
41+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

.gitignore

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
62+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
63+
64+
# dependencies
65+
/node_modules
66+
/.pnp
67+
.pnp.js
68+
69+
# testing
70+
/coverage
71+
72+
# production
73+
/build
74+
75+
# misc
76+
.DS_Store
77+
.env.local
78+
.env.development.local
79+
.env.test.local
80+
.env.production.local
81+
82+
npm-debug.log*
83+
yarn-debug.log*
84+
yarn-error.log*
85+
86+
.firebaserc

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

0 commit comments

Comments
 (0)