seconf
This commit is contained in:
1 parent
ae2c99d71a
commit
846054b7b9
25 files changed
+2513
-148
No files matched your search
@@ -0,0 +1,34 @@
|
||||
# Codebase index
|
||||
|
||||
Indexed 9 November 2026, before the content workflow changes. This is a vanilla JavaScript static portfolio with hash routing, Dutch/English text, and no runtime dependencies.
|
||||
|
||||
| File | Responsibility |
|
||||
| --- | --- |
|
||||
| `content/projects/*.json` | Editable projects, each with its evidence items; display order uses `number` |
|
||||
| `content/settings.json` | Profile links, pinned source revision, eight process definitions |
|
||||
| `content.js` | Generated browser module; do not edit directly |
|
||||
| `app.js` | DOM rendering, translations, navigation, evidence filtering and printing |
|
||||
| `styles.css` | Desktop/mobile layouts, project diagrams, accessibility and print styles |
|
||||
| `index.html`, `favicon.svg` | Document shell, metadata and icon |
|
||||
| `scripts/content.mjs` | Validate content, generate module, scaffold a project |
|
||||
| `scripts/serve.mjs` | Loopback-only static preview; compiles content when requested |
|
||||
| `scripts/build.mjs` | Validate/generate content, copy five public assets to `dist/` |
|
||||
| `tests/` | Content integrity and editing regression checks |
|
||||
| `Dockerfile`, `.dockerignore` | Build and test source in Node, then serve public assets with Nginx; see compose.yaml, docker/nginx.conf and docs/docker-hosting.md |
|
||||
| `docs/verification.md` | Earlier verification record, not a current test report |
|
||||
|
||||
## Rendering and dependencies
|
||||
|
||||
`content/ → scripts/content.mjs → content.js → app.js → main`
|
||||
|
||||
Routes: `#home`, `#work`, `#project/<id>`, `#evidence`, `#evidence/<code>`, `#about`. Unknown routes show a 404. Language is selected using `?lang=nl` or `?lang=en`.
|
||||
|
||||
`header` and `footer` render shared navigation. `home` and `work` render project lists; `detail` renders a dossier. `processRow` derives evidence counts and links from every project's `evidence` array. Removing evidence automatically removes its process-index entries.
|
||||
|
||||
At initial indexing there were three projects and twelve evidence entries in a single handwritten `content.js`. The homepage assumed at least one project, linked directly to `warehouse`, and displayed a fixed count. These assumptions were removed for content management. The first project by number is now featured; an empty portfolio is supported.
|
||||
|
||||
Project IDs are stable route identifiers. Evidence paths are relative to `profile.school` at the pinned `revision`. Text pairs are `[Dutch, English]`. The existing design uses exactly three diagram nodes. Personal contribution and reflection copy is still shared placeholder text in `app.js`.
|
||||
|
||||
## Exposure boundary
|
||||
|
||||
Editing happens in local JSON files. The preview server has no write endpoint and binds to `127.0.0.1`. Production ships five static files, with no editor, login, database, or server process. All content included in a build is public: only put publishable material in these files. Publish `dist/`, not the repository root.
|
||||
@@ -0,0 +1,77 @@
|
||||
# Proxmox Docker hosting
|
||||
|
||||
Use a Linux guest with Docker Engine and the Docker Compose plugin installed. Copy this repository to the guest, or clone it after committing and pushing your changes. From the repository directory:
|
||||
|
||||
```sh
|
||||
cp .env.example .env
|
||||
# Edit .env: set BIND_ADDRESS to the portfolio guest's LAN IP.
|
||||
docker compose up -d --build
|
||||
docker compose ps
|
||||
# Replace the example IP with the portfolio guest's LAN IP:
|
||||
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`.
|
||||
|
||||
## Network access
|
||||
|
||||
The default binding is `127.0.0.1:8080`, accessible only on the Docker guest. A reverse proxy running directly on that guest can forward to it.
|
||||
|
||||
For access from your laptop or a reverse proxy on another machine, edit `.env` to use the guest's actual LAN IP:
|
||||
|
||||
```dotenv
|
||||
BIND_ADDRESS=192.168.1.50
|
||||
PORTFOLIO_PORT=8080
|
||||
```
|
||||
|
||||
Run `docker compose up -d` again, then open `http://192.168.1.50:8080` using your actual IP. Restrict port 8080 at the network/Proxmox firewall to the intended LAN or reverse proxy. Change `PORTFOLIO_PORT` if the port is already occupied.
|
||||
|
||||
## Separate Nginx Proxy Manager box
|
||||
|
||||
Your topology is: Internet → Nginx Proxy Manager (HTTPS) → portfolio guest LAN IP:8080 (HTTP). The portfolio container needs no certificate or domain configuration.
|
||||
|
||||
In Nginx Proxy Manager, add a **Proxy Host** with these settings:
|
||||
|
||||
| Setting | Value |
|
||||
| --- | --- |
|
||||
| Domain Names | Your portfolio domain, such as `portfolio.example.com` |
|
||||
| Scheme | `http` |
|
||||
| Forward Hostname / IP | The portfolio guest's LAN IP, such as `192.168.1.50` |
|
||||
| Forward Port | `8080`, or your chosen `PORTFOLIO_PORT` |
|
||||
| Access List | Publicly Accessible, for a public portfolio |
|
||||
| Cache Assets | Off, so content edits revalidate immediately |
|
||||
| Websockets Support | Off; this static site does not use WebSockets |
|
||||
| SSL Certificate | Select an existing matching certificate or request one |
|
||||
| Force SSL | On after the certificate is configured |
|
||||
|
||||
Leave Advanced configuration and Custom Locations empty. Serve the portfolio at the domain root. Hash routes, project links and both languages work without rewrite rules. Nginx Proxy Manager is designed to act as the gateway and manage SSL; see its [official guide](https://nginxproxymanager.com/guide/).
|
||||
|
||||
Use the portfolio guest's LAN address as the upstream, not `localhost`, the proxy box's IP or the Docker service name. Separate machines do not share the local Docker bridge network.
|
||||
|
||||
Point your domain DNS at the public address used by Nginx Proxy Manager. Your router's public ports 80/443 should reach the proxy box. Do not forward public port 8080 to the portfolio guest. At the Proxmox/network firewall, allow inbound TCP 8080 to the portfolio guest from the proxy box's LAN IP and deny other sources. Binding to a LAN IP alone does not impose this source restriction. These firewall/DNS settings must be applied in your infrastructure; this repository does not configure them.
|
||||
|
||||
From the proxy box, verify `curl -f http://192.168.1.50:8080/healthz` returns `ok` (substitute your IP). Then open the public HTTPS domain and test a project and language switch. If Nginx Proxy Manager returns 502, check the upstream IP, HTTP scheme, port, container status and firewall access from the proxy box.
|
||||
|
||||
## Updates
|
||||
|
||||
Edit the JSON source files locally, then sync the changed files to the guest, including removing deleted project files. With Git, commit/push locally and pull on the guest. Apply updates with:
|
||||
|
||||
```sh
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
Restarting alone does not import edited content; the files are baked into the image. Keep and back up the source checkout. Do not edit inside the container. To refresh base images, run `docker compose build --pull`, then `docker compose up -d`.
|
||||
|
||||
## Operations and exposure
|
||||
|
||||
```sh
|
||||
docker compose logs --tail=100 portfolio
|
||||
docker compose ps
|
||||
docker compose down
|
||||
```
|
||||
|
||||
The container runs as the Nginx user with a read-only filesystem, dropped Linux capabilities and temporary memory-backed storage. The server exposes only the public website assets and `/healthz`; there is no admin or editing endpoint. Everything in the built content remains public. The development server is not used for hosting.
|
||||
|
||||
The health check expects `/healthz` to return `ok`. The restart policy handles process exits; an unhealthy status alone does not restart the container. Compose settings follow the [Docker service reference](https://docs.docker.com/reference/compose-file/services/).
|
||||
|
||||
Local content tests, static build and Compose configuration validation passed. The container could not be built or run locally because the Docker engine was unavailable. Nothing has been deployed to Proxmox.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
@@ -0,0 +1,16 @@
|
||||
# Verification — 9 November 2026
|
||||
|
||||
- `node --check app.js` passed.
|
||||
- `npm test`: both content integrity checks passed.
|
||||
- `npm run build` passed; static output is in `dist/`.
|
||||
- Local HTTP server returned 200.
|
||||
- All 15 referenced project/artifact paths exist in the inspected school repository snapshot.
|
||||
- Browser verified Dutch/English switching and preservation of the selected project.
|
||||
- Evidence filter opened the software-testing process and displayed its three source links.
|
||||
- Project navigation and keyboard skip link worked; skip retained the current route and focused the main region.
|
||||
- All seven main routes were checked at 320px in both languages without document-width overflow.
|
||||
- Homepage and project page inspected visually at mobile widths; homepage also inspected at 1440px. The English hero overflow found during inspection was fixed.
|
||||
- No browser console errors were observed in the checked session.
|
||||
- Preview saved in `docs/preview.png`.
|
||||
|
||||
Limits: print/PDF layout has a dedicated stylesheet but was not rendered to a PDF in this pass. Docker deployment was not run. Linked DOCX contents were not reviewed. Source project tests were not executed. These checks validate the portfolio implementation, not the completeness or acceptance of exam evidence.
|
||||
Reference in new issue
Block a user