docs: align project guides and contributor instructions with current source
This commit is contained in:
1 parent
846054b7b9
commit
76a4db6a9e
6 files changed
+235
-105
No files matched your search
+46
-34
@@ -1,34 +1,46 @@
|
||||
# Codebase index
|
||||
|
||||
Indexed 9 November 2026, before the content workflow changes. This is a vanilla JavaScript static portfolio with hash routing, Dutch/English text, and no runtime dependencies.
|
||||
|
||||
| File | Responsibility |
|
||||
| --- | --- |
|
||||
| `content/projects/*.json` | Editable projects, each with its evidence items; display order uses `number` |
|
||||
| `content/settings.json` | Profile links, pinned source revision, eight process definitions |
|
||||
| `content.js` | Generated browser module; do not edit directly |
|
||||
| `app.js` | DOM rendering, translations, navigation, evidence filtering and printing |
|
||||
| `styles.css` | Desktop/mobile layouts, project diagrams, accessibility and print styles |
|
||||
| `index.html`, `favicon.svg` | Document shell, metadata and icon |
|
||||
| `scripts/content.mjs` | Validate content, generate module, scaffold a project |
|
||||
| `scripts/serve.mjs` | Loopback-only static preview; compiles content when requested |
|
||||
| `scripts/build.mjs` | Validate/generate content, copy five public assets to `dist/` |
|
||||
| `tests/` | Content integrity and editing regression checks |
|
||||
| `Dockerfile`, `.dockerignore` | Build and test source in Node, then serve public assets with Nginx; see compose.yaml, docker/nginx.conf and docs/docker-hosting.md |
|
||||
| `docs/verification.md` | Earlier verification record, not a current test report |
|
||||
|
||||
## Rendering and dependencies
|
||||
|
||||
`content/ → scripts/content.mjs → content.js → app.js → main`
|
||||
|
||||
Routes: `#home`, `#work`, `#project/<id>`, `#evidence`, `#evidence/<code>`, `#about`. Unknown routes show a 404. Language is selected using `?lang=nl` or `?lang=en`.
|
||||
|
||||
`header` and `footer` render shared navigation. `home` and `work` render project lists; `detail` renders a dossier. `processRow` derives evidence counts and links from every project's `evidence` array. Removing evidence automatically removes its process-index entries.
|
||||
|
||||
At initial indexing there were three projects and twelve evidence entries in a single handwritten `content.js`. The homepage assumed at least one project, linked directly to `warehouse`, and displayed a fixed count. These assumptions were removed for content management. The first project by number is now featured; an empty portfolio is supported.
|
||||
|
||||
Project IDs are stable route identifiers. Evidence paths are relative to `profile.school` at the pinned `revision`. Text pairs are `[Dutch, English]`. The existing design uses exactly three diagram nodes. Personal contribution and reflection copy is still shared placeholder text in `app.js`.
|
||||
|
||||
## Exposure boundary
|
||||
|
||||
Editing happens in local JSON files. The preview server has no write endpoint and binds to `127.0.0.1`. Production ships five static files, with no editor, login, database, or server process. All content included in a build is public: only put publishable material in these files. Publish `dist/`, not the repository root.
|
||||
# Codebase index
|
||||
|
||||
Reviewed 10 November 2026 against the current source. This is a vanilla JavaScript static portfolio with hash routing, Dutch/English text, and no runtime dependencies. The source contains three projects, twelve evidence items and eight process definitions.
|
||||
|
||||
| File | Responsibility |
|
||||
| --- | --- |
|
||||
| `README.md`, `AGENTS.md` | Setup, publication workflow and contributor instructions |
|
||||
| `package.json` | Node >=22 requirement and five npm commands; no dependencies |
|
||||
| `content/projects/*.json` | Editable projects, each with its evidence items; display order uses `number` |
|
||||
| `content/settings.json` | Profile links, pinned source revision, eight process definitions |
|
||||
| `content.js` | Generated browser module; do not edit directly |
|
||||
| `app.js` | DOM rendering, translations, navigation, evidence filtering and printing |
|
||||
| `styles.css` | Desktop/mobile layouts, project diagrams, accessibility and print styles |
|
||||
| `index.html`, `favicon.svg` | Document shell, metadata and icon |
|
||||
| `scripts/content.mjs` | Validate content, generate module, scaffold a project |
|
||||
| `scripts/serve.mjs` | Loopback-only static preview; compiles content when requested |
|
||||
| `scripts/build.mjs` | Validate/generate content, copy five public assets to `dist/` |
|
||||
| `tests/` | Content integrity and editing regression checks |
|
||||
| `Dockerfile`, `.dockerignore` | Allowlisted build context; test/build in Node, then copy public assets into Nginx |
|
||||
| `compose.yaml`, `.env.example` | Host binding, port, restart policy, read-only runtime, temporary storage and log rotation |
|
||||
| `docker/nginx.conf` | Domain-root public-file allowlist, response headers and `/healthz` |
|
||||
| `.gitignore` | Excludes `dist/`, `node_modules/`, logs and `.env` |
|
||||
| `docs/content-editing.md` | Field reference, editing workflow and validation limits |
|
||||
| `docs/docker-hosting.md` | Guest deployment, separate proxy topology, updates and operations |
|
||||
| `docs/verification.md` | Dated current checks, historical results and remaining verification limits |
|
||||
| `docs/preview.png`, `docs/mobile-preview.png` | Historical visual references; not generated or refreshed by the build |
|
||||
|
||||
## Rendering and dependencies
|
||||
|
||||
`content/ → scripts/content.mjs → content.js → app.js → main`
|
||||
|
||||
Routes: `#home`, `#work`, `#project/<id>`, `#evidence`, `#evidence/<code>`, `#about`. Empty hash opens home. Unknown page/project routes render an in-page 404; an unknown evidence code falls back to all processes. Language is English only for `?lang=en`, otherwise Dutch. Switching language updates the query without losing the route.
|
||||
|
||||
`header` and `footer` render shared navigation. `home` and `work` render project lists; `detail` renders a dossier. `processRow` derives evidence counts and links from every project's `evidence` array. Removing evidence automatically removes its process-index entries.
|
||||
|
||||
The compiler reads JSON files directly inside `content/projects/`, sorts by `number` using numeric-aware comparison, validates project fields and emits exports. The first project is featured and the homepage count is derived from the array; an empty portfolio is supported. The preview generates content in memory on request. Content, test and build commands regenerate the tracked module on disk.
|
||||
|
||||
Project IDs are stable route identifiers. Evidence paths are relative to `profile.school` at the pinned `revision`. Text pairs are `[Dutch, English]`. The existing design uses exactly three diagram nodes. Personal contribution and reflection copy is still shared placeholder text in `app.js`.
|
||||
|
||||
`tests/content.test.mjs` checks translations, mappings, pinned URL construction and the currently missing collaboration evidence. `tests/editor.test.mjs` checks compilation, empty collections, invalid inputs and homepage rendering with the featured project or all projects removed. Its DOM stub does not test real layout or browser interactions.
|
||||
|
||||
The print button opens all currently rendered process details and invokes browser printing; a filtered view prints only that process. The skip link focuses the main region without changing the route. Route changes focus main and scroll to the top. Responsive, reduced-motion and print rules live in `styles.css`.
|
||||
|
||||
## Exposure boundary
|
||||
|
||||
Editing happens in local JSON files. The preview server has no write endpoint and binds to `127.0.0.1`; it serves only `/` and the five public assets. Production ships five static files, with no editor, login, database or application backend. Docker uses an Nginx server process on port 8080 and adds `/healthz`. All content included in a build is public: only put publishable material in these files. Publish `dist/`, not the repository root. The build overwrites its five files but does not remove stale files from that directory.
|
||||
@@ -0,0 +1,51 @@
|
||||
# Content editing reference
|
||||
|
||||
The editable source is `content/`. `content.js` is a tracked generated browser module; `dist/` is ignored build output. No dependency installation or public admin interface is needed.
|
||||
|
||||
## Project workflow
|
||||
|
||||
1. Run `npm run project:add -- my-project` from the repository root. IDs use lowercase letters, digits and single separating hyphens. The command refuses to overwrite an existing filename, creates placeholder content and regenerates the module.
|
||||
2. Replace placeholders in `content/projects/my-project.json`. Use the ID as the filename for consistency; routes use the `id` field, not the filename.
|
||||
3. Run `npm run content` for validation. Preview with `npm run dev` and refresh after saving. The preview compiles `/content.js` in memory on each request; it does not watch files or reload the browser automatically.
|
||||
4. Run `npm test` and `npm run build`, inspect both languages, then commit source and generated content together.
|
||||
|
||||
Delete a project's JSON file to remove it. Remove entries from its `evidence` array to remove evidence. Empty project collections and empty evidence arrays are supported. Renaming an ID breaks existing project links; keep IDs stable.
|
||||
|
||||
## Project fields
|
||||
|
||||
| Field | Format and behavior |
|
||||
| --- | --- |
|
||||
| `id` | Unique lowercase slug, for example `my-project`; used by `#project/my-project` |
|
||||
| `number` | Nonempty string; numeric-aware string sorting determines display order and the homepage feature. Use distinct numeric values such as `01`, `02` |
|
||||
| `challenge` | Nonempty string, including combined labels such as `14 + 15` |
|
||||
| `kind`, `title`, `name`, `intro`, `context`, `implementation`, `decisions` | Two nonempty strings in `[Dutch, English]` order. `title` is required by validation but not currently rendered |
|
||||
| `stack` | Nonempty array of nonempty strings; technology badges |
|
||||
| `nodes` | Exactly three nonempty strings; shared diagram labels in both languages |
|
||||
| `path` | Repository-relative project directory path, without a leading slash or `.` / `..` segments |
|
||||
| `codes` | Array of known process codes; dossier tags linking to the evidence index. May be empty |
|
||||
| `evidence` | Array of evidence objects; may be empty |
|
||||
|
||||
Evidence objects require `label` (`[Dutch, English]`), `path` (repository-relative), `type` (nonempty display label such as `JS` or `DOCX`) and `codes` (array of known process codes). Optional `directory` is a boolean: `true` creates a repository `tree` link; omitted or `false` creates a `blob` link.
|
||||
|
||||
Evidence counts come only from each evidence item's `codes`, not the project's `codes`. An item can map to several processes, so summed process counts can exceed the number of evidence items. Empty mappings are allowed and do not appear in process counts.
|
||||
|
||||
## Shared settings and copy
|
||||
|
||||
`content/settings.json` supplies `profile`, `revision` and `processes`. Keep these top-level keys stable: they become ES module exports.
|
||||
|
||||
- `profile.github` and `profile.gitea` supply external profile links; `profile.school` supplies the repository base for source links.
|
||||
- `profile.qualification` supplies the qualification document link. `profile.name` and `profile.reviewed` are stored but are not currently rendered; visible identity and biography remain in `app.js`.
|
||||
- `revision` pins every generated source link. Review project and evidence paths against a new revision before updating it. Change `profile.reviewed` only after that review.
|
||||
- Each process has a unique `code`, bilingual `title` and bilingual `description`. The current tests expect eight processes.
|
||||
|
||||
Shared contribution and reflection placeholders are in `app.js`. Per-project reflections require a deliberate schema and renderer change; adding arbitrary JSON fields alone will not display them. `index.html` also contains static title, description, language fallback and a school repository link.
|
||||
|
||||
## Validation limits
|
||||
|
||||
The compiler validates project fields and checks mapping codes against settings. It is not a complete settings schema validator, external-link checker or assessment tool. Review settings structure, URLs, unique process codes and content accuracy manually. Text is rendered as escaped text, not Markdown or HTML.
|
||||
|
||||
The current tests deliberately assert that B1-K2-W1, W2 and W3 have no evidence yet. When genuine collaboration evidence is added, update that test to reflect the supported evidence and remaining gaps. Do not remove the safeguard simply to make unsupported mappings pass.
|
||||
|
||||
An invalid file causes preview `/content.js` to return HTTP 500 with a generic message. Run `npm run content` to see the underlying validation or JSON error. The scaffold command writes its new JSON file before compiling; if compilation fails, inspect the created file and fix the reported issue before retrying.
|
||||
|
||||
All generated content is public. The build includes settings and project fields even if the interface does not display them.
|
||||
@@ -1,5 +1,7 @@
|
||||
# Proxmox Docker hosting
|
||||
|
||||
Configuration reviewed 10 November 2026. These instructions describe the checked-in configuration; a live deployment has not been verified. See [verification](verification.md).
|
||||
|
||||
Use a Linux guest with Docker Engine and the Docker Compose plugin installed. Copy this repository to the guest, or clone it after committing and pushing your changes. From the repository directory:
|
||||
|
||||
```sh
|
||||
@@ -54,12 +56,16 @@ From the proxy box, verify `curl -f http://192.168.1.50:8080/healthz` returns `o
|
||||
|
||||
## Updates
|
||||
|
||||
Edit the JSON source files locally, then sync the changed files to the guest, including removing deleted project files. With Git, commit/push locally and pull on the guest. Apply updates with:
|
||||
Edit the JSON source files locally, run `npm test` and `npm run build`, then commit the JSON and generated `content.js` together and push. On the guest, keep local configuration in ignored `.env` and update a clean checkout with `git pull --ff-only`. If pulling fails because of local changes or divergent history, resolve that before rebuilding. Git also removes project files deleted upstream. Apply updates from the repository root with:
|
||||
|
||||
```sh
|
||||
docker compose up -d --build
|
||||
docker compose ps
|
||||
curl -f http://127.0.0.1:8080/healthz
|
||||
```
|
||||
|
||||
The health command above uses the default binding. If `.env` binds to the guest's LAN IP or changes the port, use that address and port instead. A push alone does not rebuild or deploy the site; there is no deployment automation in this repository.
|
||||
|
||||
Restarting alone does not import edited content; the files are baked into the image. Keep and back up the source checkout. Do not edit inside the container. To refresh base images, run `docker compose build --pull`, then `docker compose up -d`.
|
||||
|
||||
## Operations and exposure
|
||||
@@ -74,4 +80,4 @@ The container runs as the Nginx user with a read-only filesystem, dropped Linux
|
||||
|
||||
The health check expects `/healthz` to return `ok`. The restart policy handles process exits; an unhealthy status alone does not restart the container. Compose settings follow the [Docker service reference](https://docs.docker.com/reference/compose-file/services/).
|
||||
|
||||
Local content tests, static build and Compose configuration validation passed. The container could not be built or run locally because the Docker engine was unavailable. Nothing has been deployed to Proxmox.
|
||||
On 10 November 2026, all six local tests, the static build and `docker compose config --quiet` passed. The Docker engine was unavailable, so image build, runtime health, proxy access and Proxmox deployment remain unverified. Configuration validation alone does not prove that the container can start.
|
||||
+25
-1
@@ -1,4 +1,28 @@
|
||||
# Verification — 9 November 2026
|
||||
# Verification
|
||||
|
||||
## Current checks — 10 November 2026
|
||||
|
||||
Documentation baseline reviewed against all tracked source, configuration, tests, JSON content, generated content and saved PNG references. No application behavior was changed in this pass.
|
||||
|
||||
| Check | Result |
|
||||
| --- | --- |
|
||||
| Node environment | v24.5.0; project requires >=22 |
|
||||
| `node --check app.js` and `node --check content.js` | Passed |
|
||||
| `npm test` | All six tests passed; regenerates `content.js` first |
|
||||
| `npm run build` | Passed; generated module and five static assets |
|
||||
| `docker compose config --quiet` | Passed |
|
||||
| Local Markdown links | All relative targets resolve |
|
||||
| Build output inspection | Exactly five assets, byte-identical to their source files |
|
||||
| `git diff --check` | Passed |
|
||||
| Docker engine availability | Unavailable: Docker Desktop Linux engine named pipe missing |
|
||||
|
||||
The six tests cover content translations/mappings, pinned source URL construction, explicit collaboration gaps, compiler consistency, empty collections, invalid input and homepage rendering after project removal. They do not verify remote artifact existence, a real browser DOM or visual layout.
|
||||
|
||||
The saved desktop and mobile PNGs were inspected as historical references, not recaptured. Browser interactions, responsive layout and print/PDF were not rerun in this documentation pass. Docker image build/runtime, reverse proxy and Proxmox deployment remain unverified. No external source documents or school-project tests were reviewed or executed again; the source review date remains 9 November 2026.
|
||||
|
||||
## Historical record — 9 November 2026
|
||||
|
||||
The following is the previous verification record, retained for context. Its two-test count predates the current six-test suite; these browser and external-source results were not repeated on 10 November.
|
||||
|
||||
- `node --check app.js` passed.
|
||||
- `npm test`: both content integrity checks passed.
|
||||
|
||||
Reference in new issue
Block a user