r
This commit is contained in:
1 parent
76a4db6a9e
commit
783c95b797
21 files changed
+1245
-46
No files matched your search
@@ -9,10 +9,13 @@ Read `README.md` and `docs/codebase-index.md` before editing. This is a static,
|
||||
- Edit projects in `content/projects/*.json` and shared settings in `content/settings.json`. Follow `docs/content-editing.md`.
|
||||
- Generate `content.js` with `npm run content`, `npm test` or `npm run build`. Commit generated changes alongside their source; never hand-edit the module.
|
||||
- Keep Dutch and English text complete, project IDs stable, and repository links pinned to a reviewed revision.
|
||||
- Projects default to the school repository in settings. For another repository, use the validated `repository` object and pass the project to `source(path, directory, project)` in every renderer. Supported hosts are `github.com` and `codealvin.xyz`; pins must be full lowercase commit SHAs.
|
||||
- Set bilingual `setting` explicitly for projects outside school year 2. Use `challenge: "—"` for personal projects; the scaffold still defaults to school repository paths and does not supply a context override.
|
||||
- Record repository selections, reviewed pins and exclusions in `docs/repository-review.md`. Keep unmapped source links separate from claims of exam evidence, and preserve recorded user exclusions when refreshing the selection.
|
||||
- Preserve explicit evidence gaps. Do not invent personal contributions, assessment results, test outcomes or deployment claims. Only change the source review date after actually reviewing the sources.
|
||||
- UI copy and shared contribution/reflection placeholders also live in `app.js`; metadata lives in `index.html`. JSON is not a complete CMS.
|
||||
- Keep the static publication boundary: five public assets, no public editor or write API. If assets change, update the build, preview allowlist, Docker inputs and Nginx allowlist together.
|
||||
- Do not commit `.env`, `dist/`, logs, dependencies or private material. The build does not clean `dist/`, so inspect it before publishing.
|
||||
- Do not commit `.env`, `dist/`, logs, dependencies or private material. The build validates and stages exactly five public assets before replacing `dist/`; never add private files to publication output.
|
||||
|
||||
## Checks and documentation
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ npm test
|
||||
npm run build
|
||||
```
|
||||
|
||||
The build regenerates tracked `content.js` from JSON and copies `index.html`, `styles.css`, `app.js`, `content.js` and `favicon.svg` into ignored `dist/`. It does not clean old files from `dist/`; keep that directory limited to these five assets before publishing. A general static host can serve them at a domain root or subdirectory; the included Nginx configuration serves only the domain root. Hash-based routes need no server fallback. Dutch is the default; `?lang=en#evidence` opens English evidence navigation. Language switching preserves the current page.
|
||||
The build regenerates tracked `content.js` from JSON and copies `index.html`, `styles.css`, `app.js`, `content.js` and `favicon.svg` into ignored `dist/`. It validates content and stages these five assets before replacing `dist/`, removing stale files. Redirected build directories are rejected. A general static host can serve them at a domain root or subdirectory; the included Nginx configuration serves only the domain root. Hash-based routes need no server fallback. Dutch is the default; `?lang=en#evidence` opens English evidence navigation. Language switching preserves the current page.
|
||||
|
||||
## Maintain content
|
||||
|
||||
@@ -44,24 +44,24 @@ An evidence item looks like this:
|
||||
}
|
||||
```
|
||||
|
||||
Use `"directory": true` for a folder. Paths are relative to the school repository. Keep project `id` values stable to preserve links. Use exactly three `nodes` for the system diagram. Project numbers and challenge numbers are strings.
|
||||
Use `"directory": true` for a folder. Paths are relative to the school repository by default; a project can specify its own pinned GitHub or Gitea repository. Keep project `id` values stable to preserve links. Use exactly three `nodes` for the system diagram. Project numbers and challenge numbers are strings.
|
||||
|
||||
See [the content reference](docs/content-editing.md) for every field, validation limits and how project tags differ from evidence mappings.
|
||||
|
||||
Run `npm run dev` and refresh the browser to preview saved edits. Invalid content will prevent the preview content module from loading; run `npm run content` for a descriptive validation error. Run `npm run build` to validate and prepare publication. `content.js` is generated; do not edit it directly. `npm run content` regenerates it without building.
|
||||
|
||||
Only deploy `dist/`. Everything in the generated content is public, so keep credentials and private documents out of these files. Repository links remain pinned to the `revision` in `content/settings.json`; update it after reviewing a newer snapshot.
|
||||
Only deploy `dist/`. Everything in the generated content is public, so keep credentials and private documents out of these files. Repository links default to the `revision` in `content/settings.json`. Projects outside the school archive supply a `repository` object with their own URL, forge and reviewed commit. See the [repository review](docs/repository-review.md) for the 10 November 2026 selection.
|
||||
|
||||
## Finish the exam content
|
||||
|
||||
The interface is functional; the exam dossier is not yet complete. Summaries are based on the supplied school repository, not invented personal experience. Artifact paths were checked against the repository tree. DOCX contents were not reviewed and the source projects' test scripts were not executed.
|
||||
The interface is functional; the exam dossier is not yet complete. The selection contains nine school and personal projects, based on public GitHub and Gitea sources, not invented personal experience. Artifact paths were checked against the repository tree. DOCX contents were not reviewed and the source projects' test scripts were not executed.
|
||||
|
||||
Before submission, add your personal contribution and reflection for every case study, confirm solo/team context, include actual test results, and substantiate improvement claims. Add evidence for B1-K2-W1, W2 and W3 (collaboration, presentation and evaluation). The current mappings are suggestions, not assessment decisions. Ask the examiner which artifacts and authenticity statements VISTA requires. General subjects, electives and institution-specific requirements are outside this vocational index.
|
||||
|
||||
The source is SBB's 2024 qualification for Software Developer, code 25998:
|
||||
https://kwalificatie-mijn.s-bb.nl/Details/DownloadDocument/1963420
|
||||
|
||||
English process names are informal translations. The recorded source review date is 9 November 2026; this documentation refresh does not constitute a new source or qualification review.
|
||||
English process names are informal translations. The qualification review date remains 9 November 2026. The separate repository review on 10 November 2026 selected six additional projects and checked pinned source paths; it did not reassess the qualification.
|
||||
|
||||
Direct contact details, a CV, screenshots, assessed outcomes and personal reflections were not supplied, so the site does not invent them. Add these as real material becomes available. Project diagrams illustrate structure; they are not screenshots of running applications.
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ const ext = (url, label, cls = '') => `<a class="${cls}" href="${esc(url)}" targ
|
||||
const badge = text => `<span class="tag">${esc(text)}</span>`;
|
||||
const route = () => location.hash.slice(1) || 'home';
|
||||
document.querySelector('.skip').addEventListener('click', event => { event.preventDefault(); main.focus(); main.scrollIntoView(); });
|
||||
const go = (id, label, cls = '') => `<a class="${cls}" href="#${id}">${label}</a>`;
|
||||
const go = (id, label, cls = '') => `<a class="${cls}" href="#${esc(id)}">${label}</a>`;
|
||||
function header() {
|
||||
const current = route();
|
||||
document.querySelector('#header').innerHTML = `<div class="header-inner">
|
||||
${go('home', '<span class="monogram">az<span>_</span></span><span class="brand-name">Alvin Zilverstand</span>', 'brand')}
|
||||
<nav aria-label="${t(['Hoofdnavigatie','Main navigation'])}">${[['work',['Werk','Work']],['evidence',['Bewijsindex','Evidence']],['about',['Over mij','About']]].map(([id,label]) => `<a href="#${id}" ${current === id || (id === 'work' && current.startsWith('project/')) ? 'aria-current="page"' : ''}>${tx(label)}</a>`).join('')}</nav>
|
||||
<nav aria-label="${t(['Hoofdnavigatie','Main navigation'])}">${[['work',['Werk','Work']],['evidence',['Bewijsindex','Evidence']],['about',['Over mij','About']]].map(([id,label]) => `<a href="#${esc(id)}" ${current === id || (id === 'work' && current.startsWith('project/')) ? 'aria-current="page"' : ''}>${tx(label)}</a>`).join('')}</nav>
|
||||
<div class="languages" aria-label="Language">${['nl','en'].map(l => `<button type="button" data-lang="${l}" lang="${l}" aria-pressed="${lang === l}">${l.toUpperCase()}</button>`).join('')}</div>
|
||||
</div>`;
|
||||
document.querySelectorAll('[data-lang]').forEach(button => button.addEventListener('click', () => {
|
||||
@@ -27,10 +27,10 @@ function footer() {
|
||||
document.querySelector('footer').innerHTML = `<div><span class="mono">AZ / PORTFOLIO</span><p>Alvin Zilverstand <span class="muted">· VISTA college, Heerlen</span></p></div><div class="footer-links">${ext(profile.github,'GitHub')}${ext(profile.gitea,'Gitea')}${go('evidence',tx(['Bewijsindex','Evidence index']))}</div><span class="mono muted">${tx(['In ontwikkeling','Work in progress'])} / 2026</span>`;
|
||||
}
|
||||
function system(p, large = false) {
|
||||
return `<div class="system ${esc(p.id)} ${large ? 'large' : ''}" role="img" aria-label="${esc(t(['Schematische weergave: ','Schematic view: ']) + p.nodes.join(' → '))}"><div class="system-top mono"><span>SYS.${esc(p.number)}</span><span>${tx(['SYSTEEMSCHEMA','SYSTEM MAP'])}</span><span class="dot"></span></div><div class="diagram">${p.nodes.map((node,i)=>`${i ? '<span class="wire" aria-hidden="true"></span>' : ''}<div class="node"><span class="node-icon" aria-hidden="true">${['◫','⌘','▤'][i]}</span><span>${esc(node)}</span><small class="mono">0${i+1}</small></div>`).join('')}</div><div class="system-bottom mono"><span>${esc(p.stack.slice(0,2).join(' / '))}</span><span>CH.${esc(p.challenge)}</span></div></div>`;
|
||||
return `<div class="system ${esc(p.id)} ${large ? 'large' : ''}" role="img" aria-label="${esc(t(['Schematische weergave: ','Schematic view: ']) + p.nodes.join(' → '))}"><div class="system-top mono"><span>SYS.${esc(p.number)}</span><span>${tx(['SYSTEEMSCHEMA','SYSTEM MAP'])}</span><span class="dot"></span></div><div class="diagram">${p.nodes.map((node,i)=>`${i ? '<span class="wire" aria-hidden="true"></span>' : ''}<div class="node"><span class="node-icon" aria-hidden="true">${['◫','⌘','▤'][i]}</span><span>${esc(node)}</span><small class="mono">0${i+1}</small></div>`).join('')}</div><div class="system-bottom mono"><span>${esc(p.stack.slice(0,2).join(' / '))}</span><span>${p.challenge === '—' ? tx(['EXPERIMENT','EXPERIMENT']) : `CH.${esc(p.challenge)}`}</span></div></div>`;
|
||||
}
|
||||
function projectRow(p) {
|
||||
return `<article class="project-row"><span class="project-number mono">/${esc(p.number)}</span><div class="project-copy"><p class="eyebrow">CHALLENGE ${esc(p.challenge)} <span>· ${tx(p.kind)}</span></p><h3>${go(`project/${p.id}`,tx(p.name))}</h3><p>${tx(p.intro)}</p><div class="tags">${p.stack.map(badge).join('')}</div></div>${go(`project/${p.id}`,`<span>${tx(['Bekijk project','Explore project'])}</span><span aria-hidden="true">↗</span>`,'row-link')}</article>`;
|
||||
return `<article class="project-row"><span class="project-number mono">/${esc(p.number)}</span><div class="project-copy"><p class="eyebrow">${p.challenge === '—' ? tx(['PERSOONLIJK PROJECT','PERSONAL PROJECT']) : `CHALLENGE ${esc(p.challenge)}`} <span>· ${tx(p.kind)}</span></p><h3>${go(`project/${p.id}`,tx(p.name))}</h3><p>${tx(p.intro)}</p><div class="tags">${p.stack.map(badge).join('')}</div></div>${go(`project/${p.id}`,`<span>${tx(['Bekijk project','Explore project'])}</span><span aria-hidden="true">↗</span>`,'row-link')}</article>`;
|
||||
}
|
||||
function home() {
|
||||
const p = projects[0];
|
||||
@@ -40,21 +40,21 @@ function home() {
|
||||
}
|
||||
function emptyProjects() { return `<p class="empty-state">${tx(['Nog geen projecten toegevoegd.','No projects added yet.'])}</p>`; }
|
||||
function work() {
|
||||
return `<section class="page-heading"><p class="eyebrow">01 / ${tx(['PROJECTARCHIEF','PROJECT ARCHIVE'])}</p><h1>${tx(['Gebouwd. Getest.','Built. Tested.'])}<br><em>${tx(['Verder geleerd.','Still learning.'])}</em></h1><p>${tx(['Schoolprojecten, bekeken vanuit het probleem, de uitvoering en het beschikbare bewijs. De broncode blijft één klik verder.','School projects, through their problems, implementation, and available evidence. The source code is always one click away.'])}</p></section><section class="section work-list">${projects.length ? projects.map(p=>`<div>${system(p)}${projectRow(p)}</div>`).join('') : emptyProjects()}</section><div class="archive-link">${ext(profile.school,tx(['Bekijk het volledige schoolarchief','Browse the full school archive']),'text-link')}</div>`;
|
||||
return `<section class="page-heading"><p class="eyebrow">01 / ${tx(['PROJECTARCHIEF','PROJECT ARCHIVE'])}</p><h1>${tx(['Gebouwd. Onderzocht.','Built. Explored.'])}<br><em>${tx(['Verder geleerd.','Still learning.'])}</em></h1><p>${tx(['Schoolprojecten en persoonlijke experimenten, bekeken vanuit het probleem, de uitvoering en de beschikbare bronnen. De broncode blijft één klik verder.','School projects and personal experiments, through their problems, implementation, and available sources. The source code is always one click away.'])}</p></section><section class="section work-list">${projects.length ? projects.map(p=>`<div>${system(p)}${projectRow(p)}</div>`).join('') : emptyProjects()}</section><div class="archive-link">${ext(profile.school,tx(['Bekijk het volledige schoolarchief','Browse the full school archive']),'text-link')}</div>`;
|
||||
}
|
||||
function detail(p) {
|
||||
return `<section class="page-heading project-heading">${go('work',`← ${tx(['Alle projecten','All projects'])}`,'back-link')}<p class="eyebrow">PROJECT ${esc(p.number)} / CHALLENGE ${esc(p.challenge)}</p><h1>${tx(p.name)}<span class="accent">.</span></h1><p>${tx(p.intro)}</p><div class="tags">${p.stack.map(badge).join('')}</div></section>${system(p,true)}<div class="project-layout"><aside class="project-meta"><span class="eyebrow">${tx(['PROJECTDOSSIER','PROJECT FILE'])}</span><dl><dt>${tx(['Opleiding','Course'])}</dt><dd>Software Developer</dd><dt>${tx(['Context','Context'])}</dt><dd>${tx(['Schoolproject · leerjaar 2','School project · year 2'])}</dd><dt>${tx(['Eigen bijdrage','My contribution'])}</dt><dd>${tx(['Nog te beschrijven','Still to be documented'])}</dd><dt>${tx(['Beoordelingsstatus','Assessment status'])}</dt><dd>${tx(['Niet vastgesteld','Not established'])}</dd></dl>${ext(source(p.path,true),tx(['Open broncode','Open source code']),'text-link')}</aside><div class="project-story">${[[['De opdracht','The assignment'],p.context],[['Hoe het is opgebouwd','How it is built'],p.implementation],[['Keuzes & aandachtspunten','Decisions & considerations'],p.decisions]].map(([title,body],i)=>`<section><p class="eyebrow">0${i+1}</p><h2>${tx(title)}</h2><p>${tx(body)}</p></section>`).join('')}<section><p class="eyebrow">04</p><h2>${tx(['Bronnen & bewijs','Sources & evidence'])}</h2><p class="muted">${tx(['Dit zijn gevonden bronnen, geen goedgekeurde examenbewijzen. Documentinhoud en testresultaten moeten nog worden gecontroleerd.','These are located sources, not approved exam evidence. Document contents and test results still need review.'])}</p><div class="evidence-links">${p.evidence.map(e=>ext(source(e.path,e.directory),`<span><small class="mono">${esc(e.type)}</small>${tx(e.label)}</span>`)).join('')}</div></section><section class="reflection"><p class="eyebrow">05 / ${tx(['PERSOONLIJKE REFLECTIE','PERSONAL REFLECTION'])}</p><h2>${tx(['Het verhaal achter mijn bijdrage.','The story behind my contribution.'])}</h2><p>${tx(['Nog aan te vullen door Alvin: welke onderdelen heb ik zelf gemaakt, met wie werkte ik samen, welke feedback kreeg ik en wat zou ik anders doen?','To be completed by Alvin: which parts did I build myself, who did I work with, what feedback did I receive, and what would I do differently?'])}</p></section><div class="tags">${p.codes.map(c=>go(`evidence/${c}`,c,'tag')).join('')}</div></div></div>`;
|
||||
return `<section class="page-heading project-heading">${go('work',`← ${tx(['Alle projecten','All projects'])}`,'back-link')}<p class="eyebrow">PROJECT ${esc(p.number)} / ${p.challenge === '—' ? tx(['PERSOONLIJK PROJECT','PERSONAL PROJECT']) : `CHALLENGE ${esc(p.challenge)}`}</p><h1>${tx(p.name)}<span class="accent">.</span></h1><p>${tx(p.intro)}</p><div class="tags">${p.stack.map(badge).join('')}</div></section>${system(p,true)}<div class="project-layout"><aside class="project-meta"><span class="eyebrow">${tx(['PROJECTDOSSIER','PROJECT FILE'])}</span><dl><dt>${tx(['Opleiding','Course'])}</dt><dd>Software Developer</dd><dt>${tx(['Context','Context'])}</dt><dd>${tx(p.setting || ['Schoolproject · leerjaar 2','School project · year 2'])}</dd><dt>${tx(['Eigen bijdrage','My contribution'])}</dt><dd>${tx(['Nog te beschrijven','Still to be documented'])}</dd><dt>${tx(['Beoordelingsstatus','Assessment status'])}</dt><dd>${tx(['Niet vastgesteld','Not established'])}</dd></dl>${ext(source(p.path,true,p),tx(['Open broncode','Open source code']),'text-link')}</aside><div class="project-story">${[[['De opdracht','The assignment'],p.context],[['Hoe het is opgebouwd','How it is built'],p.implementation],[['Keuzes & aandachtspunten','Decisions & considerations'],p.decisions]].map(([title,body],i)=>`<section><p class="eyebrow">0${i+1}</p><h2>${tx(title)}</h2><p>${tx(body)}</p></section>`).join('')}<section><p class="eyebrow">04</p><h2>${tx(['Bronnen & bewijs','Sources & evidence'])}</h2><p class="muted">${tx(['Dit zijn gevonden bronnen, geen goedgekeurde examenbewijzen. Documentinhoud en testresultaten moeten nog worden gecontroleerd.','These are located sources, not approved exam evidence. Document contents and test results still need review.'])}</p><div class="evidence-links">${p.evidence.map(e=>ext(source(e.path,e.directory,p),`<span><small class="mono">${esc(e.type)}</small>${tx(e.label)}</span>`)).join('')}</div></section><section class="reflection"><p class="eyebrow">05 / ${tx(['PERSOONLIJKE REFLECTIE','PERSONAL REFLECTION'])}</p><h2>${tx(['Het verhaal achter mijn bijdrage.','The story behind my contribution.'])}</h2><p>${tx(['Nog aan te vullen door Alvin: welke onderdelen heb ik zelf gemaakt, met wie werkte ik samen, welke feedback kreeg ik en wat zou ik anders doen?','To be completed by Alvin: which parts did I build myself, who did I work with, what feedback did I receive, and what would I do differently?'])}</p></section><div class="tags">${p.codes.map(c=>go(`evidence/${c}`,esc(c),'tag')).join('')}</div></div></div>`;
|
||||
}
|
||||
function evidence(filter = '') {
|
||||
const selected = processes.some(p=>p.code === filter) ? filter : '';
|
||||
return `<section class="page-heading"><p class="eyebrow">02 / ${tx(['EXAMENPORTFOLIO','EXAM PORTFOLIO'])}</p><h1>${tx(['Van werk','From work'])}<br><em>${tx(['naar bewijs.','to evidence.'])}</em></h1><p>${tx(['Bronnen per werkproces. Een navigeerbare voorbereiding op mijn examen, met zichtbaar onderscheid tussen gevonden materiaal en wat nog ontbreekt.','Sources by work process. A navigable preparation for my exam, making the distinction between located material and missing evidence visible.'])}</p></section><div class="evidence-toolbar"><div><label for="process-filter">${tx(['Werkproces','Work process'])}</label><select id="process-filter"><option value="">${tx(['Alle werkprocessen','All work processes'])}</option>${processes.map(p=>`<option value="${p.code}" ${p.code===selected?'selected':''}>${p.code} · ${tx(p.title)}</option>`).join('')}</select></div><button id="print" class="button">${tx(['Afdrukken / PDF','Print / PDF'])} ↗</button></div><div class="notice"><span class="status-dot"></span><p>${tx(['In opbouw. Koppelingen zijn voorlopig; aanwezigheid van code of een document bewijst nog geen beheersing. Persoonlijke bijdrage, resultaten en beoordeling moeten worden toegevoegd. Stem de definitieve bewijslast af met de examinator.','In progress. Mappings are provisional; code or a document alone does not demonstrate competence. Personal contributions, results, and assessment need to be added. Agree the final evidence requirements with the examiner.'])}</p></div><section id="process-list" class="process-list">${processes.filter(p=>!selected||p.code===selected).map(processRow).join('')}</section><div class="source-note"><p class="mono">SBB / 25998 / 2024</p><p>${tx(['Deze index volgt de acht beroepsspecifieke werkprocessen uit het gekoppelde dossier. Generieke vakken, keuzedelen en VISTA-examenafspraken vallen buiten deze index. Engelse labels zijn eigen vertalingen.','This index follows the eight vocational work processes in the linked qualification. General subjects, electives, and VISTA exam arrangements are outside this index. English labels are informal translations.'])}</p>${ext(profile.qualification,tx(['Lees het officiële kwalificatiedossier','Read the official qualification document']),'text-link')}</div>`;
|
||||
return `<section class="page-heading"><p class="eyebrow">02 / ${tx(['EXAMENPORTFOLIO','EXAM PORTFOLIO'])}</p><h1>${tx(['Van werk','From work'])}<br><em>${tx(['naar bewijs.','to evidence.'])}</em></h1><p>${tx(['Bronnen per werkproces. Een navigeerbare voorbereiding op mijn examen, met zichtbaar onderscheid tussen gevonden materiaal en wat nog ontbreekt.','Sources by work process. A navigable preparation for my exam, making the distinction between located material and missing evidence visible.'])}</p></section><div class="evidence-toolbar"><div><label for="process-filter">${tx(['Werkproces','Work process'])}</label><select id="process-filter"><option value="">${tx(['Alle werkprocessen','All work processes'])}</option>${processes.map(p=>`<option value="${esc(p.code)}" ${p.code===selected?'selected':''}>${esc(p.code)} · ${tx(p.title)}</option>`).join('')}</select></div><button id="print" class="button">${tx(['Afdrukken / PDF','Print / PDF'])} ↗</button></div><div class="notice"><span class="status-dot"></span><p>${tx(['In opbouw. Koppelingen zijn voorlopig; aanwezigheid van code of een document bewijst nog geen beheersing. Persoonlijke bijdrage, resultaten en beoordeling moeten worden toegevoegd. Stem de definitieve bewijslast af met de examinator.','In progress. Mappings are provisional; code or a document alone does not demonstrate competence. Personal contributions, results, and assessment need to be added. Agree the final evidence requirements with the examiner.'])}</p></div><section id="process-list" class="process-list">${processes.filter(p=>!selected||p.code===selected).map(processRow).join('')}</section><div class="source-note"><p class="mono">SBB / 25998 / 2024</p><p>${tx(['Deze index volgt de acht beroepsspecifieke werkprocessen uit het gekoppelde dossier. Generieke vakken, keuzedelen en VISTA-examenafspraken vallen buiten deze index. Engelse labels zijn eigen vertalingen.','This index follows the eight vocational work processes in the linked qualification. General subjects, electives, and VISTA exam arrangements are outside this index. English labels are informal translations.'])}</p>${ext(profile.qualification,tx(['Lees het officiële kwalificatiedossier','Read the official qualification document']),'text-link')}</div>`;
|
||||
}
|
||||
function processRow(p) {
|
||||
const found = projects.flatMap(project=>project.evidence.filter(e=>e.codes.includes(p.code)).map(e=>({project,e})));
|
||||
return `<details class="process" ${route()===`evidence/${p.code}`?'open':''}><summary><span class="mono process-code">${p.code}</span><span class="process-title">${tx(p.title)}</span><span class="evidence-status ${found.length?'located':'missing'}">${found.length ? `${found.length} ${tx(found.length === 1 ? ['bron','source'] : ['bronnen','sources'])}` : tx(['Aanvullen','To add'])}</span><span class="expand" aria-hidden="true">+</span></summary><div class="process-content"><p>${tx(p.description)}</p>${found.length?`<div class="evidence-links">${found.map(({project,e})=>`<div class="evidence-entry">${ext(source(e.path,e.directory),`<span><small class="mono">${esc(e.type)}</small>${tx(e.label)}</span>`)}${go(`project/${project.id}`,tx(project.name),'evidence-project')}</div>`).join('')}</div><p class="pending">${tx(['Te controleren: inhoud, eigen bijdrage en geschiktheid voor het examen.','To verify: contents, personal contribution, and suitability for the exam.'])}</p>`:`<div class="empty-state">${tx(['Nog geen bewijs geselecteerd. Voeg een eigen document, feedback of een concreet projectvoorbeeld toe.','No evidence selected yet. Add your own document, feedback, or a specific project example.'])}</div>`}</div></details>`;
|
||||
return `<details class="process" ${route()===`evidence/${p.code}`?'open':''}><summary><span class="mono process-code">${esc(p.code)}</span><span class="process-title">${tx(p.title)}</span><span class="evidence-status ${found.length?'located':'missing'}">${found.length ? `${found.length} ${tx(found.length === 1 ? ['bron','source'] : ['bronnen','sources'])}` : tx(['Aanvullen','To add'])}</span><span class="expand" aria-hidden="true">+</span></summary><div class="process-content"><p>${tx(p.description)}</p>${found.length?`<div class="evidence-links">${found.map(({project,e})=>`<div class="evidence-entry">${ext(source(e.path,e.directory,project),`<span><small class="mono">${esc(e.type)}</small>${tx(e.label)}</span>`)}${go(`project/${project.id}`,tx(project.name),'evidence-project')}</div>`).join('')}</div><p class="pending">${tx(['Te controleren: inhoud, eigen bijdrage en geschiktheid voor het examen.','To verify: contents, personal contribution, and suitability for the exam.'])}</p>`:`<div class="empty-state">${tx(['Nog geen bewijs geselecteerd. Voeg een eigen document, feedback of een concreet projectvoorbeeld toe.','No evidence selected yet. Add your own document, feedback, or a specific project example.'])}</div>`}</div></details>`;
|
||||
}
|
||||
function about() {
|
||||
return `<section class="page-heading"><p class="eyebrow">03 / ${tx(['OVER MIJ','ABOUT ME'])}</p><h1>Alvin<br><em>Zilverstand.</em></h1><p>${tx(['Software Developer in opleiding. Derdejaars bij VISTA college in Heerlen.','Software Developer in training. Third-year student at VISTA college in Heerlen.'])}</p></section><section class="about-grid"><div><h2>${tx(['Leren door te bouwen.','Learning by building.'])}</h2><p>${tx(['Mijn schoolwerk loopt uiteen van websites en PHP-applicaties tot een magazijnsysteem en narrowcasting. Dit portfolio brengt de projecten en de bijbehorende bronnen bij elkaar.','My schoolwork ranges from websites and PHP applications to a warehouse system and narrowcasting. This portfolio brings those projects and their sources together.'])}</p><p>${tx(['Ik bouw dit portfolio voor mijn eindexamen. Daarna wil ik het verder gebruiken om mijn werk aan toekomstige werkgevers te laten zien.','I’m building this portfolio for my final exam. After that, I want to keep using it to show my work to future employers.'])}</p></div><div class="profile-facts"><div><span>${tx(['Opleiding','Course'])}</span><strong>Software Developer</strong></div><div><span>Campus</span><strong>VISTA · Heerlen</strong></div><div><span>${tx(['Studiefase','Study stage'])}</span><strong>${tx(['Leerjaar 3','Year 3'])}</strong></div><div><span>${tx(['Werk & broncode','Work & source'])}</span><strong>GitHub + Gitea</strong></div></div></section><section class="contact-section"><p class="eyebrow">${tx(['VERDER KIJKEN','TAKE A CLOSER LOOK'])}</p><h2>${tx(['De rest staat in de repositories.','There’s more in the repositories.'])}</h2><div class="actions">${ext(profile.github,'GitHub','button primary')}${ext(profile.gitea,'Gitea','button')}</div><p class="muted">${tx(['Een rechtstreeks contactadres en cv worden later toegevoegd.','A direct contact address and CV will be added later.'])}</p></section>`;
|
||||
return `<section class="page-heading"><p class="eyebrow">03 / ${tx(['OVER MIJ','ABOUT ME'])}</p><h1>Alvin<br><em>Zilverstand.</em></h1><p>${tx(['Software Developer in opleiding. Derdejaars bij VISTA college in Heerlen.','Software Developer in training. Third-year student at VISTA college in Heerlen.'])}</p></section><section class="about-grid"><div><h2>${tx(['Leren door te bouwen.','Learning by building.'])}</h2><p>${tx(['Mijn projecten lopen uiteen van websites en PHP-applicaties tot narrowcasting, een muziekgame, desktopsoftware en beheerscripts. Dit portfolio brengt de projecten en de bijbehorende bronnen bij elkaar.','My projects range from websites and PHP applications to narrowcasting, a music game, desktop software, and administration scripts. This portfolio brings those projects and their sources together.'])}</p><p>${tx(['Ik bouw dit portfolio voor mijn eindexamen. Daarna wil ik het verder gebruiken om mijn werk aan toekomstige werkgevers te laten zien.','I’m building this portfolio for my final exam. After that, I want to keep using it to show my work to future employers.'])}</p></div><div class="profile-facts"><div><span>${tx(['Opleiding','Course'])}</span><strong>Software Developer</strong></div><div><span>Campus</span><strong>VISTA · Heerlen</strong></div><div><span>${tx(['Studiefase','Study stage'])}</span><strong>${tx(['Leerjaar 3','Year 3'])}</strong></div><div><span>${tx(['Werk & broncode','Work & source'])}</span><strong>GitHub + Gitea</strong></div></div></section><section class="contact-section"><p class="eyebrow">${tx(['VERDER KIJKEN','TAKE A CLOSER LOOK'])}</p><h2>${tx(['De rest staat in de repositories.','There’s more in the repositories.'])}</h2><div class="actions">${ext(profile.github,'GitHub','button primary')}${ext(profile.gitea,'Gitea','button')}</div><p class="muted">${tx(['Een rechtstreeks contactadres en cv worden later toegevoegd.','A direct contact address and CV will be added later.'])}</p></section>`;
|
||||
}
|
||||
function render(focus = false) {
|
||||
document.documentElement.lang = lang;
|
||||
|
||||
+452
-1
@@ -392,6 +392,457 @@ export const projects = [
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "music-guessr",
|
||||
"name": [
|
||||
"Music Guessr",
|
||||
"Music Guessr"
|
||||
],
|
||||
"stack": [
|
||||
"Rust",
|
||||
"WebAssembly",
|
||||
"Deezer"
|
||||
],
|
||||
"nodes": [
|
||||
"Deezer",
|
||||
"Rust / WASM",
|
||||
"Browser"
|
||||
],
|
||||
"path": "rust_app",
|
||||
"kind": [
|
||||
"Muziekgame",
|
||||
"Music game"
|
||||
],
|
||||
"intro": [
|
||||
"Raad muziek aan de hand van korte fragmenten. Een browsergame met vrije rondes en een dagelijkse uitdaging van vijf nummers.",
|
||||
"Guess music from short previews. A browser game with unlimited rounds and a daily five-song challenge."
|
||||
],
|
||||
"context": [
|
||||
"Een persoonlijk gameproject met een eerdere JavaScript-versie en een aparte herschrijving in Rust. De huidige README verwijst naar de Rust-versie.",
|
||||
"A personal game project with an earlier JavaScript version and a separate Rust rewrite. The current README points to the Rust version."
|
||||
],
|
||||
"implementation": [
|
||||
"Rust bevat de spelregels, scoreberekening en browserinterface. WebAssembly verbindt die code met de browser; Deezer levert metadata en audiofragmenten.",
|
||||
"Rust contains the round rules, scoring, and browser interface. WebAssembly connects that code to the browser; Deezer supplies metadata and audio previews."
|
||||
],
|
||||
"decisions": [
|
||||
"De spelregels staan los van de browsercode. Dagelijkse selectie gebruikt een datum als invoer; voortgang wordt lokaal in de browser bewaard. De beschikbaarheid van muziek hangt af van Deezer.",
|
||||
"Game rules are separate from browser code. Daily selection takes a date as input; progress is stored locally in the browser. Music availability depends on Deezer."
|
||||
],
|
||||
"number": "04",
|
||||
"challenge": "—",
|
||||
"setting": [
|
||||
"Persoonlijk project",
|
||||
"Personal project"
|
||||
],
|
||||
"title": [
|
||||
"Music Guessr",
|
||||
"Music Guessr"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/music_guessr",
|
||||
"revision": "b306f860443a6cd3e18835ed83a59ea113414399",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "rust_app/README.md",
|
||||
"label": [
|
||||
"Projectopzet",
|
||||
"Project structure"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "rust_app/src/lib.rs",
|
||||
"label": [
|
||||
"Spelregels & score",
|
||||
"Game rules & scoring"
|
||||
],
|
||||
"type": "Rust",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "clipforge",
|
||||
"name": [
|
||||
"ClipForge",
|
||||
"ClipForge"
|
||||
],
|
||||
"stack": [
|
||||
"Rust",
|
||||
"Tauri",
|
||||
"TypeScript",
|
||||
"SQLite",
|
||||
"FFmpeg"
|
||||
],
|
||||
"nodes": [
|
||||
"Capture",
|
||||
"Rust / Tauri",
|
||||
"Clip library"
|
||||
],
|
||||
"path": "src",
|
||||
"kind": [
|
||||
"Desktopapplicatie",
|
||||
"Desktop application"
|
||||
],
|
||||
"intro": [
|
||||
"Een Windows-app voor gameclips, met een replaybuffer en een lokale clipbibliotheek. Rust verwerkt opnames en Tauri biedt de desktopinterface.",
|
||||
"A Windows game-clipping app with a replay buffer and a local clip library. Rust handles capture and Tauri provides the desktop interface."
|
||||
],
|
||||
"context": [
|
||||
"Een persoonlijk desktopproject voor het bewaren van gamemomenten. De repository beschrijft handmatige clips, sessieopnames en game-events als triggers.",
|
||||
"A personal desktop project for saving gaming moments. The repository describes manual clips, session recordings, and game-event triggers."
|
||||
],
|
||||
"implementation": [
|
||||
"De bronstructuur bevat modules voor capture, audio, sneltoetsen en een SQLite-bibliotheek. De documentatie beschrijft Windows Graphics Capture met FFmpeg als terugvaloptie.",
|
||||
"The source structure contains capture, audio, hotkey, and SQLite library modules. The documentation describes Windows Graphics Capture with FFmpeg as a fallback."
|
||||
],
|
||||
"decisions": [
|
||||
"Lokale opslag en een aparte Rust-kern vormen de basis. Installer- en opnameclaims uit de README zijn tijdens deze portfolioreview niet op Windows getest.",
|
||||
"Local storage and a separate Rust core form the foundation. Installer and capture claims in the README were not tested on Windows during this portfolio review."
|
||||
],
|
||||
"number": "05",
|
||||
"challenge": "—",
|
||||
"setting": [
|
||||
"Persoonlijk project",
|
||||
"Personal project"
|
||||
],
|
||||
"title": [
|
||||
"ClipForge",
|
||||
"ClipForge"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://github.com/Alvin-Zilverstand/clipforge-game-clipper",
|
||||
"revision": "32e258dee7179a58fc2d693a7d0e33a228be37b2",
|
||||
"forge": "github"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"label": [
|
||||
"Projectbeschrijving",
|
||||
"Project description"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "docs/architecture.md",
|
||||
"label": [
|
||||
"Architectuur",
|
||||
"Architecture"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "car-tuning-crm",
|
||||
"name": [
|
||||
"Car Tuning CRM",
|
||||
"Car Tuning CRM"
|
||||
],
|
||||
"challenge": "11",
|
||||
"setting": [
|
||||
"Schoolproject · challenge 11",
|
||||
"School project · challenge 11"
|
||||
],
|
||||
"stack": [
|
||||
"React",
|
||||
"Node.js",
|
||||
"Express",
|
||||
"MongoDB"
|
||||
],
|
||||
"nodes": [
|
||||
"React",
|
||||
"Express API",
|
||||
"MongoDB"
|
||||
],
|
||||
"path": "",
|
||||
"kind": [
|
||||
"Klantbeheer",
|
||||
"Customer management"
|
||||
],
|
||||
"intro": [
|
||||
"Een CRM voor een autotuningbedrijf, met klanten, contactgeschiedenis en voertuigaanpassingen in één applicatie.",
|
||||
"A CRM for a car-tuning business, bringing customers, contact history, and vehicle modifications into one application."
|
||||
],
|
||||
"context": [
|
||||
"De repository challenge-11 bevat een CRM, ondanks de algemenere portfoliobenaming in het schoolarchief. De beschrijving hier volgt de eigen README en broncode.",
|
||||
"The challenge-11 repository contains a CRM, despite the more general portfolio label in the school archive. This description follows its own README and source code."
|
||||
],
|
||||
"implementation": [
|
||||
"Een React-interface gebruikt routes voor klantbeheer, contacten en autoaanpassingen. De Express-server koppelt afzonderlijke API-routes aan MongoDB via Mongoose.",
|
||||
"A React interface provides customer, contact, and car-modification views. The Express server connects separate API routes to MongoDB through Mongoose."
|
||||
],
|
||||
"decisions": [
|
||||
"De scheiding tussen klanten, contacten en aanpassingen is zichtbaar in modellen, routes en componenten. Authenticatie is aanwezig; de beveiliging is niet als geheel beoordeeld.",
|
||||
"Customers, contacts, and modifications are separated in models, routes, and components. Authentication is present; security has not been assessed as a whole."
|
||||
],
|
||||
"number": "06",
|
||||
"title": [
|
||||
"Car Tuning CRM",
|
||||
"Car Tuning CRM"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/challenge-11",
|
||||
"revision": "66d2f197dcaab5a8d16504010a2fe5075500add3",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"label": [
|
||||
"Projectbeschrijving",
|
||||
"Project description"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "server.js",
|
||||
"label": [
|
||||
"Server & routes",
|
||||
"Server & routes"
|
||||
],
|
||||
"type": "JS",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pokedex",
|
||||
"name": [
|
||||
"Pokédex",
|
||||
"Pokédex"
|
||||
],
|
||||
"challenge": "08",
|
||||
"setting": [
|
||||
"Schoolproject · leerjaar 1",
|
||||
"School project · year 1"
|
||||
],
|
||||
"stack": [
|
||||
"JavaScript",
|
||||
"PHP",
|
||||
"MySQL"
|
||||
],
|
||||
"nodes": [
|
||||
"Browser",
|
||||
"PHP API",
|
||||
"MySQL"
|
||||
],
|
||||
"path": "v1/pokedex",
|
||||
"kind": [
|
||||
"Datagedreven website",
|
||||
"Data-driven website"
|
||||
],
|
||||
"intro": [
|
||||
"Een Pokédex met Pokémongegevens, afbeeldingen en detailpagina’s. PHP verbindt de browser met relationele gegevens.",
|
||||
"A Pokédex with Pokémon data, images, and detail pages. PHP connects the browser to relational data."
|
||||
],
|
||||
"context": [
|
||||
"Een schoolproject rond het presenteren van Pokémongegevens. De repository bevat de website, SQL-bestanden en JavaScript-hulpscripts voor data en afbeeldingen.",
|
||||
"A school project around presenting Pokémon data. The repository contains the website, SQL files, and JavaScript utilities for data and images."
|
||||
],
|
||||
"implementation": [
|
||||
"Het PHP-overzicht haalt Pokémon binnen een ID-bereik op en combineert typen via databasejoins. Een apart endpoint en een HTML-pagina ondersteunen de detailweergave.",
|
||||
"The PHP listing retrieves Pokémon within an ID range and combines types through database joins. A separate endpoint and HTML page support the detail view."
|
||||
],
|
||||
"decisions": [
|
||||
"De data staan los van de presentatie. De gekoppelde code laat de gegevensstroom zien; een werkende database-installatie en actuele testresultaten zijn nog niet aangetoond.",
|
||||
"Data is separate from presentation. The linked code shows the data flow; a working database installation and current test results have not yet been demonstrated."
|
||||
],
|
||||
"number": "07",
|
||||
"title": [
|
||||
"Pokédex",
|
||||
"Pokédex"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/pokedex",
|
||||
"revision": "43d4ca6798796c600b9044f8545f1c38c422c466",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "v1/pokedex/get_pokemons.php",
|
||||
"label": [
|
||||
"Pokémon ophalen",
|
||||
"Fetching Pokémon"
|
||||
],
|
||||
"type": "PHP",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "v1/pokedex/details.html",
|
||||
"label": [
|
||||
"Detailpagina",
|
||||
"Detail page"
|
||||
],
|
||||
"type": "HTML",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "school-canteen",
|
||||
"name": [
|
||||
"Schoolkantine",
|
||||
"School canteen"
|
||||
],
|
||||
"challenge": "07",
|
||||
"setting": [
|
||||
"Schoolproject · leerjaar 1",
|
||||
"School project · year 1"
|
||||
],
|
||||
"stack": [
|
||||
"JavaScript",
|
||||
"PHP",
|
||||
"MySQL"
|
||||
],
|
||||
"nodes": [
|
||||
"Menu",
|
||||
"PHP API",
|
||||
"Orders"
|
||||
],
|
||||
"path": "website",
|
||||
"kind": [
|
||||
"Bestelapplicatie",
|
||||
"Ordering application"
|
||||
],
|
||||
"intro": [
|
||||
"Een kantinemenu met productcategorieën, een winkelmand en orderverwerking. Een oefenproject waarin frontend en database samenkomen.",
|
||||
"A canteen menu with product categories, a cart, and order processing. A practice project connecting frontend and database."
|
||||
],
|
||||
"context": [
|
||||
"Een schoolproject voor een kantinebestelsysteem. De repository bevat aparte pagina’s voor bestellen, betalen en het bekijken van orders.",
|
||||
"A school project for a canteen ordering system. The repository contains separate pages for ordering, payment, and viewing orders."
|
||||
],
|
||||
"implementation": [
|
||||
"JavaScript haalt producten per categorie op via PHP. De orderroute ontvangt JSON, maakt een ordernummer en schrijft de bestelling met een prepared statement naar de database.",
|
||||
"JavaScript fetches products by category through PHP. The order endpoint receives JSON, creates an order number, and writes the order to the database using a prepared statement."
|
||||
],
|
||||
"decisions": [
|
||||
"Het menu en de orderverwerking zijn gescheiden. De betaalpagina is onderdeel van de oefeninterface; een echte betaalprovider of ingebruikname wordt niet geclaimd.",
|
||||
"The menu and order processing are separate. The payment page is part of the practice interface; no real payment provider or deployment is claimed."
|
||||
],
|
||||
"number": "08",
|
||||
"title": [
|
||||
"Schoolkantine",
|
||||
"School canteen"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/Schoolkantine",
|
||||
"revision": "01f98ea7d0d489b62728c7ca4abee1d86e0228d3",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "website/script.js",
|
||||
"label": [
|
||||
"Menu & winkelmand",
|
||||
"Menu & cart"
|
||||
],
|
||||
"type": "JS",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "website/place_order.php",
|
||||
"label": [
|
||||
"Bestelling opslaan",
|
||||
"Saving an order"
|
||||
],
|
||||
"type": "PHP",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "lxc-toolbox",
|
||||
"name": [
|
||||
"Proxmox LXC toolbox",
|
||||
"Proxmox LXC toolbox"
|
||||
],
|
||||
"stack": [
|
||||
"Bash",
|
||||
"Proxmox",
|
||||
"LXC"
|
||||
],
|
||||
"nodes": [
|
||||
"Task selection",
|
||||
"Bash / pct",
|
||||
"LXC containers"
|
||||
],
|
||||
"path": "",
|
||||
"kind": [
|
||||
"Beheerautomatisering",
|
||||
"Administration automation"
|
||||
],
|
||||
"intro": [
|
||||
"Een Bash-menu om onderhoudstaken en doelcontainers te kiezen. Voor locale-instellingen, APT-configuratie en het opruimen van oude back-ups.",
|
||||
"A Bash menu for choosing maintenance tasks and target containers. Covers locale settings, APT configuration, and old backup cleanup."
|
||||
],
|
||||
"context": [
|
||||
"Een verzameling scripts voor beheer op een Proxmox-host. De toolbox bundelt vier onderhoudstaken achter een menu en commandoregelopties.",
|
||||
"A collection of administration scripts for a Proxmox host. The toolbox brings four maintenance tasks together through a menu and command-line options."
|
||||
],
|
||||
"implementation": [
|
||||
"De toolbox selecteert taken en container-ID’s, haalt scripts op en controleert de Bash-syntax voordat taken starten. De documentatie beschrijft de vaste uitvoeringsvolgorde.",
|
||||
"The toolbox selects tasks and container IDs, downloads scripts, and checks Bash syntax before starting tasks. Its documentation describes the fixed execution order."
|
||||
],
|
||||
"decisions": [
|
||||
"Selectie van taken en containers zijn afzonderlijke keuzes. De README beschrijft tests met nagebootste Proxmox-commando’s; die zijn hier niet herhaald en live containers zijn niet getest.",
|
||||
"Task selection and container selection are separate choices. The README describes tests with mocked Proxmox commands; these were not repeated here and live containers were not tested."
|
||||
],
|
||||
"number": "09",
|
||||
"challenge": "—",
|
||||
"setting": [
|
||||
"Persoonlijk project",
|
||||
"Personal project"
|
||||
],
|
||||
"title": [
|
||||
"Proxmox LXC toolbox",
|
||||
"Proxmox LXC toolbox"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/scripts",
|
||||
"revision": "cb237cf5b0910c77917a8cad3c45b15a6c05a454",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "lxc-toolbox-README.md",
|
||||
"label": [
|
||||
"Gebruik & beperkingen",
|
||||
"Usage & limitations"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "lxc-toolbox.sh",
|
||||
"label": [
|
||||
"Bash-toolbox",
|
||||
"Bash toolbox"
|
||||
],
|
||||
"type": "Bash",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
export const source = (path, directory = false) => `${profile.school}/${directory ? "tree" : "blob"}/${revision}/${path.split("/").map(encodeURIComponent).join("/")}`;
|
||||
export const source = (path, directory = false, project = {}) => {
|
||||
const repo = project.repository || { url: profile.school, revision, forge: "github" };
|
||||
const view = repo.forge === "gitea" ? "src/commit" : (directory ? "tree" : "blob");
|
||||
return `${repo.url}/${view}/${repo.revision}${path ? "/" + path.split("/").map(encodeURIComponent).join("/") : ""}`;
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"id": "car-tuning-crm",
|
||||
"name": [
|
||||
"Car Tuning CRM",
|
||||
"Car Tuning CRM"
|
||||
],
|
||||
"challenge": "11",
|
||||
"setting": [
|
||||
"Schoolproject · challenge 11",
|
||||
"School project · challenge 11"
|
||||
],
|
||||
"stack": [
|
||||
"React",
|
||||
"Node.js",
|
||||
"Express",
|
||||
"MongoDB"
|
||||
],
|
||||
"nodes": [
|
||||
"React",
|
||||
"Express API",
|
||||
"MongoDB"
|
||||
],
|
||||
"path": "",
|
||||
"kind": [
|
||||
"Klantbeheer",
|
||||
"Customer management"
|
||||
],
|
||||
"intro": [
|
||||
"Een CRM voor een autotuningbedrijf, met klanten, contactgeschiedenis en voertuigaanpassingen in één applicatie.",
|
||||
"A CRM for a car-tuning business, bringing customers, contact history, and vehicle modifications into one application."
|
||||
],
|
||||
"context": [
|
||||
"De repository challenge-11 bevat een CRM, ondanks de algemenere portfoliobenaming in het schoolarchief. De beschrijving hier volgt de eigen README en broncode.",
|
||||
"The challenge-11 repository contains a CRM, despite the more general portfolio label in the school archive. This description follows its own README and source code."
|
||||
],
|
||||
"implementation": [
|
||||
"Een React-interface gebruikt routes voor klantbeheer, contacten en autoaanpassingen. De Express-server koppelt afzonderlijke API-routes aan MongoDB via Mongoose.",
|
||||
"A React interface provides customer, contact, and car-modification views. The Express server connects separate API routes to MongoDB through Mongoose."
|
||||
],
|
||||
"decisions": [
|
||||
"De scheiding tussen klanten, contacten en aanpassingen is zichtbaar in modellen, routes en componenten. Authenticatie is aanwezig; de beveiliging is niet als geheel beoordeeld.",
|
||||
"Customers, contacts, and modifications are separated in models, routes, and components. Authentication is present; security has not been assessed as a whole."
|
||||
],
|
||||
"number": "06",
|
||||
"title": [
|
||||
"Car Tuning CRM",
|
||||
"Car Tuning CRM"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/challenge-11",
|
||||
"revision": "66d2f197dcaab5a8d16504010a2fe5075500add3",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"label": [
|
||||
"Projectbeschrijving",
|
||||
"Project description"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "server.js",
|
||||
"label": [
|
||||
"Server & routes",
|
||||
"Server & routes"
|
||||
],
|
||||
"type": "JS",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"id": "clipforge",
|
||||
"name": [
|
||||
"ClipForge",
|
||||
"ClipForge"
|
||||
],
|
||||
"stack": [
|
||||
"Rust",
|
||||
"Tauri",
|
||||
"TypeScript",
|
||||
"SQLite",
|
||||
"FFmpeg"
|
||||
],
|
||||
"nodes": [
|
||||
"Capture",
|
||||
"Rust / Tauri",
|
||||
"Clip library"
|
||||
],
|
||||
"path": "src",
|
||||
"kind": [
|
||||
"Desktopapplicatie",
|
||||
"Desktop application"
|
||||
],
|
||||
"intro": [
|
||||
"Een Windows-app voor gameclips, met een replaybuffer en een lokale clipbibliotheek. Rust verwerkt opnames en Tauri biedt de desktopinterface.",
|
||||
"A Windows game-clipping app with a replay buffer and a local clip library. Rust handles capture and Tauri provides the desktop interface."
|
||||
],
|
||||
"context": [
|
||||
"Een persoonlijk desktopproject voor het bewaren van gamemomenten. De repository beschrijft handmatige clips, sessieopnames en game-events als triggers.",
|
||||
"A personal desktop project for saving gaming moments. The repository describes manual clips, session recordings, and game-event triggers."
|
||||
],
|
||||
"implementation": [
|
||||
"De bronstructuur bevat modules voor capture, audio, sneltoetsen en een SQLite-bibliotheek. De documentatie beschrijft Windows Graphics Capture met FFmpeg als terugvaloptie.",
|
||||
"The source structure contains capture, audio, hotkey, and SQLite library modules. The documentation describes Windows Graphics Capture with FFmpeg as a fallback."
|
||||
],
|
||||
"decisions": [
|
||||
"Lokale opslag en een aparte Rust-kern vormen de basis. Installer- en opnameclaims uit de README zijn tijdens deze portfolioreview niet op Windows getest.",
|
||||
"Local storage and a separate Rust core form the foundation. Installer and capture claims in the README were not tested on Windows during this portfolio review."
|
||||
],
|
||||
"number": "05",
|
||||
"challenge": "—",
|
||||
"setting": [
|
||||
"Persoonlijk project",
|
||||
"Personal project"
|
||||
],
|
||||
"title": [
|
||||
"ClipForge",
|
||||
"ClipForge"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://github.com/Alvin-Zilverstand/clipforge-game-clipper",
|
||||
"revision": "32e258dee7179a58fc2d693a7d0e33a228be37b2",
|
||||
"forge": "github"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"label": [
|
||||
"Projectbeschrijving",
|
||||
"Project description"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "docs/architecture.md",
|
||||
"label": [
|
||||
"Architectuur",
|
||||
"Architecture"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"id": "lxc-toolbox",
|
||||
"name": [
|
||||
"Proxmox LXC toolbox",
|
||||
"Proxmox LXC toolbox"
|
||||
],
|
||||
"stack": [
|
||||
"Bash",
|
||||
"Proxmox",
|
||||
"LXC"
|
||||
],
|
||||
"nodes": [
|
||||
"Task selection",
|
||||
"Bash / pct",
|
||||
"LXC containers"
|
||||
],
|
||||
"path": "",
|
||||
"kind": [
|
||||
"Beheerautomatisering",
|
||||
"Administration automation"
|
||||
],
|
||||
"intro": [
|
||||
"Een Bash-menu om onderhoudstaken en doelcontainers te kiezen. Voor locale-instellingen, APT-configuratie en het opruimen van oude back-ups.",
|
||||
"A Bash menu for choosing maintenance tasks and target containers. Covers locale settings, APT configuration, and old backup cleanup."
|
||||
],
|
||||
"context": [
|
||||
"Een verzameling scripts voor beheer op een Proxmox-host. De toolbox bundelt vier onderhoudstaken achter een menu en commandoregelopties.",
|
||||
"A collection of administration scripts for a Proxmox host. The toolbox brings four maintenance tasks together through a menu and command-line options."
|
||||
],
|
||||
"implementation": [
|
||||
"De toolbox selecteert taken en container-ID’s, haalt scripts op en controleert de Bash-syntax voordat taken starten. De documentatie beschrijft de vaste uitvoeringsvolgorde.",
|
||||
"The toolbox selects tasks and container IDs, downloads scripts, and checks Bash syntax before starting tasks. Its documentation describes the fixed execution order."
|
||||
],
|
||||
"decisions": [
|
||||
"Selectie van taken en containers zijn afzonderlijke keuzes. De README beschrijft tests met nagebootste Proxmox-commando’s; die zijn hier niet herhaald en live containers zijn niet getest.",
|
||||
"Task selection and container selection are separate choices. The README describes tests with mocked Proxmox commands; these were not repeated here and live containers were not tested."
|
||||
],
|
||||
"number": "09",
|
||||
"challenge": "—",
|
||||
"setting": [
|
||||
"Persoonlijk project",
|
||||
"Personal project"
|
||||
],
|
||||
"title": [
|
||||
"Proxmox LXC toolbox",
|
||||
"Proxmox LXC toolbox"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/scripts",
|
||||
"revision": "cb237cf5b0910c77917a8cad3c45b15a6c05a454",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "lxc-toolbox-README.md",
|
||||
"label": [
|
||||
"Gebruik & beperkingen",
|
||||
"Usage & limitations"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "lxc-toolbox.sh",
|
||||
"label": [
|
||||
"Bash-toolbox",
|
||||
"Bash toolbox"
|
||||
],
|
||||
"type": "Bash",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"id": "music-guessr",
|
||||
"name": [
|
||||
"Music Guessr",
|
||||
"Music Guessr"
|
||||
],
|
||||
"stack": [
|
||||
"Rust",
|
||||
"WebAssembly",
|
||||
"Deezer"
|
||||
],
|
||||
"nodes": [
|
||||
"Deezer",
|
||||
"Rust / WASM",
|
||||
"Browser"
|
||||
],
|
||||
"path": "rust_app",
|
||||
"kind": [
|
||||
"Muziekgame",
|
||||
"Music game"
|
||||
],
|
||||
"intro": [
|
||||
"Raad muziek aan de hand van korte fragmenten. Een browsergame met vrije rondes en een dagelijkse uitdaging van vijf nummers.",
|
||||
"Guess music from short previews. A browser game with unlimited rounds and a daily five-song challenge."
|
||||
],
|
||||
"context": [
|
||||
"Een persoonlijk gameproject met een eerdere JavaScript-versie en een aparte herschrijving in Rust. De huidige README verwijst naar de Rust-versie.",
|
||||
"A personal game project with an earlier JavaScript version and a separate Rust rewrite. The current README points to the Rust version."
|
||||
],
|
||||
"implementation": [
|
||||
"Rust bevat de spelregels, scoreberekening en browserinterface. WebAssembly verbindt die code met de browser; Deezer levert metadata en audiofragmenten.",
|
||||
"Rust contains the round rules, scoring, and browser interface. WebAssembly connects that code to the browser; Deezer supplies metadata and audio previews."
|
||||
],
|
||||
"decisions": [
|
||||
"De spelregels staan los van de browsercode. Dagelijkse selectie gebruikt een datum als invoer; voortgang wordt lokaal in de browser bewaard. De beschikbaarheid van muziek hangt af van Deezer.",
|
||||
"Game rules are separate from browser code. Daily selection takes a date as input; progress is stored locally in the browser. Music availability depends on Deezer."
|
||||
],
|
||||
"number": "04",
|
||||
"challenge": "—",
|
||||
"setting": [
|
||||
"Persoonlijk project",
|
||||
"Personal project"
|
||||
],
|
||||
"title": [
|
||||
"Music Guessr",
|
||||
"Music Guessr"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/music_guessr",
|
||||
"revision": "b306f860443a6cd3e18835ed83a59ea113414399",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "rust_app/README.md",
|
||||
"label": [
|
||||
"Projectopzet",
|
||||
"Project structure"
|
||||
],
|
||||
"type": "MD",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "rust_app/src/lib.rs",
|
||||
"label": [
|
||||
"Spelregels & score",
|
||||
"Game rules & scoring"
|
||||
],
|
||||
"type": "Rust",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"id": "pokedex",
|
||||
"name": [
|
||||
"Pokédex",
|
||||
"Pokédex"
|
||||
],
|
||||
"challenge": "08",
|
||||
"setting": [
|
||||
"Schoolproject · leerjaar 1",
|
||||
"School project · year 1"
|
||||
],
|
||||
"stack": [
|
||||
"JavaScript",
|
||||
"PHP",
|
||||
"MySQL"
|
||||
],
|
||||
"nodes": [
|
||||
"Browser",
|
||||
"PHP API",
|
||||
"MySQL"
|
||||
],
|
||||
"path": "v1/pokedex",
|
||||
"kind": [
|
||||
"Datagedreven website",
|
||||
"Data-driven website"
|
||||
],
|
||||
"intro": [
|
||||
"Een Pokédex met Pokémongegevens, afbeeldingen en detailpagina’s. PHP verbindt de browser met relationele gegevens.",
|
||||
"A Pokédex with Pokémon data, images, and detail pages. PHP connects the browser to relational data."
|
||||
],
|
||||
"context": [
|
||||
"Een schoolproject rond het presenteren van Pokémongegevens. De repository bevat de website, SQL-bestanden en JavaScript-hulpscripts voor data en afbeeldingen.",
|
||||
"A school project around presenting Pokémon data. The repository contains the website, SQL files, and JavaScript utilities for data and images."
|
||||
],
|
||||
"implementation": [
|
||||
"Het PHP-overzicht haalt Pokémon binnen een ID-bereik op en combineert typen via databasejoins. Een apart endpoint en een HTML-pagina ondersteunen de detailweergave.",
|
||||
"The PHP listing retrieves Pokémon within an ID range and combines types through database joins. A separate endpoint and HTML page support the detail view."
|
||||
],
|
||||
"decisions": [
|
||||
"De data staan los van de presentatie. De gekoppelde code laat de gegevensstroom zien; een werkende database-installatie en actuele testresultaten zijn nog niet aangetoond.",
|
||||
"Data is separate from presentation. The linked code shows the data flow; a working database installation and current test results have not yet been demonstrated."
|
||||
],
|
||||
"number": "07",
|
||||
"title": [
|
||||
"Pokédex",
|
||||
"Pokédex"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/pokedex",
|
||||
"revision": "43d4ca6798796c600b9044f8545f1c38c422c466",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "v1/pokedex/get_pokemons.php",
|
||||
"label": [
|
||||
"Pokémon ophalen",
|
||||
"Fetching Pokémon"
|
||||
],
|
||||
"type": "PHP",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "v1/pokedex/details.html",
|
||||
"label": [
|
||||
"Detailpagina",
|
||||
"Detail page"
|
||||
],
|
||||
"type": "HTML",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"id": "school-canteen",
|
||||
"name": [
|
||||
"Schoolkantine",
|
||||
"School canteen"
|
||||
],
|
||||
"challenge": "07",
|
||||
"setting": [
|
||||
"Schoolproject · leerjaar 1",
|
||||
"School project · year 1"
|
||||
],
|
||||
"stack": [
|
||||
"JavaScript",
|
||||
"PHP",
|
||||
"MySQL"
|
||||
],
|
||||
"nodes": [
|
||||
"Menu",
|
||||
"PHP API",
|
||||
"Orders"
|
||||
],
|
||||
"path": "website",
|
||||
"kind": [
|
||||
"Bestelapplicatie",
|
||||
"Ordering application"
|
||||
],
|
||||
"intro": [
|
||||
"Een kantinemenu met productcategorieën, een winkelmand en orderverwerking. Een oefenproject waarin frontend en database samenkomen.",
|
||||
"A canteen menu with product categories, a cart, and order processing. A practice project connecting frontend and database."
|
||||
],
|
||||
"context": [
|
||||
"Een schoolproject voor een kantinebestelsysteem. De repository bevat aparte pagina’s voor bestellen, betalen en het bekijken van orders.",
|
||||
"A school project for a canteen ordering system. The repository contains separate pages for ordering, payment, and viewing orders."
|
||||
],
|
||||
"implementation": [
|
||||
"JavaScript haalt producten per categorie op via PHP. De orderroute ontvangt JSON, maakt een ordernummer en schrijft de bestelling met een prepared statement naar de database.",
|
||||
"JavaScript fetches products by category through PHP. The order endpoint receives JSON, creates an order number, and writes the order to the database using a prepared statement."
|
||||
],
|
||||
"decisions": [
|
||||
"Het menu en de orderverwerking zijn gescheiden. De betaalpagina is onderdeel van de oefeninterface; een echte betaalprovider of ingebruikname wordt niet geclaimd.",
|
||||
"The menu and order processing are separate. The payment page is part of the practice interface; no real payment provider or deployment is claimed."
|
||||
],
|
||||
"number": "08",
|
||||
"title": [
|
||||
"Schoolkantine",
|
||||
"School canteen"
|
||||
],
|
||||
"repository": {
|
||||
"url": "https://codealvin.xyz/Alvin-Zilverstand/Schoolkantine",
|
||||
"revision": "01f98ea7d0d489b62728c7ca4abee1d86e0228d3",
|
||||
"forge": "gitea"
|
||||
},
|
||||
"codes": [],
|
||||
"evidence": [
|
||||
{
|
||||
"path": "website/script.js",
|
||||
"label": [
|
||||
"Menu & winkelmand",
|
||||
"Menu & cart"
|
||||
],
|
||||
"type": "JS",
|
||||
"codes": []
|
||||
},
|
||||
{
|
||||
"path": "website/place_order.php",
|
||||
"label": [
|
||||
"Bestelling opslaan",
|
||||
"Saving an order"
|
||||
],
|
||||
"type": "PHP",
|
||||
"codes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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.
|
||||
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 nine projects, twenty-four source/evidence items (twelve with provisional exam mappings) and eight process definitions.
|
||||
|
||||
| File | Responsibility |
|
||||
| --- | --- |
|
||||
@@ -15,13 +15,14 @@ Reviewed 10 November 2026 against the current source. This is a vanilla JavaScri
|
||||
| `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 |
|
||||
| `tests/` | Content integrity, editing, settings injection, publication and preview security 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/repository-review.md` | Public account inventory, selected source revisions and review limits |
|
||||
| `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 |
|
||||
|
||||
@@ -35,7 +36,7 @@ Routes: `#home`, `#work`, `#project/<id>`, `#evidence`, `#evidence/<code>`, `#ab
|
||||
|
||||
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`.
|
||||
Project IDs are stable route identifiers. Evidence paths default to `profile.school` at the pinned `revision`. An optional project `repository` overrides the base, commit and forge; `source(path, directory, project)` constructs GitHub or Gitea URLs. An optional bilingual `setting` describes school year or personal-project context. 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.
|
||||
|
||||
@@ -43,4 +44,4 @@ The print button opens all currently rendered process details and invokes browse
|
||||
|
||||
## 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.
|
||||
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 validates content and stages five assets before replacing `dist/`, removing stale files; it rejects redirected output/staging directories.
|
||||
+14
-6
@@ -17,35 +17,43 @@ Delete a project's JSON file to remove it. Remove entries from its `evidence` ar
|
||||
| --- | --- |
|
||||
| `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` |
|
||||
| `challenge` | Nonempty string, including combined labels such as `14 + 15`; use `—` for personal projects |
|
||||
| `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 |
|
||||
| `path` | Repository-relative project directory path, without a leading slash or `.` / `..` segments. An empty string links to the root only when `repository` is supplied |
|
||||
| `repository` | Optional object: `url` (HTTPS repository URL on github.com or codealvin.xyz), `revision` (40-character lowercase commit SHA), `forge` (`github` or `gitea`, matching the host). Applies to project and evidence links |
|
||||
| `setting` | Optional `[Dutch, English]` context, such as personal project or school year. Defaults to school project, year 2 |
|
||||
| `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 objects require `label` (`[Dutch, English]`), `path` (nonempty and repository-relative), `type` (nonempty display label such as `JS` or `DOCX`) and `codes` (array of known process codes). Optional `directory` is a boolean: on GitHub, `true` creates a `tree` link and omitted or `false` creates a `blob` link. Gitea uses `src/commit` for both files and directories. Evidence paths always use their project's repository; individual evidence items cannot override it.
|
||||
|
||||
The scaffold supplies `challenge: "—"`, `path: "projects"` and no `repository` or `setting`. Before publishing a personal project, set its repository and bilingual context explicitly; otherwise its links still target the school archive and its dossier context defaults to school year 2. Use a repository URL without a trailing slash, query or fragment, and copy the full reviewed commit SHA rather than a branch name.
|
||||
|
||||
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.
|
||||
`content/settings.json` supplies `profile`, `revision` and `processes`. Only these top-level keys are accepted. The compiler explicitly exports profile, revision, processes, projects and the source helper; arbitrary settings cannot become JavaScript 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.
|
||||
- `revision` pins default school-archive source links; a project `repository.revision` overrides it. 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 compiler validates the exact settings and profile structure, nonempty name, valid ISO review date, safe HTTPS links without credentials, GitHub/Gitea profile hosts, the GitHub school repository, full lowercase commit pins, unique process codes (B<number>-K<number>-W<number>, positive integers), and complete Dutch/English titles and descriptions. Project mappings must reference known codes. Optional project repositories require supported hosts, matching forge types and full commit pins. Validation does not check remote availability or assess evidence; review 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.
|
||||
|
||||
## Reviewing repositories
|
||||
|
||||
Keep a dated record in [repository-review.md](repository-review.md). Review representative source files and verify all linked paths at the exact commit before adding a project. Account ownership alone does not establish authorship of every file. Avoid duplicating mirrors and do not present upstream forks as original work. New sources may use empty `codes` arrays until an exam mapping is supported; these links remain visible in the project dossier without changing process counts. The current six additions follow this policy.
|
||||
@@ -13,7 +13,7 @@ docker compose ps
|
||||
curl -f http://192.168.1.50:8080/healthz
|
||||
```
|
||||
|
||||
Docker validates content, runs tests and builds inside a Node build stage. Only static assets enter the Nginx runtime image. No Node installation, database or persistent volume is required on the guest. Configure the guest and Docker to start on boot; the service uses `restart: unless-stopped`.
|
||||
Docker validates content, runs tests and builds inside a Node build stage. The build replaces its publication directory with exactly five validated static assets; only those assets enter the Nginx runtime image. The Docker context and Nginx public-file allowlists remain unchanged. No Node installation, database or persistent volume is required on the guest. Configure the guest and Docker to start on boot; the service uses `restart: unless-stopped`.
|
||||
|
||||
## Network access
|
||||
|
||||
@@ -80,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/).
|
||||
|
||||
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.
|
||||
During the initial documentation pass on 10 November 2026, the then-current six tests, static build and `docker compose config --quiet` passed. The suite has since expanded; see [verification](verification.md) for subsequent results. The Docker engine was unavailable during that initial pass, so image build, runtime health, proxy access and Proxmox deployment remain unverified. Configuration validation alone does not prove that the container can start.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Repository review — 10 November 2026
|
||||
|
||||
Public account inventories were read from the GitHub and Gitea APIs for Alvin-Zilverstand. Each returned 24 public repositories (page size 100; no further page required). The GitHub connector returned an empty list, so public API access was used. This review covers public repositories only, not private or organization repositories. Repository ownership is not proof that every line was personally written by Alvin.
|
||||
|
||||
## Selected additions
|
||||
|
||||
Six additional projects remain selected alongside the existing three school dossiers. Femcode and Tralalero were removed at Alvin’s request after the initial review. During that initial eleven-dossier review, readmes and representative source files were inspected and all 39 project/artifact targets were checked at their pinned commits. The current nine dossiers retain 33 targets: nine project links and twenty-four source/evidence links. The source programs were not run. The twelve retained additional source items have empty exam mappings; the existing twelve mapped items and collaboration gaps remain unchanged.
|
||||
|
||||
| Project | Account source | Reviewed revision | Linked artifacts |
|
||||
| --- | --- | --- | --- |
|
||||
| Music Guessr | [gitea](https://codealvin.xyz/Alvin-Zilverstand/music_guessr) | `b306f860443a6cd3e18835ed83a59ea113414399` | `rust_app/README.md`, `rust_app/src/lib.rs` |
|
||||
| ClipForge | [github](https://github.com/Alvin-Zilverstand/clipforge-game-clipper) | `32e258dee7179a58fc2d693a7d0e33a228be37b2` | `README.md`, `docs/architecture.md` |
|
||||
| Car Tuning CRM | [gitea](https://codealvin.xyz/Alvin-Zilverstand/challenge-11) | `66d2f197dcaab5a8d16504010a2fe5075500add3` | `README.md`, `server.js` |
|
||||
| Pokédex | [gitea](https://codealvin.xyz/Alvin-Zilverstand/pokedex) | `43d4ca6798796c600b9044f8545f1c38c422c466` | `v1/pokedex/get_pokemons.php`, `v1/pokedex/details.html` |
|
||||
| School canteen | [gitea](https://codealvin.xyz/Alvin-Zilverstand/Schoolkantine) | `01f98ea7d0d489b62728c7ca4abee1d86e0228d3` | `website/script.js`, `website/place_order.php` |
|
||||
| Proxmox LXC toolbox | [gitea](https://codealvin.xyz/Alvin-Zilverstand/scripts) | `cb237cf5b0910c77917a8cad3c45b15a6c05a454` | `lxc-toolbox-README.md`, `lxc-toolbox.sh` |
|
||||
|
||||
Additional inspected implementation files include ClipForge's src/lib.rs and package.json, the CRM's client/src/App.js, and Music Guessr's rust_app/src/lib.rs. Schoolkantine's script.js and place_order.php, Pokédex's get_pokemons.php, Femcode's main.py, Tralalero's main.rs and the LXC toolbox script support the implementation summaries. Source review was selective, not a full code or security audit. ClipForge's architecture document still describes pending native work while its README describes newer functionality; runtime and installer claims were not independently validated.
|
||||
|
||||
Gitea snapshots are selected for five retained additions; ClipForge is linked to GitHub. Overlapping account repositories are represented once. The original warehouse, narrowcasting and refactoring IDs and school snapshot remain unchanged. The school revision is d420c317abcbd117e0e1dd641674ab3283ab34ba; its linked paths were rechecked, but its DOCX contents and source test scripts were not reviewed or run. The qualification review date in settings is unchanged.
|
||||
|
||||
## Inventory decisions
|
||||
|
||||
Femcode and Tralalero_lang were reviewed but excluded from the visible portfolio at Alvin’s request. The initial 39-target check remains a historical review record; the current nine dossiers contain 33 targets.
|
||||
|
||||
| Repositories | Decision |
|
||||
| --- | --- |
|
||||
| school; Challenge_14_Magazijn_App_plannen; Challenge_15_Magazijn_App_Maken; narrow_casting_system | Existing dossiers already cover these projects; avoid duplicate cards |
|
||||
| music_guessr; clipforge-game-clipper; challenge-11; pokedex; Schoolkantine; scripts | Added with reviewed source links |
|
||||
| bob16; nginx-proxy-manager; novatorem; return-youtube-dislike; Twitter-X-Media-Batch-Downloader | GitHub marks these as forks; no independently reviewed contribution selected. Gitea mirror flags alone do not establish original authorship |
|
||||
| Alvin-Zilverstand | Profile README and generated profile graphics, not a separate application |
|
||||
| adblock | Gitea has no default branch; no project dossier selected |
|
||||
| compiled | Tree contains binaries without accompanying source context |
|
||||
| Challenge_16 | Sprite assets and README; not presented as a finished game |
|
||||
| carsite | Earlier static website with bundled framework/builder assets; left as archive material pending clearer contribution context |
|
||||
| Spik-en-span | Ticket-oriented HTML/PHP project; archive README's cleaning-service label does not accurately describe the inspected files. Left out of this selected set pending a fuller source review |
|
||||
| ict-algemeen-opdrachten | Exercise collection, retained in account archive rather than one application dossier |
|
||||
| sloppatron | Mixed experiments and minimal root documentation; not selected for a separate case study |
|
||||
| RTA-test | Small HTML demonstration, not selected for a separate case study |
|
||||
| install-docker; customised-pve-helper-script | Small administration scripts; the broader scripts/LXC toolbox provides the selected administration case study |
|
||||
|
||||
The site is a curated selection, not an assertion that all other repositories lack value. Personal contributions, collaborators, reflections, executed test results and assessed outcomes still need Alvin's own evidence.
|
||||
+55
-2
@@ -1,6 +1,59 @@
|
||||
# Verification
|
||||
|
||||
## Current checks — 10 November 2026
|
||||
## Latest checks — security verification, 10 November 2026
|
||||
|
||||
The initial working tree was clean. The checked-in baseline already contained staged replacement of build output, guarded preview URL parsing, strict settings validation, explicit module exports, process-code escaping and four security regression tests. This pass reviewed and verified those protections, made invalid review dates report the intended validation error, added direct bilingual rendering-injection and export-surface assertions, and corrected outdated publication/settings documentation. No project content, source-review dates, Docker/Nginx allowlists or rendering code changed. Generated `content.js` was regenerated by commands and remains byte-identical.
|
||||
|
||||
- Node v24.5.0; `npm test`: all 14 tests passed.
|
||||
- `npm run build`: passed. Regression tests confirm exactly five byte-identical public assets, removal of a nested synthetic stale file, rejection of redirected output, repository-relative operation from another working directory, and preservation of existing output when content validation fails.
|
||||
- Preview regression: malformed URL returns 400, subsequent valid request returns 200; source/private paths return 404 and all five public assets return 200. Loopback binding remains unchanged.
|
||||
- Settings regressions cover structure, unsafe URLs, unexpected export keys, duplicate/injected codes, incomplete translations and invalid dates. Renderer regression deliberately bypasses validation and verifies escaped process codes in option attributes, option labels, summaries and dossier links in both languages.
|
||||
- `node --check`: passed for scripts/content.mjs, scripts/build.mjs, scripts/serve.mjs, tests/editor.test.mjs, tests/security.test.mjs, app.js and generated content.js.
|
||||
- `docker compose config --quiet`: passed. Docker engine unavailable: Docker Desktop Linux engine named pipe missing; image build and runtime tests could not run.
|
||||
- Browser: home, work, all nine project routes, about and evidence checked in Dutch and English at 320px without document-width overflow. Evidence filter selected B1-K1-W4, rendered one open process and focused main; switching to Dutch preserved the filter. Keyboard activation of the skip link focused main and preserved the filter. No browser console errors recorded. Temporary viewport override reset afterward.
|
||||
- Port 4173 was unavailable (EACCES); browser checks used an automatically assigned loopback port instead.
|
||||
- `git diff --check`: passed. Historical results below are retained.
|
||||
|
||||
Limits: print/PDF was not rendered again; no rendering or print implementation changed in this pass. Container runtime, reverse proxy and deployment remain unverified. No external evidence review, commit, push or deployment was performed.
|
||||
|
||||
## Latest checks — documentation follow-up, 10 November 2026
|
||||
|
||||
Checked the documentation against the current compiler, renderers, tests and generated content. Confirmed nine projects, twenty-four source/evidence items and twelve mapped items. Updated contributor rules for repository overrides and context, clarified forge-specific evidence URLs and scaffold defaults, and separated historical eleven-project checks from the current nine-project selection.
|
||||
|
||||
- Repeated `npm test`: all eight tests passed.
|
||||
- Repeated `npm run build`: passed.
|
||||
- Local Markdown targets and `git diff --check`: passed.
|
||||
- Browser, external repositories and Docker were not rechecked in this documentation-only follow-up. Earlier results below retain their original scope.
|
||||
|
||||
## Earlier checks — selection adjustment, 10 November 2026
|
||||
|
||||
Removed Femcode and Tralalero at Alvin’s request, renumbered the LXC toolbox to 09 and updated bilingual biography copy and current project counts. Nine projects and twenty-four source/evidence items remain.
|
||||
|
||||
- Repeated `npm test`: all eight tests passed.
|
||||
- Repeated `npm run build`, `node --check app.js`, `node --check content.js` and `git diff --check`: passed.
|
||||
- Browser work archive checked in Dutch and English: nine project cards, neither removed project visible.
|
||||
- Broader navigation, mobile and evidence checks below belong to the earlier expansion pass and were not repeated for this removal.
|
||||
- No push or deployment performed.
|
||||
|
||||
## Earlier checks — repository expansion, 10 November 2026
|
||||
|
||||
Added eight reviewed projects, bilingual context labels and per-project pinned GitHub/Gitea source links. See [repository-review.md](repository-review.md) for scope, revisions, selection decisions and limitations.
|
||||
|
||||
- Node v24.5.0.
|
||||
- `npm test`: all eight tests passed, including forge-specific links and repository validation.
|
||||
- `npm run build`: passed; generated content and exactly five public assets.
|
||||
- `node --check`: app.js, content.js, scripts/content.mjs and both test files passed.
|
||||
- All 39 project and artifact paths verified through repository APIs at the selected commit IDs.
|
||||
- Real browser: 15 routes (home, work, eleven projects, evidence, about) in Dutch and English at the default viewport and 320px; no document-width overflow or undefined output.
|
||||
- Language switching preserved the selected project and focused the language control. Navigation focused main; keyboard activation of the skip link preserved the evidence route and focused main.
|
||||
- Filtering B1-K1-W4 displayed the three existing testing sources. No browser console errors observed. Music Guessr inspected visually at default and mobile widths.
|
||||
- `git diff --check`: passed after correcting mixed line-ending whitespace in edited lines.
|
||||
- Build output inspected for the five allowed assets and byte equality with source.
|
||||
|
||||
Preview uses http://127.0.0.1:5178 because port 4173 returned EACCES. Print/PDF rendering was not repeated; print CSS and the set of mapped exam evidence are unchanged. Source applications, installers, live Proxmox scripts and their test suites were not executed. DOCX contents, personal authorship and assessment outcomes remain unverified. Docker configuration was unchanged, so Docker checks were not repeated. No commit, push or deployment was performed.
|
||||
|
||||
|
||||
## Earlier documentation 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.
|
||||
|
||||
@@ -22,7 +75,7 @@ The saved desktop and mobile PNGs were inspected as historical references, not r
|
||||
|
||||
## 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.
|
||||
The following is the previous verification record, retained for context. Its two-test count predates the current six-test suite; these results describe that earlier pass. See the latest checks above for the subsequently repeated browser and source-path checks.
|
||||
|
||||
- `node --check app.js` passed.
|
||||
- `npm test`: both content integrity checks passed.
|
||||
|
||||
+27
-6
@@ -1,9 +1,30 @@
|
||||
import { mkdir, copyFile } from 'node:fs/promises';
|
||||
import { writeFile } from 'node:fs/promises';
|
||||
import { mkdir, copyFile, writeFile, realpath, lstat, rm, rename } from 'node:fs/promises';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { resolve, dirname } from 'node:path';
|
||||
import { compileContent } from './content.mjs';
|
||||
await writeFile(new URL('../content.js', import.meta.url), await compileContent());
|
||||
await mkdir('dist', { recursive: true });
|
||||
for (const file of ['index.html', 'styles.css', 'app.js', 'content.js', 'favicon.svg']) {
|
||||
await copyFile(file, `dist/${file}`);
|
||||
const root = await realpath(fileURLToPath(new URL('../', import.meta.url)));
|
||||
const output = resolve(root, 'dist');
|
||||
const staging = resolve(root, '.dist-staging');
|
||||
// Never recursively remove a redirected directory or a path outside this repository.
|
||||
async function verifyTarget(target) {
|
||||
if (dirname(target) !== root || !['dist', '.dist-staging'].some(name => target === resolve(root, name))) throw new Error('Unsafe build target');
|
||||
const stat = await lstat(target).catch(error => { if (error.code !== 'ENOENT') throw error; });
|
||||
if (stat && (stat.isSymbolicLink() || !stat.isDirectory() || await realpath(target) !== target)) throw new Error('Build target must be a real repository directory');
|
||||
}
|
||||
const content = await compileContent();
|
||||
await verifyTarget(output);
|
||||
await verifyTarget(staging);
|
||||
// Exclusive creation prevents concurrent builds from sharing staging output.
|
||||
await mkdir(staging);
|
||||
try {
|
||||
for (const file of ['index.html', 'styles.css', 'app.js', 'favicon.svg']) await copyFile(resolve(root, file), resolve(staging, file));
|
||||
await writeFile(resolve(staging, 'content.js'), content);
|
||||
await writeFile(resolve(root, 'content.js'), content);
|
||||
await verifyTarget(output);
|
||||
await rm(output, { recursive: true, force: true });
|
||||
await rename(staging, output);
|
||||
} finally {
|
||||
await verifyTarget(staging);
|
||||
await rm(staging, { recursive: true, force: true });
|
||||
}
|
||||
console.log('Built static site in dist/');
|
||||
+43
-3
@@ -4,6 +4,36 @@ import { pathToFileURL } from 'node:url';
|
||||
const root = new URL('../', import.meta.url);
|
||||
const readJSON = async path => JSON.parse(await readFile(new URL(path, root), 'utf8'));
|
||||
const pairs = ['kind', 'title', 'name', 'intro', 'context', 'implementation', 'decisions'];
|
||||
const require = (ok, message) => { if (!ok) throw new Error(message); };
|
||||
const pair = value => Array.isArray(value) && value.length === 2 && value.every(v => typeof v === 'string' && v.trim());
|
||||
const keys = (value, expected) => value !== null && typeof value === 'object' && !Array.isArray(value) && Object.keys(value).length === expected.length && expected.every(k => Object.hasOwn(value, k));
|
||||
const safeHTTPS = value => {
|
||||
if (typeof value !== 'string' || /[\s\\<>"']/.test(value)) return false;
|
||||
try {
|
||||
const url = new URL(value);
|
||||
return value.startsWith('https://') && url.protocol === 'https:' && !!url.hostname && !url.username && !url.password;
|
||||
} catch { return false; }
|
||||
};
|
||||
export function validateSettings(settings) {
|
||||
require(keys(settings, ['profile', 'revision', 'processes']), 'settings: expected only profile, revision and processes');
|
||||
const p = settings.profile;
|
||||
require(keys(p, ['name', 'github', 'gitea', 'school', 'qualification', 'reviewed']), 'profile: invalid structure');
|
||||
require(typeof p.name === 'string' && p.name.trim(), 'profile.name: required text');
|
||||
require(typeof p.reviewed === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(p.reviewed) && Number.isFinite(Date.parse(p.reviewed)) && new Date(p.reviewed).toISOString().slice(0, 10) === p.reviewed, 'profile.reviewed: expected a valid ISO date');
|
||||
for (const key of ['github', 'gitea', 'school', 'qualification']) require(safeHTTPS(p[key]), `profile.${key}: expected a safe HTTPS URL`);
|
||||
require(/^https:\/\/github\.com\/[A-Za-z0-9_-]+$/.test(p.github), 'profile.github: expected a GitHub profile');
|
||||
require(/^https:\/\/codealvin\.xyz\/[A-Za-z0-9_-]+$/.test(p.gitea), 'profile.gitea: expected a Gitea profile');
|
||||
require(/^https:\/\/github\.com\/[A-Za-z0-9_-]+\/[A-Za-z0-9_.-]+$/.test(p.school) && !['.', '..'].includes(p.school.split('/').pop()), 'profile.school: expected a GitHub repository');
|
||||
require(typeof settings.revision === 'string' && /^[a-f0-9]{40}$/.test(settings.revision), 'revision: expected a full lowercase commit SHA');
|
||||
require(Array.isArray(settings.processes), 'processes: expected an array');
|
||||
const codes = new Set();
|
||||
for (const process of settings.processes) {
|
||||
require(keys(process, ['code', 'title', 'description']), 'process: invalid structure');
|
||||
require(typeof process.code === 'string' && /^B[1-9]\d*-K[1-9]\d*-W[1-9]\d*$/.test(process.code) && !codes.has(process.code), 'process.code: invalid or duplicate code');
|
||||
codes.add(process.code);
|
||||
require(pair(process.title) && pair(process.description), 'process: provide Dutch and English title and description');
|
||||
}
|
||||
}
|
||||
export function validateProjects(projects, processes) {
|
||||
const ids = new Set();
|
||||
const codes = new Set(processes.map(p => p.code));
|
||||
@@ -18,7 +48,12 @@ export function validateProjects(projects, processes) {
|
||||
for (const key of ['number', 'challenge']) require(typeof p[key] === 'string' && p[key].trim(), `${p.id}.${key}: required text`);
|
||||
for (const key of ['stack', 'nodes']) require(Array.isArray(p[key]) && p[key].length > 0 && p[key].every(v => typeof v === 'string' && v.trim()), `${p.id}.${key}: provide text entries`);
|
||||
require(p.nodes.length === 3, `${p.id}.nodes: provide three diagram labels`);
|
||||
require(path(p.path), `${p.id}.path: provide a repository-relative path`);
|
||||
if (p.repository !== undefined) {
|
||||
const r = p.repository;
|
||||
require(r && /^https:\/\/(github\.com|codealvin\.xyz)\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(r.url) && /^[a-f0-9]{40}$/.test(r.revision) && ['github', 'gitea'].includes(r.forge) && (r.forge === 'github') === r.url.startsWith('https://github.com/'), `${p.id}.repository: provide a supported repository and pinned commit`);
|
||||
}
|
||||
require(path(p.path) || (p.repository && p.path === ''), `${p.id}.path: provide a repository-relative path`);
|
||||
require(p.setting === undefined || pair(p.setting), `${p.id}.setting: provide Dutch and English text`);
|
||||
require(mapping(p.codes), `${p.id}.codes: unknown process code`);
|
||||
require(Array.isArray(p.evidence), `${p.id}.evidence: expected an array`);
|
||||
for (const e of p.evidence) {
|
||||
@@ -28,13 +63,18 @@ export function validateProjects(projects, processes) {
|
||||
}
|
||||
export async function compileContent() {
|
||||
const settings = await readJSON('content/settings.json');
|
||||
validateSettings(settings);
|
||||
const files = (await readdir(new URL('content/projects/', root))).filter(f => f.endsWith('.json')).sort();
|
||||
const projects = await Promise.all(files.map(f => readJSON(`content/projects/${f}`)));
|
||||
projects.sort((a, b) => a.number.localeCompare(b.number, undefined, { numeric: true }));
|
||||
validateProjects(projects, settings.processes);
|
||||
return '// Generated from content/ by npm run content. Edit the JSON source files.\n' +
|
||||
Object.entries({ ...settings, projects }).map(([key, value]) => `export const ${key} = ${JSON.stringify(value, null, 2)};`).join('\n') +
|
||||
'\nexport const source = (path, directory = false) => `${profile.school}/${directory ? "tree" : "blob"}/${revision}/${path.split("/").map(encodeURIComponent).join("/")}`;\n';
|
||||
Object.entries({ profile: settings.profile, revision: settings.revision, processes: settings.processes, projects }).map(([key, value]) => `export const ${key} = ${JSON.stringify(value, null, 2)};`).join('\n') +
|
||||
'\nexport const source = (path, directory = false, project = {}) => {\n' +
|
||||
' const repo = project.repository || { url: profile.school, revision, forge: "github" };\n' +
|
||||
' const view = repo.forge === "gitea" ? "src/commit" : (directory ? "tree" : "blob");\n' +
|
||||
' return `${repo.url}/${view}/${repo.revision}${path ? "/" + path.split("/").map(encodeURIComponent).join("/") : ""}`;\n' +
|
||||
'};\n';
|
||||
}
|
||||
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
||||
const [command, id] = process.argv.slice(2);
|
||||
|
||||
+7
-3
@@ -4,12 +4,16 @@ import { compileContent } from './content.mjs';
|
||||
const port = Number(process.env.PORT || 4173);
|
||||
const files = new Map([['/', 'index.html'], ['/index.html', 'index.html'], ['/styles.css', 'styles.css'], ['/app.js', 'app.js'], ['/content.js', 'content.js'], ['/favicon.svg', 'favicon.svg']]);
|
||||
const mime = { html: 'text/html', css: 'text/css', js: 'text/javascript', svg: 'image/svg+xml' };
|
||||
createServer(async (req, res) => {
|
||||
const file = files.get(new URL(req.url, 'http://localhost').pathname);
|
||||
const server = createServer(async (req, res) => {
|
||||
let pathname;
|
||||
try { pathname = new URL(req.url, 'http://localhost').pathname; }
|
||||
catch { res.writeHead(400); return res.end('Bad request'); }
|
||||
const file = files.get(pathname);
|
||||
if (!file) { res.writeHead(404); return res.end('Not found'); }
|
||||
try {
|
||||
const body = file === 'content.js' ? await compileContent() : await readFile(new URL(`../${file}`, import.meta.url));
|
||||
res.writeHead(200, { 'Content-Type': `${mime[file.split('.').pop()]}; charset=utf-8`, 'Cache-Control': 'no-cache', 'X-Content-Type-Options': 'nosniff' });
|
||||
res.end(body);
|
||||
} catch { res.writeHead(500); res.end('Unable to read file'); }
|
||||
}).listen(port, '127.0.0.1', () => console.log(`Local: http://127.0.0.1:${port}`));
|
||||
}).listen(port, '127.0.0.1', () => console.log(`Local: http://127.0.0.1:${server.address().port}`));
|
||||
|
||||
+15
-4
@@ -14,10 +14,11 @@ test('Evidence mappings use real process IDs and complete translations', () => {
|
||||
for (const e of p.evidence) {
|
||||
assert.ok(e.codes.every(c => ids.has(c)), e.path);
|
||||
assert.ok(e.label.length === 2 && e.label.every(Boolean));
|
||||
const url = new URL(source(e.path, e.directory));
|
||||
assert.equal(url.hostname, 'github.com');
|
||||
assert.ok(url.pathname.includes(revision));
|
||||
assert.equal(decodeURIComponent(url.pathname.split(`${revision}/`)[1]), e.path);
|
||||
const url = new URL(source(e.path, e.directory, p));
|
||||
const pin = p.repository?.revision || revision;
|
||||
assert.equal(url.hostname, p.repository ? new URL(p.repository.url).hostname : 'github.com');
|
||||
assert.ok(url.pathname.includes(pin));
|
||||
assert.equal(decodeURIComponent(url.pathname.split(`${pin}/`)[1]), e.path);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -26,3 +27,13 @@ test('Collaboration gaps remain explicit rather than claiming unsupported eviden
|
||||
assert.ok(!projects.some(p => p.evidence.some(e => e.codes.includes(code))));
|
||||
}
|
||||
});
|
||||
|
||||
test('Repository links distinguish GitHub and Gitea and encode paths', () => {
|
||||
const revision = 'a'.repeat(40);
|
||||
const github = { repository: { url: 'https://github.com/example/repo', revision, forge: 'github' } };
|
||||
const gitea = { repository: { url: 'https://codealvin.xyz/example/repo', revision, forge: 'gitea' } };
|
||||
assert.equal(source('a b/test.md', false, github), github.repository.url + '/blob/' + revision + '/a%20b/test.md');
|
||||
assert.equal(source('', true, github), github.repository.url + '/tree/' + revision);
|
||||
assert.equal(source('src', true, gitea), gitea.repository.url + '/src/commit/' + revision + '/src');
|
||||
assert.equal(source('a b.md', false, gitea), gitea.repository.url + '/src/commit/' + revision + '/a%20b.md');
|
||||
});
|
||||
@@ -9,6 +9,7 @@ import { runInNewContext } from 'node:vm';
|
||||
test('content compiler preserves source data', async () => {
|
||||
const result = await import(`data:text/javascript;base64,${Buffer.from(await compileContent()).toString('base64')}`);
|
||||
assert.deepEqual(result.projects, projects);
|
||||
assert.deepEqual(Object.keys(result).sort(), ['processes', 'profile', 'projects', 'revision', 'source']);
|
||||
});
|
||||
test('deleting all projects or evidence is supported', () => {
|
||||
assert.doesNotThrow(() => validateProjects([], processes));
|
||||
@@ -41,3 +42,41 @@ test('homepage renders after removing the featured project or all projects', asy
|
||||
else assert.ok(html.includes('No projects added yet.'));
|
||||
}
|
||||
});
|
||||
|
||||
test('Repository overrides require safe supported URLs and full commit pins', () => {
|
||||
for (const repository of [null, {}, { url: 'javascript:alert(1)', revision: 'a'.repeat(40), forge: 'gitea' }, { url: 'https://github.com/example/repo', revision: 'main', forge: 'github' }, { url: 'https://codealvin.xyz/example/repo', revision: 'a'.repeat(40), forge: 'github' }]) {
|
||||
assert.throws(() => validateProjects([{ ...projects[0], repository }], processes));
|
||||
}
|
||||
assert.throws(() => validateProjects([{ ...projects[0], setting: ['Only one language'] }], processes));
|
||||
});
|
||||
|
||||
test('process injection is escaped in option values, labels, summaries and dossier links', async () => {
|
||||
const code = (await readFile(new URL('../app.js', import.meta.url), 'utf8')).replace(/^import .*;\r?\n/, '');
|
||||
const payload = '\"><img src=x onerror=alert(1)>&\'';
|
||||
const escaped = '"><img src=x onerror=alert(1)>&'';
|
||||
for (const language of ['nl', 'en']) {
|
||||
for (const hash of ['#evidence', `#project/${projects[0].id}`]) {
|
||||
const elements = new Map();
|
||||
const document = {
|
||||
documentElement: {},
|
||||
querySelector(selector) {
|
||||
if (!elements.has(selector)) elements.set(selector, { innerHTML: '', addEventListener() {} });
|
||||
return elements.get(selector);
|
||||
},
|
||||
querySelectorAll() { return []; },
|
||||
};
|
||||
runInNewContext(code, { profile, source, projects: [{ ...projects[0], codes: [payload] }], processes: [{ ...processes[0], code: payload }], document, URLSearchParams, location: { search: `?lang=${language}`, hash }, window: { addEventListener() {} } });
|
||||
const html = elements.get('main').innerHTML;
|
||||
assert.ok(!html.includes(payload));
|
||||
assert.ok(!html.includes('<img'));
|
||||
if (hash === '#evidence') {
|
||||
assert.ok(html.includes(`value="${escaped}"`));
|
||||
assert.ok(html.includes(`>${escaped} ·`));
|
||||
assert.ok(html.includes(`process-code">${escaped}</span>`));
|
||||
} else {
|
||||
assert.ok(html.includes(`href="#evidence/${escaped}"`));
|
||||
assert.ok(html.includes(`>${escaped}</a>`));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,79 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { mkdtemp, cp, mkdir, writeFile, readFile, readdir, rm, symlink } from 'node:fs/promises';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { spawn, execFileSync } from 'node:child_process';
|
||||
import { request } from 'node:http';
|
||||
import { once } from 'node:events';
|
||||
import { validateSettings } from '../scripts/content.mjs';
|
||||
const root = new URL('../', import.meta.url);
|
||||
const settings = JSON.parse(await readFile(new URL('content/settings.json', root)));
|
||||
const assets = ['app.js', 'content.js', 'favicon.svg', 'index.html', 'styles.css'];
|
||||
async function fixture(t) {
|
||||
const dir = await mkdtemp(join(tmpdir(), 'portfolio-security-'));
|
||||
t.after(() => rm(dir, { recursive: true, force: true }));
|
||||
for (const name of ['scripts', 'content', ...assets]) await cp(new URL(name, root), join(dir, name), { recursive: true });
|
||||
return dir;
|
||||
}
|
||||
test('build replaces stale output from any cwd and preserves output on invalid content', async t => {
|
||||
const dir = await fixture(t);
|
||||
await mkdir(join(dir, 'dist/private'), { recursive: true });
|
||||
await writeFile(join(dir, 'dist/private/secret.txt'), 'synthetic');
|
||||
const build = () => execFileSync(process.execPath, [join(dir, 'scripts/build.mjs')], { cwd: tmpdir(), stdio: 'pipe' });
|
||||
build();
|
||||
assert.deepEqual((await readdir(join(dir, 'dist'))).sort(), assets);
|
||||
for (const file of assets) assert.deepEqual(await readFile(join(dir, 'dist', file)), await readFile(join(dir, file)));
|
||||
await writeFile(join(dir, 'content/settings.json'), '{}');
|
||||
assert.throws(build);
|
||||
assert.deepEqual((await readdir(join(dir, 'dist'))).sort(), assets);
|
||||
});
|
||||
test('build refuses a redirected publication directory', async t => {
|
||||
const dir = await fixture(t);
|
||||
const outside = join(dir, 'protected');
|
||||
await mkdir(outside);
|
||||
await writeFile(join(outside, 'keep'), 'keep');
|
||||
await symlink(outside, join(dir, 'dist'), process.platform === 'win32' ? 'junction' : 'dir');
|
||||
assert.throws(() => execFileSync(process.execPath, [join(dir, 'scripts/build.mjs')], { stdio: 'pipe' }));
|
||||
assert.equal(await readFile(join(outside, 'keep'), 'utf8'), 'keep');
|
||||
});
|
||||
test('settings reject invalid structures, URLs, exports, duplicate codes and injection', () => {
|
||||
assert.doesNotThrow(() => validateSettings(settings));
|
||||
const mutations = [
|
||||
s => { s.extra = 'unexpected'; }, s => { s['x = 1; alert(1); //'] = 1; },
|
||||
s => { s.profile = null; }, s => { delete s.profile.name; },
|
||||
s => { s.revision = 'main'; }, s => { s.revision = 'A'.repeat(40); },
|
||||
s => { s.processes = {}; }, s => { s.processes.push(s.processes[0]); },
|
||||
s => { s.processes[0].code = '\"><img src=x onerror=alert(1)>'; },
|
||||
s => { s.processes[0].title = ['Dutch', '']; }, s => { s.processes[0].description = ['one']; },
|
||||
s => { s.profile.reviewed = '2026-02-30'; },
|
||||
s => { s.profile.reviewed = '2026-99-99'; },
|
||||
...['javascript:alert(1)', 'http://example.com', 'https://user:pass@example.com', 'https://example.com/\" onmouseover=\"alert(1)', 'https://example.com\\evil', 'https://'].map(url => s => { s.profile.qualification = url; }),
|
||||
s => { s.profile.school = 'https://github.com/user/repo?evil'; },
|
||||
s => { s.profile.github = 'https://github.com.evil.test/user'; },
|
||||
];
|
||||
for (const mutate of mutations) { const value = structuredClone(settings); mutate(value); assert.throws(() => validateSettings(value)); }
|
||||
});
|
||||
test('preview survives malformed URLs and denies private/source paths', async t => {
|
||||
const child = spawn(process.execPath, ['scripts/serve.mjs'], { cwd: root, env: { ...process.env, PORT: '0' }, stdio: ['ignore', 'pipe', 'pipe'] });
|
||||
t.after(async () => { child.kill(); if (child.exitCode === null) await once(child, 'exit'); });
|
||||
const address = await new Promise((resolve, reject) => {
|
||||
child.stdout.once('data', data => resolve(String(data).match(/:(\d+)/)[1]));
|
||||
child.once('error', reject); child.once('exit', code => reject(new Error(`Preview exited: ${code}`)));
|
||||
});
|
||||
const get = path => new Promise((resolve, reject) => {
|
||||
const req = request({ hostname: '127.0.0.1', port: address, path }, res => { res.resume(); res.on('end', () => resolve(res.statusCode)); });
|
||||
req.on('error', reject); req.end();
|
||||
});
|
||||
assert.equal(await get('http://[invalid'), 400);
|
||||
assert.equal(await get('/'), 200);
|
||||
for (const path of ['/content/settings.json', '/scripts/content.mjs', '/.env', '/docs/verification.md', '/package.json', '/%2e%2e/.env', '/dist/index.html']) assert.equal(await get(path), 404, path);
|
||||
for (const file of assets) assert.equal(await get(`/${file}`), 200);
|
||||
});
|
||||
|
||||
|
||||
test('invalid review dates produce a descriptive validation error', () => {
|
||||
const value = structuredClone(settings);
|
||||
value.profile.reviewed = '2026-99-99';
|
||||
assert.throws(() => validateSettings(value), /profile.reviewed: expected a valid ISO date/);
|
||||
});
|
||||
Reference in new issue
Block a user