Skip to content

Commit 9c88cc8

Browse files
committed
Merge main paideventroutes
2 parents 7b32c6a + c38551c commit 9c88cc8

File tree

115 files changed

+9790
-1936
lines changed

Some content is hidden

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

115 files changed

+9790
-1936
lines changed

.devcontainer/devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
3+
{
4+
"name": "Ubuntu",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/base:jammy",
7+
"features": {
8+
"ghcr.io/devcontainers/features/node:1": {},
9+
"ghcr.io/devcontainers/features/aws-cli:1": {},
10+
"ghcr.io/jungaretti/features/make:1": {},
11+
"ghcr.io/customink/codespaces-features/sam-cli:1": {}
12+
},
13+
14+
// Features to add to the dev container. More info: https://containers.dev/features.
15+
// "features": {},
16+
17+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
18+
"forwardPorts": [
19+
8080,
20+
5173
21+
],
22+
"customizations": {
23+
"vscode": {
24+
"extensions": [
25+
"EditorConfig.EditorConfig",
26+
"waderyan.gitblame",
27+
"Gruntfuggly.todo-tree"
28+
]
29+
}
30+
}
31+
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
// "postCreateCommand": "uname -a",
34+
35+
// Configure tool-specific properties.
36+
// "customizations": {},
37+
38+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
39+
// "remoteUser": "root"
40+
}

.editorconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ trim_trailing_whitespace = true
1010

1111
[*.md]
1212
max_line_length = off
13-
trim_trailing_whitespace = false
13+
trim_trailing_whitespace = false
14+
15+
[{Makefile,**.mk}]
16+
# Use tabs for indentation (Makefiles require tabs)
17+
indent_style = tab

.env.sample

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
AadValidClientId="39c28870-94e4-47ee-b4fb-affe0bf96c9f"
21
AadClientSecret=""
32
RunEnvironment="dev"
4-
JwtSigningKey="YOUR_RANDOM_STRING HERE"
3+
JwtSigningKey="YOUR_RANDOM_STRING HERE"
4+
VITE_RUN_ENVIRONMENT="local-dev"
5+
AWS_REGION=us-east-1

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/**/*.d.ts
1+
/**/*.d.ts
2+
vite.config.ts

.eslintrc

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
2-
"extends": ["plugin:prettier/recommended", "plugin:@typescript-eslint/recommended"],
2+
"extends": [
3+
"plugin:prettier/recommended",
4+
"plugin:@typescript-eslint/recommended"
5+
],
36
"plugins": ["import"],
47
"rules": {
5-
// turn on errors for missing imports
68
"import/no-unresolved": "error",
79
"import/extensions": [
810
"error",
@@ -13,26 +15,32 @@
1315
"ts": "never",
1416
"tsx": "never"
1517
}
16-
],
17-
"no-unused-vars": "off",
18-
"max-classes-per-file": "off",
19-
"func-names": "off",
20-
"@typescript-eslint/no-unused-vars": [
21-
"warn", // or "error"
22-
{
23-
"argsIgnorePattern": "^_",
24-
"varsIgnorePattern": "^_",
25-
"caughtErrorsIgnorePattern": "^_"
26-
}
27-
]
18+
],
19+
"no-unused-vars": "off",
20+
"max-classes-per-file": "off",
21+
"func-names": "off",
22+
"@typescript-eslint/no-unused-vars": [
23+
"warn",
24+
{
25+
"argsIgnorePattern": "^_",
26+
"varsIgnorePattern": "^_",
27+
"caughtErrorsIgnorePattern": "^_"
28+
}
29+
],
30+
"@typescript-eslint/no-explicit-any": "warn",
31+
"@typescript-eslint/explicit-module-boundary-types": "off"
2832
},
2933
"settings": {
3034
"import/parsers": {
3135
"@typescript-eslint/parser": [".ts", ".tsx", ".js", ".jsx"]
3236
},
3337
"import/resolver": {
3438
"typescript": {
35-
"alwaysTryTypes": true
39+
"alwaysTryTypes": true,
40+
"project": [
41+
"src/api/tsconfig.json", // Path to tsconfig.json in src/api
42+
"src/ui/tsconfig.json" // Path to tsconfig.json in src/ui
43+
]
3644
}
3745
}
3846
},
@@ -42,6 +50,13 @@
4250
"rules": {
4351
"@typescript-eslint/no-explicit-any": "off"
4452
}
53+
},
54+
{
55+
"files": ["src/ui/*", "src/ui/**/*"],
56+
"rules": {
57+
"@typescript-eslint/no-explicit-any": "off",
58+
"@typescript-eslint/no-unused-vars": "off"
59+
}
4560
}
4661
]
4762
}

.git-blame-ignore-revs

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

.github/workflows/deploy-dev.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
deploy-dev:
2828
runs-on: ubuntu-latest
2929
concurrency:
30-
group: ${{ github.event.repository.name }}-dev
30+
group: ${{ github.event.repository.name }}-dev-env
3131
cancel-in-progress: false
3232
environment: "AWS DEV"
33-
name: Deploy to AWS DEV
33+
name: Deploy to DEV
3434
needs:
3535
- test-unit
3636
steps:
@@ -53,16 +53,28 @@ jobs:
5353
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
5454
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
5555
aws-region: us-east-1
56-
- run: make deploy_dev
56+
- name: Publish to AWS
57+
run: make deploy_dev
5758
env:
5859
HUSKY: "0"
59-
test:
60+
VITE_RUN_ENVIRONMENT: dev
61+
- name: Publish to Cloudflare
62+
uses: cloudflare/pages-action@v1
63+
with:
64+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
65+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
66+
projectName: management-ui-dev
67+
directory: dist_ui/
68+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
69+
branch: main
70+
71+
test-dev:
6072
runs-on: ubuntu-latest
6173
name: Run Live Integration Tests
6274
needs:
6375
- deploy-dev
6476
concurrency:
65-
group: ${{ github.event.repository.name }}-dev
77+
group: ${{ github.event.repository.name }}-dev-env
6678
cancel-in-progress: false
6779
steps:
6880
- name: Set up Node

.github/workflows/deploy-prod.yml

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
name: Run Unit Tests
1313
steps:
14-
- name: Set up Node for testing
14+
- name: Set up Node
1515
uses: actions/setup-node@v4
1616
with:
1717
node-version: 20.x
@@ -30,7 +30,7 @@ jobs:
3030
group: ${{ github.event.repository.name }}-dev
3131
cancel-in-progress: false
3232
environment: "AWS DEV"
33-
name: Deploy to AWS DEV
33+
name: Deploy to DEV
3434
needs:
3535
- test-unit
3636
steps:
@@ -53,10 +53,22 @@ jobs:
5353
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
5454
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
5555
aws-region: us-east-1
56-
- run: make deploy_dev
56+
- name: Publish to AWS
57+
run: make deploy_dev
5758
env:
5859
HUSKY: "0"
59-
test:
60+
VITE_RUN_ENVIRONMENT: dev
61+
- name: Publish to Cloudflare
62+
uses: cloudflare/pages-action@v1
63+
with:
64+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
65+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
66+
projectName: management-ui-dev
67+
directory: dist_ui/
68+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
69+
branch: main
70+
71+
test-dev:
6072
runs-on: ubuntu-latest
6173
name: Run Live Integration Tests
6274
needs:
@@ -65,22 +77,23 @@ jobs:
6577
group: ${{ github.event.repository.name }}-dev
6678
cancel-in-progress: false
6779
steps:
68-
- name: Set up Node for testing
80+
- name: Set up Node
6981
uses: actions/setup-node@v4
7082
with:
7183
node-version: 20.x
7284
- uses: actions/checkout@v4
7385
env:
74-
HUSKY: "0"
86+
HUSKY: "0"
7587
- name: Set up Python 3.11 for testing
7688
uses: actions/setup-python@v5
7789
with:
7890
python-version: 3.11
7991
- name: Run live testing
8092
run: make test_live_integration
81-
deploy-aws-prod:
93+
94+
deploy-prod:
8295
runs-on: ubuntu-latest
83-
name: Deploy to AWS PROD
96+
name: Deploy to Prod
8497
concurrency:
8598
group: ${{ github.event.repository.name }}-prod
8699
cancel-in-progress: false
@@ -94,7 +107,7 @@ jobs:
94107
node-version: 20.x
95108
- uses: actions/checkout@v4
96109
env:
97-
HUSKY: "0"
110+
HUSKY: "0"
98111
- uses: aws-actions/setup-sam@v2
99112
with:
100113
use-installer: true
@@ -107,14 +120,26 @@ jobs:
107120
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
108121
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
109122
aws-region: us-east-1
110-
- run: make deploy_prod
123+
- name: Publish to AWS
124+
run: make deploy_prod
111125
env:
112126
HUSKY: "0"
127+
VITE_RUN_ENVIRONMENT: prod
128+
- name: Publish to Cloudflare
129+
uses: cloudflare/pages-action@v1
130+
with:
131+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
132+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
133+
projectName: management-ui-prod
134+
directory: dist_ui/
135+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
136+
branch: main
137+
113138
health-check-prod:
114139
runs-on: ubuntu-latest
115140
name: Confirm services healthy
116141
needs:
117-
- deploy-aws-prod
142+
- deploy-prod
118143
concurrency:
119144
group: ${{ github.event.repository.name }}-prod
120145
cancel-in-progress: false
@@ -125,6 +150,6 @@ jobs:
125150
node-version: 20.x
126151
- uses: actions/checkout@v4
127152
env:
128-
HUSKY: "0"
153+
HUSKY: "0"
129154
- name: Call the health check script
130155
run: make prod_health_check

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ dist
133133
.aws-sam/
134134
build/
135135
dist/
136+
dist_ui/
136137

137138
*.pyc
138-
__pycache__
139+
__pycache__

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
yarn run lint-staged
1+
yarn lint --fix

0 commit comments

Comments
 (0)