Skip to content

Commit 03b9368

Browse files
Initial commit!
1 parent 2cffa91 commit 03b9368

File tree

276 files changed

+46490
-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.

276 files changed

+46490
-0
lines changed

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
!.yarn/*
2+
!/.yarn/releases
3+
!/.yarn/plugins
4+
!/.yarn/sdks
5+
6+
# Swap the comments on the following lines if you don't wish to use zero-installs
7+
# Documentation here: https://yarnpkg.com/features/zero-installs
8+
!.yarn/cache
9+
!.yarn/install-state.gz
10+
server/.yarn/cache/*
11+
client/.yarn/cache/*
12+
server/.yarn/install-state.gz
13+
client/.yarn/install-state.gz
14+
15+
16+
dist
17+
node_modules
18+
.DS_Store
19+
.env
20+
.idea
21+
22+
.eslintcache
23+
.pgdata
24+
.build
25+
**/videos
26+
**/downloads
27+
**/screenshots
28+
yarn.build.json
29+
ssh-keypair*
30+
31+
/database

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/npm.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Bash sets the BASH environment variable, so if it is not set, then we
4+
# are running in a different shell, so manually run ourselves in BASH.
5+
if [ -z "${BASH:-}" ]; then
6+
exec bash "$0" "$@"
7+
fi
8+
9+
npm_version=$(npm -v)
10+
11+
IFS='.'
12+
npm_version=($npm_version)
13+
unset IFS
14+
15+
npm_major=${npm_version[0]}
16+
17+
if [ $npm_major -lt 7 ]; then
18+
echo "NPM Version is below 7 please fix it!"
19+
exit 1
20+
fi

.husky/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
. "$(dirname "$0")/npm.sh"
5+
6+
npx pretty-quick --staged
7+
npx lint-staged

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"jsxSingleQuote": true,
5+
"printWidth": 100
6+
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"emmet.includeLanguages": {
3+
"javascript": "javascriptreact"
4+
}
5+
}

Makefile

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!make
2+
3+
####################################################################
4+
## Define default environment variables for local development
5+
####################################################################
6+
7+
-include .env
8+
9+
export $(shell sed 's/=.*//' .env)
10+
11+
export GIT_LOCAL_BRANCH?=$(shell git rev-parse --abbrev-ref HEAD)
12+
export DEPLOY_DATE?=$(shell date '+%Y%m%d%H%M')
13+
export COMMIT_SHA?=$(shell git rev-parse --short=7 HEAD)
14+
export IMAGE_TAG=${COMMIT_SHA}
15+
16+
export PROJECT := $(or $(PROJECT),pbgp)
17+
export DB_USER := $(or $(DB_USER),db2inst1)
18+
export DB_PASSWORD := $(or $(DB_PASSWORD),development)
19+
export DB_NAME := $(or $(DB_NAME),testdb)
20+
export DB_SERVER := $(or $(DB_SERVER),database)
21+
export DB_PORT := $(or $(DB_PORT),5432)
22+
export GIT_LOCAL_BRANCH := $(or $(GIT_LOCAL_BRANCH),dev)
23+
24+
define deployTag
25+
"${PROJECT}-${DEPLOY_DATE}"
26+
endef
27+
28+
####################################################################
29+
## Status Output
30+
####################################################################
31+
32+
print-status:
33+
@echo " +---------------------------------------------------------+ "
34+
@echo " | Current Settings | "
35+
@echo " +---------------------------------------------------------+ "
36+
@echo " | GIT LOCAL BRANCH: $(GIT_LOCAL_BRANCH) "
37+
@echo " | PROJECT: $(PROJECT) "
38+
@echo " | DB_NAME: $(DB_NAME) "
39+
@echo " | DB_SERVER: $(DB_SERVER) "
40+
@echo " | DB_USER: $(DB_USER) "
41+
@echo " +---------------------------------------------------------+ "
42+
43+
####################################################################
44+
## Local Development
45+
####################################################################
46+
47+
run-local:
48+
@echo "+\n++ Make: Running locally ...\n+"
49+
@docker-compose -f docker-compose.dev.yml up -d
50+
51+
run-local-client:
52+
@echo "+\n++ Make: Running locally ...\n+"
53+
@docker-compose -f docker-compose.dev.yml up client
54+
55+
run-local-server:
56+
@echo "+\n++ Make: Running locally ...\n+"
57+
@docker-compose -f docker-compose.dev.yml up server
58+
59+
run-local-db:
60+
@echo "+\n++ Make: Running db locally ...\n+"
61+
@docker-compose -f docker-compose.dev.yml up database
62+
63+
close-local:
64+
@echo "+\n++ Make: Closing local container ...\n+"
65+
@docker-compose -f docker-compose.dev.yml down
66+
67+
local-client-workspace:
68+
@docker exec -it $(PROJECT)-client sh
69+
70+
local-server-workspace:
71+
@docker exec -it $(PROJECT)-server bash
72+
73+
local-db-workspace:
74+
@docker exec -it $(PROJECT)-database bash
75+
76+
migrate-database-up:
77+
@docker exec -i $(PROJECT)-server npm run migrations-up
78+
79+
migrate-database-down:
80+
@docker exec -i $(PROJECT)-server npm run migrations-down
81+
82+
local-server-logs:
83+
@docker logs $(PROJECT)-server --tail 25 --follow
84+
85+
local-client-logs:
86+
@docker logs $(PROJECT)-client --tail 25 --follow
87+
88+
curl-client:
89+
@docker exec -i $(PROJECT)-server curl localhost:3000

client/.browserslistrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[production]
2+
>0.2%
3+
not dead
4+
not op_mini all
5+
6+
[development]
7+
last 1 chrome version
8+
last 1 firefox version
9+
last 1 safari version
10+
last 1 ie version

client/.env.development

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
REACT_APP_IBM_CLIENT_ID=126f2431-71b1-4230-8b48-71e95670c5c0
2+
REACT_APP_IBM_DISCOVERY_ENDPOINT=https://us-south.appid.cloud.ibm.com/oauth/v4/05b4e556-e108-4500-823a-bbef8da28d64/.well-known/openid-configuration
3+
REACT_APP_IS_DEV=true
4+
REACT_APP_GRANT_APPROVER_EMAIL=[email protected]
5+
REACT_APP_GRANT_APPROVER_CHECK_FLAG=false
6+
REACT_APP_IS_CLOSED=false
7+
REACT_APP_CLOSED_HEADER_TEXT=Opps!
8+
REACT_APP_CLOSED_BODY_TEXT=Hello there this application is not available

client/.eslintrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": ["react-app", "plugin:jsx-a11y/recommended"],
3+
"plugins": ["react", "react-hooks", "jsx-a11y"],
4+
"rules": {
5+
"import/no-anonymous-default-export": [2, { "allowArrowFunction": true }],
6+
"no-unused-vars": "warn"
7+
},
8+
"settings": {
9+
"react": {
10+
"version": "17.0.2"
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)