Skip to content

Commit 8905acf

Browse files
committed
Add initial files and configurations for the interviews-webapp and interviews-api applications
0 parents  commit 8905acf

34 files changed

+14378
-0
lines changed

Diff for: .github/workflows/api-deploy.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: API Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'apps/api/**'
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Deploy Worker
17+
uses: cloudflare/wrangler-action@v3
18+
with:
19+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
20+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
21+
wranglerVersion: "3.50.0"
22+
workingDirectory: ./apps/api
23+
command: deploy --minify

Diff for: .github/workflows/webapp-deploy.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: WebApp Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'apps/webapp/**'
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Use Node.js 20.x
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20.x
20+
- name: Install Dependencies
21+
working-directory: ./apps/webapp
22+
run: npm ci
23+
- name: Build
24+
working-directory: ./apps/webapp
25+
run: npm run build
26+
- name: Deploy Page
27+
uses: cloudflare/wrangler-action@v3
28+
with:
29+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
30+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
31+
wranglerVersion: "3.50.0"
32+
workingDirectory: ./apps/webapp
33+
command: pages deploy

Diff for: .gitignore

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/macos,windows,linux
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,linux
3+
4+
### Linux ###
5+
*~
6+
7+
# temporary files which can be created if a process still has a handle open of a deleted file
8+
.fuse_hidden*
9+
10+
# KDE directory preferences
11+
.directory
12+
13+
# Linux trash folder which might appear on any partition or disk
14+
.Trash-*
15+
16+
# .nfs files are created when an open file is removed but is still being accessed
17+
.nfs*
18+
19+
### macOS ###
20+
# General
21+
.DS_Store
22+
.AppleDouble
23+
.LSOverride
24+
25+
# Icon must end with two \r
26+
Icon
27+
28+
29+
# Thumbnails
30+
._*
31+
32+
# Files that might appear in the root of a volume
33+
.DocumentRevisions-V100
34+
.fseventsd
35+
.Spotlight-V100
36+
.TemporaryItems
37+
.Trashes
38+
.VolumeIcon.icns
39+
.com.apple.timemachine.donotpresent
40+
41+
# Directories potentially created on remote AFP share
42+
.AppleDB
43+
.AppleDesktop
44+
Network Trash Folder
45+
Temporary Items
46+
.apdisk
47+
48+
### macOS Patch ###
49+
# iCloud generated files
50+
*.icloud
51+
52+
### Windows ###
53+
# Windows thumbnail cache files
54+
Thumbs.db
55+
Thumbs.db:encryptable
56+
ehthumbs.db
57+
ehthumbs_vista.db
58+
59+
# Dump file
60+
*.stackdump
61+
62+
# Folder config file
63+
[Dd]esktop.ini
64+
65+
# Recycle Bin used on file shares
66+
$RECYCLE.BIN/
67+
68+
# Windows Installer files
69+
*.cab
70+
*.msi
71+
*.msix
72+
*.msm
73+
*.msp
74+
75+
# Windows shortcuts
76+
*.lnk
77+
78+
# End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux

Diff for: .vscode/settings.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.activeBackground": "#c06016",
4+
"activityBar.background": "#c06016",
5+
"activityBar.foreground": "#e7e7e7",
6+
"activityBar.inactiveForeground": "#e7e7e799",
7+
"activityBarBadge.background": "#0a562b",
8+
"activityBarBadge.foreground": "#e7e7e7",
9+
"commandCenter.border": "#e7e7e799",
10+
"sash.hoverBorder": "#c06016",
11+
"statusBar.background": "#924911",
12+
"statusBar.foreground": "#e7e7e7",
13+
"statusBarItem.hoverBackground": "#c06016",
14+
"statusBarItem.remoteBackground": "#924911",
15+
"statusBarItem.remoteForeground": "#e7e7e7",
16+
"titleBar.activeBackground": "#924911",
17+
"titleBar.activeForeground": "#e7e7e7",
18+
"titleBar.inactiveBackground": "#92491199",
19+
"titleBar.inactiveForeground": "#e7e7e799"
20+
},
21+
"peacock.remoteColor": "#924911"
22+
}

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx wrangler pages project create interviews-webapp

Diff for: apps/api/.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

Diff for: apps/api/.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
dist
3+
.wrangler
4+
.dev.vars
5+
6+
# Change them to your taste:
7+
package-lock.json
8+
yarn.lock
9+
pnpm-lock.yaml
10+
bun.lockb

Diff for: apps/api/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
```
2+
npm install
3+
npm run dev
4+
```
5+
6+
```
7+
npm run deploy
8+
```

Diff for: apps/api/package.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"scripts": {
3+
"dev": "wrangler dev src/index.ts",
4+
"deploy": "wrangler deploy --minify src/index.ts"
5+
},
6+
"dependencies": {
7+
"hono": "4.2.4"
8+
},
9+
"devDependencies": {
10+
"@cloudflare/workers-types": "4.20240405.0",
11+
"wrangler": "3.50.0"
12+
}
13+
}

Diff for: apps/api/src/index.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Hono } from 'hono';
2+
3+
const app = new Hono();
4+
5+
app.get('/', (c) => {
6+
return c.text('Hello Hono!');
7+
});
8+
9+
export default app;

Diff for: apps/api/tsconfig.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"module": "ESNext",
5+
"moduleResolution": "Bundler",
6+
"strict": true,
7+
"lib": [
8+
"ESNext"
9+
],
10+
"types": [
11+
"@cloudflare/workers-types"
12+
],
13+
"jsx": "react-jsx",
14+
"jsxImportSource": "hono/jsx"
15+
},
16+
}

Diff for: apps/api/wrangler.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name = "interviews-api"
2+
compatibility_date = "2023-12-01"
3+
main = "src/index.ts"

Diff for: apps/webapp/.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

Diff for: apps/webapp/.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db

Diff for: apps/webapp/.vscode/extensions.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}

Diff for: apps/webapp/.vscode/launch.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}

Diff for: apps/webapp/.vscode/tasks.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

0 commit comments

Comments
 (0)