Files
mifi-links/AGENTS.md
2026-02-06 16:17:18 -03:00

43 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Agent guidance for mifi.dev landing
## Purpose
This repo is a **one-page static** Linktree-style site for mifi.dev. It is **not** a SPA: output is pure HTML/CSS/JS with no client-side framework runtime. Minimal JS (theme toggle, copy-link, a11y, copyright year) is allowed.
## Stack (locked)
- **SvelteKit** with `@sveltejs/adapter-static` (static prerender only)
- **TypeScript** (always)
- **pnpm** (only); do not use npm or yarn
- **PostCSS** for CSS (nesting + preset-env)
- **Critical CSS** via post-build script (`scripts/critical-css.mjs`); full build with critical CSS is `pnpm run build:full` (requires Chromium)
- **Content:** JSON in `src/lib/data/` (e.g. `links.json`), loaded in `+page.server.ts` at build time
- **CSP:** Set by Traefik middleware; do not add CSP in app code
## Conventions
- Use **semantic HTML** and **JSON-LD** for SEO; target **WCAG 2.2 AAA** for accessibility.
- **No unsafe-inline** scripts; all JS via `<script src="...">`.
- **Dev container** uses the same Linux + Playwright Chromium as CI so e2e/visual-regression snapshots are comparable.
- **Docker:** Single image with both variants; **nginx** does host-based routing (mifi.dev / www.mifi.dev → `/html/dev`, mifi.bio / www.mifi.bio → `/html/bio`). Traefik labels for both hosts; network `marina-net`. Dockerfile builds both with `CONTENT_VARIANT=dev` and `CONTENT_VARIANT=bio`.
- **CI:** Woodpecker; pipeline runs lint, unit tests, e2e/visual regression, build (pnpm).
## Key paths
- `src/routes/` pages and layout
- `src/lib/data/` JSON content
- `src/app.html` HTML shell
- `scripts/critical-css.mjs` post-build critical CSS
- `.devcontainer/` dev container (Node, pnpm, Playwright Linux)
- `Dockerfile` multi-stage build (both dev + bio variants), then nginx with host-based routing
- `nginx/default.conf` nginx server blocks for mifi.dev and mifi.bio
- `docker-compose.yml` one service, registry image, Traefik labels for both hosts
## Commands
- Install: `pnpm install`
- Dev: `pnpm dev`
- Build: `pnpm build` (or `pnpm build:full` for critical CSS)
- Lint: `pnpm lint`
- Test: `pnpm test:run`, `pnpm test:e2e`