Skip to content

Commit ba36cc8

Browse files
committed
Add CI/CD and development guides
1 parent 147b8ed commit ba36cc8

3 files changed

Lines changed: 180 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ npm run dev
151151
npm test
152152
```
153153

154+
## Developer Docs
155+
156+
- Contribution guide: [CONTRIBUTING.md](./CONTRIBUTING.md)
157+
- Local development: [docs/DEVELOPMENT.md](./docs/DEVELOPMENT.md)
158+
- Architecture: [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md)
159+
- CI / CD: [docs/CI_CD.md](./docs/CI_CD.md)
160+
154161
## Project Structure
155162

156163
```text

docs/CI_CD.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# CI / CD Guide
2+
3+
This repository ships with GitHub Actions workflows for quality, security, Docker validation, and GHCR publishing.
4+
5+
## Workflows
6+
7+
### CI
8+
9+
File:
10+
11+
- `.github/workflows/ci.yml`
12+
13+
Behavior:
14+
15+
- installs dependencies
16+
- runs `npm run build`
17+
- runs `npm test`
18+
- runs a CLI `--help` smoke test
19+
- runs `npm pack --dry-run`
20+
21+
### Security
22+
23+
File:
24+
25+
- `.github/workflows/security.yml`
26+
27+
Behavior:
28+
29+
- dependency review on pull requests
30+
- `npm audit` checks
31+
- CodeQL analysis
32+
- Trivy filesystem scan with SARIF upload
33+
34+
### Docker
35+
36+
File:
37+
38+
- `.github/workflows/docker.yml`
39+
40+
Behavior:
41+
42+
- validates Docker builds on pull requests
43+
- runs Trivy image scan on PR builds
44+
- pushes images to GHCR on `main`, `master`, and version tags
45+
46+
## Container Image
47+
48+
Files:
49+
50+
- `Dockerfile`
51+
- `.dockerignore`
52+
53+
The image builds the CLI in a builder stage and ships a runtime image that executes:
54+
55+
```bash
56+
node dist/cli.js
57+
```
58+
59+
## GHCR Publishing
60+
61+
Published image name:
62+
63+
```text
64+
ghcr.io/<owner>/<repo>
65+
```
66+
67+
Tags are generated from:
68+
69+
- branch refs
70+
- git tags
71+
- commit SHA
72+
- `latest` on the default branch
73+
74+
## Local Validation Before Push
75+
76+
```bash
77+
npm test
78+
npm run build
79+
docker build -t start-it-cli:local .
80+
```
81+
82+
## When Updating Workflows
83+
84+
- keep local build/test commands aligned with CI
85+
- avoid adding checks that the repo cannot satisfy locally
86+
- document new workflow expectations in this file

docs/DEVELOPMENT.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Development Guide
2+
3+
This document covers local development workflow for `start-it-cli`.
4+
5+
## Prerequisites
6+
7+
- Node.js 18+ recommended
8+
- npm
9+
10+
## Install
11+
12+
```bash
13+
npm install
14+
```
15+
16+
## Build
17+
18+
```bash
19+
npm run build
20+
```
21+
22+
This compiles TypeScript from `src/` into `dist/`.
23+
24+
## Run Locally
25+
26+
Interactive mode:
27+
28+
```bash
29+
npm run dev
30+
```
31+
32+
Command-driven examples:
33+
34+
```bash
35+
npm run dev -- my-app --stack react-vite --yes
36+
```
37+
38+
```bash
39+
npm run dev -- fire_extinguisher_ms --app-type backend --stack python-fastapi --path /tmp --yes
40+
```
41+
42+
## Test
43+
44+
```bash
45+
npm test
46+
```
47+
48+
The test suite validates generated project structure and generated guidance artifacts.
49+
50+
## Common Workflow
51+
52+
1. Update prompt, config, or generation logic.
53+
2. Run `npm test`.
54+
3. Run `npm run build`.
55+
4. Update user-facing docs if CLI behavior changed.
56+
57+
## Where To Work
58+
59+
- `src/cli.ts`
60+
- CLI parsing and prompts
61+
- `src/workflow.ts`
62+
- available app types and stacks
63+
- `src/generator.ts`
64+
- generation routing
65+
- `src/templates/`
66+
- backend builders and older static templates
67+
- `src/frontend/`
68+
- frontend scaffolders
69+
- `src/aiml/`
70+
- AI/ML scaffolders
71+
- `src/dsa/`
72+
- DSA scaffolders
73+
- `src/agent/`
74+
- AI guidance composition
75+
76+
## Packaging Smoke Check
77+
78+
```bash
79+
npm pack --dry-run
80+
```
81+
82+
## Docker Smoke Check
83+
84+
```bash
85+
docker build -t start-it-cli:local .
86+
docker run --rm start-it-cli:local --help
87+
```

0 commit comments

Comments
 (0)