Skip to content

Commit 4910596

Browse files
authored
Merge pull request #1 from m-prosper-10/polo
Enhance project scaffolding with multiple backend and frontend stacks
2 parents 2223b7c + d6f45e6 commit 4910596

67 files changed

Lines changed: 9316 additions & 894 deletions

Some content is hidden

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

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.git
2+
.github
3+
node_modules
4+
dist
5+
coverage
6+
test-output
7+
*.tgz
8+
.codex
9+
.agents
10+
.kiro
11+
.vscode
12+
.idea
13+
.DS_Store

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- develop
9+
- "feature/**"
10+
pull_request:
11+
12+
jobs:
13+
quality:
14+
name: Build and Test (Node ${{ matrix.node-version }})
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
node-version: [18, 20]
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build
36+
37+
- name: Test
38+
run: npm test
39+
40+
- name: CLI help smoke test
41+
run: node dist/cli.js --help
42+
43+
- name: Package smoke test
44+
run: npm pack --dry-run

.github/workflows/docker.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Docker
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
tags:
9+
- "v*"
10+
pull_request:
11+
12+
permissions:
13+
contents: read
14+
packages: write
15+
security-events: write
16+
17+
jobs:
18+
docker:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Log in to GHCR
31+
if: github.event_name != 'pull_request'
32+
uses: docker/login-action@v3
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Docker metadata
39+
id: meta
40+
uses: docker/metadata-action@v5
41+
with:
42+
images: ghcr.io/${{ github.repository }}
43+
tags: |
44+
type=ref,event=branch
45+
type=ref,event=tag
46+
type=sha
47+
type=raw,value=latest,enable={{is_default_branch}}
48+
49+
- name: Build and export image for scan
50+
if: github.event_name == 'pull_request'
51+
uses: docker/build-push-action@v6
52+
with:
53+
context: .
54+
file: ./Dockerfile
55+
tags: start-it-cli:pr
56+
load: true
57+
push: false
58+
59+
- name: Trivy image scan
60+
if: github.event_name == 'pull_request'
61+
uses: aquasecurity/trivy-action@0.24.0
62+
with:
63+
image-ref: start-it-cli:pr
64+
format: sarif
65+
output: trivy-image.sarif
66+
severity: HIGH,CRITICAL
67+
ignore-unfixed: true
68+
69+
- name: Upload image scan results
70+
if: github.event_name == 'pull_request'
71+
uses: github/codeql-action/upload-sarif@v3
72+
with:
73+
sarif_file: trivy-image.sarif
74+
75+
- name: Build and push image
76+
if: github.event_name != 'pull_request'
77+
uses: docker/build-push-action@v6
78+
with:
79+
context: .
80+
file: ./Dockerfile
81+
push: ${{ github.event_name != 'pull_request' }}
82+
platforms: linux/amd64,linux/arm64
83+
tags: ${{ steps.meta.outputs.tags }}
84+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/security.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Security
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request:
9+
schedule:
10+
- cron: "0 3 * * 1"
11+
12+
permissions:
13+
contents: read
14+
security-events: write
15+
16+
jobs:
17+
dependency-review:
18+
if: github.event_name == 'pull_request'
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
pull-requests: write
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Dependency review
28+
uses: actions/dependency-review-action@v4
29+
30+
npm-audit:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Setup Node
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: 20
40+
cache: npm
41+
42+
- name: Install dependencies
43+
run: npm ci
44+
45+
- name: Audit production dependencies
46+
run: npm audit --omit=dev --audit-level=high
47+
48+
- name: Audit full dependency tree
49+
run: npm audit --audit-level=high
50+
51+
codeql:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Initialize CodeQL
58+
uses: github/codeql-action/init@v3
59+
with:
60+
languages: javascript-typescript
61+
62+
- name: Autobuild
63+
uses: github/codeql-action/autobuild@v3
64+
65+
- name: Perform CodeQL Analysis
66+
uses: github/codeql-action/analyze@v3
67+
68+
trivy-filesystem:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
74+
- name: Trivy filesystem scan
75+
uses: aquasecurity/trivy-action@0.24.0
76+
with:
77+
scan-type: fs
78+
scan-ref: .
79+
format: sarif
80+
output: trivy-fs.sarif
81+
severity: HIGH,CRITICAL
82+
ignore-unfixed: true
83+
84+
- name: Upload Trivy scan results
85+
uses: github/codeql-action/upload-sarif@v3
86+
with:
87+
sarif_file: trivy-fs.sarif

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ coverage/
77
.idea/
88
.npmrc
99
config.bat
10+
.kiro

0 commit comments

Comments
 (0)