Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
cache: npm

- name: Install dependencies
Expand All @@ -44,6 +44,12 @@ jobs:
- name: Run fixture demo
run: node dist/index.js demo

- name: Verify theme catalog
run: node dist/index.js themes

- name: Verify deployment manifest
run: node -e "const fs=require('fs');const manifest=JSON.parse(fs.readFileSync('output/site-manifest.json','utf8'));if(manifest.formatVersion!==1||typeof manifest.projectCount!=='number')process.exit(1);console.log('Manifest ok: '+manifest.projectCount+' projects')"

- name: Store demo output
if: success()
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
cache: npm

- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dist/
coverage/
data/
output/
public/
*.db
*.db-journal
*.db-shm
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Local checks

Use Node.js 20 or newer.
Use Node.js 22 LTS or newer.

```bash
npm ci
Expand All @@ -15,8 +15,15 @@ npm test
Use fixtures for changes that need repeatable data.
Do not add credentials, private repository data, or generated output.

## Feature areas

- Themes: add palettes in `src/theme/palette.ts`.
- Deploy targets: add adapters in `src/deploy/`.
- The publish step writes `site-manifest.json`.
- Keep every behavior deterministic and covered by a test.

## Pull requests

Explain the user value and the data path.
List the checks that you ran.
Keep public claims tied to repository evidence.
Keep public claims tied to repository evidence.
148 changes: 98 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# EngineerProfile

EngineerProfile builds a local engineering portfolio from public repository data.
It stores repository metadata, commits, releases, privacy settings, and preview
paths in SQLite. It publishes a static site from these records.
EngineerProfile builds a local engineering portfolio from public repository data. It stores repository metadata, commits, releases, privacy settings, previews, and publish records in SQLite. It publishes a static site from these records.

## Value

- Keep portfolio facts close to their source data.
- Refresh project cards from public GitHub repositories.
- Build release notes from releases or conventional commits.
- Capture repeatable project previews with Playwright.
- Hide projects and redact author emails before publication.
- Choose a presentation theme and override its accent.
- Publish a deployment manifest with each site build.
- Copy the site to a local deploy target.
- Run one configured refresh from a scheduled workflow.

The fixture demo runs without secrets and without network access.
Expand All @@ -30,28 +30,32 @@ flowchart LR
L --> W[Publisher]
P --> W
S --> W
T[Theme] --> W
W --> O[Static output]
W --> M[Manifest]
O --> X[Deploy target]
```

| Area | Responsibility |
| --- | --- |
| `engineer-profile.config.json` | Store owner, presentation, refresh, paths, and privacy settings. |
| `engineer-profile.config.json` | Store owner, presentation, theme, deploy, paths, and privacy settings. |
| `src/config/` | Validate checked-in JSON and merge safe defaults. |
| `src/refresh/` | Coordinate ingest, best-effort capture, and static publishing. |
| `src/ingest/` | Fetch public GitHub data and map it to records. |
| `src/db/` | Store projects, commits, changelogs, and audit events. |
| `src/changelog/` | Prefer release notes and fall back to commit groups. |
| `src/privacy/` | Hide projects and block sensitive commit messages. |
| `src/preview/` | Capture fixed viewport screenshots with Playwright. |
| `src/publish/` | Render HTML, changelog files, and preview assets. |
| `src/theme/` | Resolve built-in palettes and theme overrides. |
| `src/publish/` | Render HTML, changelog files, preview assets, and the manifest. |
| `src/deploy/` | Copy the published snapshot to local targets. |
| `fixtures/` | Provide deterministic demo data and local preview pages. |

The refresh command runs each stage in a fixed order.
If a preview fails, the command reports the skip and keeps the rest of the snapshot.
The refresh command runs each stage in a fixed order. If a preview fails, the command reports the skip and keeps the rest of the snapshot.

## Setup

Use Node.js 20 or newer.
Use Node.js 22 LTS or newer.

```bash
npm ci
Expand All @@ -61,44 +65,88 @@ npm run demo

Open `output/index.html` in a browser.

The demo creates a local SQLite database under `data/`.
It writes the static site under `output/`.
Both directories are ignored by Git.
The demo creates a local SQLite database under `data/`. It writes the static site under `output/`. Both directories are ignored by Git.

## Configuration

`engineer-profile.config.json` is the checked-in source for scheduled refreshes.
It sets the GitHub owner, site presentation, repository limit, paths, and privacy controls.
`engineer-profile.config.json` is the checked-in source for scheduled refreshes. It sets the owner, presentation, theme, deploy targets, repository limit, paths, and privacy controls.

The loader accepts repository limits from 1 through 100.
It rejects malformed values before network access.
CLI `--config`, `--data`, and `--output` options override file values.
The loader rejects malformed values before network access. CLI `--config`, `--data`, and `--output` options override file values.

Run a network-backed refresh with the checked-in settings:

```bash
npm run refresh
```

The refresh command reads public repositories, captures previews, publishes HTML,
and reports skipped captures.
The refresh reads public repositories, captures previews, publishes HTML, and reports skipped captures.

GitHub ingestion uses the public API.
Set `GITHUB_TOKEN` for a higher rate limit.
GitHub ingestion uses the public API. Set `GITHUB_TOKEN` for a higher rate limit.

```powershell
$env:GITHUB_TOKEN="your-token"
npm run refresh
```

Do not put a token in repository files.
Use `.env.example` as a variable reference.
Do not put a token in repository files. Use `.env.example` as a variable reference.

## Themes

The published site uses one built-in theme. Set `theme.name` in the configuration.

| Name | Appearance |
| --- | --- |
| `deep-space` | Dark palette with blue accents. Default. |
| `paper` | Light palette with dark text and strong contrast. |

List built-in themes:

```bash
node dist/index.js themes
```

Override presentation tokens inside the theme:

```json
{
"theme": {
"name": "deep-space",
"accent": "#67b7ff",
"radius": "16px",
"font": "Inter, system-ui, sans-serif"
}
}
```

`accent` must be a hex color. `radius` is a CSS length. `font` is a CSS font stack.

## Deployment

Each publish writes `site-manifest.json`. The manifest lists projects, files, and screenshots. Deployment tooling can read this file.

Add a local deploy target:

```json
{
"deploy": {
"targets": [
{ "name": "preview", "type": "local", "target": "public" }
]
}
}
```

Publish and deploy the snapshot:

```bash
node dist/index.js deploy
```

The refresh command also deploys when the configuration defines targets.

## Sample output

The fixture set contains `signal-router` and `metrics-kit`.
The first project has release notes.
The second project uses commit-based notes.
The fixture set contains `signal-router` and `metrics-kit`. The first project has release notes. The second project uses commit-based notes.

```text
Ingested 2 fixture projects.
Expand All @@ -109,8 +157,14 @@ Copied 2 available preview screenshots.
Open output/index.html in a browser.
```

The site shows project facts, source links, changelog previews, and screenshots.
The totals come from fixture fields and stored commit records.
A deploy with one configured target prints:

```text
Published 2 projects to output/index.html.
Deployed preview: 6 files to public.
```

The site shows project facts, source links, changelog previews, and screenshots. The totals come from fixture fields and stored commit records. The manifest records the same totals in machine-readable form.

## Commands

Expand All @@ -123,7 +177,9 @@ Build before direct CLI commands.
| `npm run ingest -- --fixture` | Load fixture records only. |
| `npm run capture -- --fixture` | Capture local fixture pages. |
| `npm run publish` | Rebuild the site from SQLite. |
| `npm run refresh` | Run configured ingest, capture, and publish stages. |
| `npm run deploy` | Publish and copy output to deploy targets. |
| `node dist/index.js themes` | List built-in themes. |
| `npm run refresh` | Run configured ingest, capture, publish, and deploy stages. |
| `node dist/index.js status` | Show visibility and recent operations. |
| `npm test` | Run deterministic unit and integration tests. |
| `npm run typecheck` | Validate TypeScript types. |
Expand All @@ -138,40 +194,32 @@ node dist/index.js privacy --hide demo-engineer-metrics-kit
npm run publish
```

Show the project again with `privacy --show`.
Hidden projects remain in SQLite.
Hidden projects stay out of public HTML and copied assets.
Author emails are redacted by default.
Sensitive commit messages are skipped before storage.
Show the project again with `privacy --show`. Hidden projects remain in SQLite. Hidden projects stay out of public HTML and copied assets. Author emails are redacted by default. Sensitive commit messages are skipped before storage.

## Audit model

Each project stores a repository URL and its last pushed timestamp.
Each stored commit keeps its SHA, message first line, date, and source URL.
Each release keeps its tag, notes, date, and source URL.
Each project stores a repository URL and its last pushed timestamp. Each stored commit keeps its SHA, message first line, date, and source URL. Each release keeps its tag, notes, date, and source URL.

The site displays visible projects only.
It links project cards to repositories.
It links release notes to their release pages.
It records local operations in an audit table.
The site displays visible projects only. It links project cards to repositories. It links release notes to their release pages. It records local operations in an audit table.

## CI and test status

The regular CI workflow runs typecheck, build, tests, the fixture demo, and artifact upload.
The scheduled refresh workflow runs each Monday and supports manual dispatch.
It uploads the generated site as a workflow artifact.
The regular CI workflow runs typecheck, build, tests, the fixture demo, theme listing, and manifest validation. The scheduled refresh workflow runs each Monday and supports manual dispatch. It uploads the generated site as a workflow artifact.

The test suite covers these core behaviors:

- Configuration validation and default merging.
- Theme resolution and color validation.
- Conventional commit parsing.
- Release-first changelog generation.
- SQLite upserts and changelog replacement.
- Privacy filtering and email redaction.
- Fixture ingestion and static publishing.
- Deployment manifest generation.
- Local deploy target copying.
- Configured refresh orchestration.
- Release source links.
- Deterministic HTML output.
- Deterministic HTML and manifest output.
- Playwright screenshot capture.

Run the local checks:
Expand All @@ -184,9 +232,7 @@ npm test

### Validation status

Typecheck and build pass locally.
CI runs the complete test suite on Ubuntu with Chromium installed.
The fixture pipeline provides deterministic data for repeatable checks.
Typecheck and build pass locally. CI runs the complete test suite on Ubuntu with Chromium installed. The fixture pipeline provides deterministic data for repeatable checks.

## Limitations

Expand All @@ -196,6 +242,8 @@ The fixture pipeline provides deterministic data for repeatable checks.
- Changelog quality depends on releases or conventional commits.
- External pages can fail during capture.
- Capture failures are reported and do not stop publishing.
- Two built-in themes ship with the tool.
- Only the local deploy target is available now.
- Publishing creates local files. It does not deploy them.
- Scheduled runs upload artifacts. They do not commit generated output.

Expand All @@ -205,8 +253,8 @@ The fixture pipeline provides deterministic data for repeatable checks.
| --- | --- | --- |
| v0.1 | Complete | Fixture demo, GitHub ingest, changelog, capture, publish, and privacy controls. |
| v0.2 | Complete | Checked-in configuration, coordinated refresh command, and scheduled artifact workflow. |
| v0.3 | Next | Custom themes and deployment adapters. |
| v0.4 | Later | Commit-diff summaries and an RSS feed. |
| v0.3 | Complete | Custom themes, deployment manifest, and local deploy target. |
| v0.4 | Next | Remote deploy targets, commit-diff summaries, and an RSS feed. |

## License

Expand Down
3 changes: 3 additions & 0 deletions engineer-profile.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"repositoryLimit": 5,
"dataDir": "data",
"outputDir": "output",
"theme": {
"name": "deep-space"
},
"privacy": {
"hiddenProjects": [],
"redactEmails": true,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "engineer-profile",
"version": "0.2.0",
"version": "0.3.0",
"description": "Self-maintaining engineering portfolio from repository activity",
"type": "module",
"main": "dist/index.js",
Expand Down
Loading