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
13 changes: 12 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,10 +44,21 @@ jobs:
- name: Run fixture demo
run: node dist/index.js demo

- name: Deploy demo output with the local adapter
run: node dist/index.js deploy --target deploy-site

- name: Store demo output
if: success()
uses: actions/upload-artifact@v4
with:
name: engineer-profile-demo
path: output/
if-no-files-found: error

- name: Store deployed site
if: success()
uses: actions/upload-artifact@v4
with:
name: engineer-profile-deployed
path: deploy-site/
if-no-files-found: error
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/
deploy-site/
*.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
6 changes: 4 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 or newer.

```bash
npm ci
Expand All @@ -14,9 +14,11 @@ npm test

Use fixtures for changes that need repeatable data.
Do not add credentials, private repository data, or generated output.
Keep changes to themes and deployment adapters under `src/theme/` and `src/deploy/`.
Add deterministic tests for new behavior in `tests/`.

## 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.
104 changes: 89 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# 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 turns repository activity into an engineering portfolio.
It reads public repository data and stores the facts in SQLite.
It publishes a static site from those 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.
- Choose a visual theme for the published site.
- Deploy the site to a local target directory.
- Hide projects and redact author emails before publication.
- Run one configured refresh from a scheduled workflow.

Expand All @@ -30,28 +32,32 @@ flowchart LR
L --> W[Publisher]
P --> W
S --> W
W --> O[Static output]
W --> T[Theme]
T --> O[Static output]
O --> A[Deployment adapter]
```

| Area | Responsibility |
| --- | --- |
| `engineer-profile.config.json` | Store owner, presentation, refresh, paths, and privacy settings. |
| `engineer-profile.config.json` | Store owner, theme, deployment, refresh, 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/theme/` | Resolve named themes into CSS tokens. |
| `src/refresh/` | Coordinate ingest, capture, publishing, and deployment. |
| `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/publish/` | Render themed HTML, changelog files, and preview assets. |
| `src/deploy/` | Copy the published site to a configured target. |
| `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.

## Setup

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

```bash
npm ci
Expand All @@ -68,7 +74,7 @@ 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.
It sets the GitHub owner, site presentation, theme, repository limit, paths, and privacy controls.

The loader accepts repository limits from 1 through 100.
It rejects malformed values before network access.
Expand All @@ -94,6 +100,68 @@ npm run refresh
Do not put a token in repository files.
Use `.env.example` as a variable reference.

## Themes

The `theme` field selects the visual style of the published site.
Set it to the name of a built-in theme.

| Theme | Look |
| --- | --- |
| `aurora` | Dark blue palette. This is the default. |
| `terminal` | Monochrome green on black. |
| `paper` | Light background with dark ink text. |

Example:

```json
{
"theme": "terminal"
}
```

The loader rejects unknown theme names.
Each theme defines the same set of color tokens.
The published page carries a `data-theme` attribute.

## Deployment

The `deploy` field selects how the published site reaches a target.
The default adapter is `none`, which does nothing.

| Adapter | Behavior |
| --- | --- |
| `none` | No deployment. This is the default. |
| `local` | Copy the output directory to a target directory. |

Example:

```json
{
"deploy": {
"adapter": "local",
"targetDir": "docs"
}
}
```

Run the deployment step on its own:

```bash
npm run deploy
```

Deploy to a one-off target with a CLI option:

```bash
node dist/index.js deploy --target public-site
```

The refresh command runs deployment after publishing when an adapter is configured.
The local adapter replaces the target contents before copying.
It refuses targets that overlap the output directory.
The deployment is recorded in the audit trail.
New adapters can extend the registry in `src/deploy/adapters.ts`.

## Sample output

The fixture set contains `signal-router` and `metrics-kit`.
Expand All @@ -104,7 +172,7 @@ The second project uses commit-based notes.
Ingested 2 fixture projects.
Captured demo-engineer-signal-router.
Captured demo-engineer-metrics-kit.
Published 2 projects to output/index.html.
Published 2 projects with the aurora theme to output\index.html.
Copied 2 available preview screenshots.
Open output/index.html in a browser.
```
Expand All @@ -123,7 +191,8 @@ 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` | Deploy the published site. |
| `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 Down Expand Up @@ -153,7 +222,7 @@ 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.
It records local operations, including deployments, in an audit table.

## CI and test status

Expand All @@ -164,12 +233,14 @@ It uploads the generated site as a workflow artifact.
The test suite covers these core behaviors:

- Configuration validation and default merging.
- Theme resolution and token completeness.
- Deployment adapter behavior and audit logging.
- Conventional commit parsing.
- Release-first changelog generation.
- SQLite upserts and changelog replacement.
- Privacy filtering and email redaction.
- Fixture ingestion and static publishing.
- Configured refresh orchestration.
- Configured refresh orchestration and deployment.
- Release source links.
- Deterministic HTML output.
- Playwright screenshot capture.
Expand All @@ -196,6 +267,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.
- The built-in themes are fixed.
- The local deployment adapter copies to a directory only.
- Publishing creates local files. It does not deploy them.
- Scheduled runs upload artifacts. They do not commit generated output.

Expand All @@ -205,8 +278,9 @@ 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 | Config-driven themes and a local deployment adapter. |
| v0.4 | Next | Commit-diff summaries and an RSS feed. |
| v0.5 | Later | Adapters for external hosts and per-project detail pages. |

## License

Expand Down
4 changes: 4 additions & 0 deletions engineer-profile.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"repositoryLimit": 5,
"dataDir": "data",
"outputDir": "output",
"theme": "aurora",
"deploy": {
"adapter": "none"
},
"privacy": {
"hiddenProjects": [],
"redactEmails": true,
Expand Down
Loading
Loading