From f6872b2a9d113eea036af316899ef715b58bdfa5 Mon Sep 17 00:00:00 2001 From: Ilenia Date: Wed, 1 Jul 2026 13:33:56 +0200 Subject: [PATCH] docs: document qr generator and update nav badge --- src/components/navigation.ts | 2 +- src/content/docs/projects/qr-generator.md | 79 ++++++++++++++++++----- 2 files changed, 63 insertions(+), 18 deletions(-) diff --git a/src/components/navigation.ts b/src/components/navigation.ts index 0971d05..ed825ae 100644 --- a/src/components/navigation.ts +++ b/src/components/navigation.ts @@ -778,7 +778,7 @@ export const navigation = [ { label: "QR Generator", link: "/projects/qr-generator", - badge: { text: "unversioned", variant: "success" }, + badge: { text: "v1.0.0", variant: "tip" }, }, ].sort((a, b) => a.label.localeCompare(b.label)), }, diff --git a/src/content/docs/projects/qr-generator.md b/src/content/docs/projects/qr-generator.md index 3736dab..1449d0d 100644 --- a/src/content/docs/projects/qr-generator.md +++ b/src/content/docs/projects/qr-generator.md @@ -2,36 +2,81 @@ title: QR Generator --- -QR Generator (hereinafter the "Application") is +QR Generator (hereinafter the "Application") is a web tool for generating Naomi-branded QR code images from a URL. ## 1. User Documentation -:::note -This section is coming soon! -::: +The live instance is available at `https://qr.nhcarrigan.com`. -This section is for those interacting with a live instance of the Application. +To generate a QR image: + +1. Open the page. +2. Enter a URL in the form input. +3. Select Generate. +4. Download the generated PNG using the Download PNG button. + +Generated images include: + +1. Naomi colour branding. +2. Naomi avatar centered in the QR matrix. +3. A branding strip with `chat.naomi.lgbt`. + +If URL input is missing, generation fails with a validation error. ## 2. Technical Documentation -:::note -This section is coming soon! -::: +This project is a TypeScript Fastify service with both web UI and CLI generation paths. -This section is for those interested in running their own instance of the Application. +Local setup: + +1. Install dependencies with `pnpm install`. +2. Start the web server with `pnpm start`. +3. Build TypeScript with `pnpm build`. +4. Lint source files with `pnpm lint`. + +Default server binding: + +1. Host: `0.0.0.0` +2. Port: `15555` + +HTTP endpoints: + +1. `GET /` returns the web UI. +2. `GET /generate?url=` returns a PNG attachment. +3. Missing `url` query returns `HTTP 400`. +4. Generation failures return `HTTP 500`. + +CLI batch generation: + +1. Use `pnpm generate -- [ ...]`. +2. Output files are written to the `output` directory. +3. File names are URL-derived, lowercased, hyphenated, and limited to 60 characters. + +Core generation pipeline: + +1. Generate QR data using `qr-code-styling`. +2. Overlay Naomi avatar within a circular mask. +3. Composite final image with bottom branding strip. ## 3. Legal Documentation -:::note -This section is coming soon! -::: +Project-specific legal references: -This section is for expansions to our legal policies specific to the Application. +1. License: `https://docs.nhcarrigan.com/#/license` +2. Terms: `https://docs.nhcarrigan.com/#/terms` +3. Privacy: `https://docs.nhcarrigan.com/#/privacy` +4. Security: `https://docs.nhcarrigan.com/#/security` + +Copyright is held by Naomi Carrigan. ## 4. Contributing Documentation -:::note -This section is coming soon! -::: +Contributions are accepted via pull requests. -This section is for documentation related to contributing to the Application's codebase. \ No newline at end of file +Before contributing: + +1. Review the repository contributing guidelines. +2. Follow the Code of Conduct. +3. Run lint and build locally before opening a pull request. + +Issue reports and feedback are handled via `https://support.nhcarrigan.com`. \ No newline at end of file