diff --git a/CLAUDE.md b/CLAUDE.md index cbf7e40..19d7ab7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -3,7 +3,8 @@ ## Project purpose This repository contains the source code for the **Officina Zuliani website**. Primary goal: a public website presenting Officina Zuliani (services, contacts, location). -Secondary goals: TBD (e.g. performance, SEO, easy content updates). +Secondary goals: top local SEO and AI-answer visibility (GEO/AEO), fast pages on mobile. +Visual direction: proposal 02 "Bottega" (`docs/adr/0002-direzione-visiva-bottega.md`). ## Working model This repository uses a repo-first agent workflow. @@ -37,13 +38,13 @@ Before considering work complete: - Write a concise handoff ## Commands -Stack not chosen yet. Fill these in once it is (see `docs/runbooks/`): -- Install: TBD -- Dev: TBD -- Test: TBD -- Lint: TBD -- Build: TBD -- Typecheck: TBD +Stack: Astro (static) — see `docs/adr/0003-stack-astro-statico.md`. Node.js required. +- Install: `npm install` +- Dev: `npm run dev` (http://localhost:4321) +- Build: `npm run build` (output in `dist/`) +- Preview build: `npm run preview` +- Test / Lint / Typecheck: not set up yet (`npm run check` needs `@astrojs/check`) +- Design proposals: `python3 -m http.server 4173 --directory design` ## Gitea - Instance: https://git.a75.it — repo `andrearuffini/officinazuliani` diff --git a/README.md b/README.md index 0e3b0ae..f131fa0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Website for Officina Zuliani. ## Getting started -Stack and commands are not defined yet — see `docs/runbooks/local-dev.md`. +Astro static site: `npm install` then `npm run dev` (http://localhost:4321). Details in `docs/runbooks/local-dev.md`. ## How work is organized - Tasks: Gitea Issues at https://git.a75.it/andrearuffini/officinazuliani/issues diff --git a/docs/adr/0002-direzione-visiva-bottega.md b/docs/adr/0002-direzione-visiva-bottega.md new file mode 100644 index 0000000..df80ebd --- /dev/null +++ b/docs/adr/0002-direzione-visiva-bottega.md @@ -0,0 +1,23 @@ +# ADR 0002: Visual direction — proposal 02 "Bottega di Viale Venezia" + +## Status +Accepted (2026-10-26) + +## Context +Twelve homepage proposals were produced in `design/proposte/` (see `docs/analisi/2026-10-19-stato-di-fatto.md` and `docs/progetto/piano-sviluppo.md`). +The client narrowed the choice to 02 (Bottega) and 04 (Schema tecnico), then compared two variants: 11 (04 on a light background) and 12 (02 with the typography of 04). + +## Decision +The new site follows proposal **02 — Bottega di Viale Venezia** (`design/proposte/02-bottega.html`) as the reference for look and feel: + +- **Palette:** concrete light grey `#EEF0EE`, paper `#FAFBFA`, overall blue `#1F3A5F` / `#2C5282`, ink `#1A1F24`, grey `#5B6670`, signal yellow `#F2C230`, rule `#D5DAD8` +- **Typography:** Bricolage Grotesque (display, headings, UI) + Source Serif 4 (body text) +- **Layout:** light, editorial; asymmetrical hero; large photo slots; services as a list (not cards); FAQ as definition list; contact block in solid blue +- **Signature element:** enamel-style sign with live "open now / closed" status and weekly hours bars, computed from the opening hours +- **Motion:** low — soft reveal on scroll only, disabled with `prefers-reduced-motion` + +## Consequences +- The other proposals stay in `design/proposte/` as reference only; they are not maintained +- Real photography of the workshop, team and work is required: the design relies on large photos +- Copy already rewritten for SEO/GEO/AEO in 02 is the starting point for the content phase +- Logo is still missing: the text wordmark in 02 is provisional diff --git a/docs/adr/0003-stack-astro-statico.md b/docs/adr/0003-stack-astro-statico.md new file mode 100644 index 0000000..4922b36 --- /dev/null +++ b/docs/adr/0003-stack-astro-statico.md @@ -0,0 +1,23 @@ +# ADR 0003: Build the site with Astro as a static site + +## Status +Accepted (2026-10-26) + +## Context +The new site is a small, content-driven brochure site (≈10–15 pages) whose main goal is local SEO and visibility in AI answers (GEO/AEO). It needs full control over HTML, meta tags and structured data, very fast pages on mobile, and shared layout/components (header, footer, hours, schema) without repeating them by hand. There is no need for user accounts or server-side logic. + +Options considered: Astro (static), plain hand-written HTML/CSS, WordPress. + +## Decision +Use **Astro** in static output mode (`output: "static"`): +- Pages in `src/pages/`, shared pieces in `src/layouts/` and `src/components/` +- Business data (name, address, phone, hours, services) kept in one place (`src/data/`) and reused by pages and JSON-LD +- No client-side framework; small inline scripts only where needed (e.g. "open now" status) +- Fonts and images self-hosted for performance once the design is final + +Hosting is **not decided yet**: the build output (`dist/`) is plain static files and can be served by nginx, Netlify, Vercel or similar. A separate ADR will record the choice before launch. + +## Consequences +- Developers need Node.js (see `docs/runbooks/local-dev.md`) +- Content changes go through the repository (no admin panel); if the client later needs self-editing, a headless CMS can be added on top +- Plain HTML output keeps SEO and performance under our control and makes hosting interchangeable diff --git a/docs/context/known-constraints.md b/docs/context/known-constraints.md index 0b226e4..22a1dfe 100644 --- a/docs/context/known-constraints.md +++ b/docs/context/known-constraints.md @@ -2,4 +2,5 @@ - The Gitea repository (`andrearuffini/officinazuliani` on git.a75.it) is public: no secrets in commits; `.env` stays git-ignored. - Gitea Issues are the task board; no external tracker. -- Stack, hosting and deploy target: not decided yet (record the decision as an ADR). +- Stack: Astro static (`docs/adr/0003-stack-astro-statico.md`). Hosting and deploy target: not decided yet (record as an ADR). +- Visual direction: proposal 02 "Bottega" (`docs/adr/0002-direzione-visiva-bottega.md`). diff --git a/docs/context/module-map.md b/docs/context/module-map.md index f9ff96d..aee0769 100644 --- a/docs/context/module-map.md +++ b/docs/context/module-map.md @@ -1,11 +1,17 @@ # Module map -No application code yet. Update this file when the stack and structure are introduced. - ## Top-level areas -- `docs/` → context, ADRs, runbooks, handoffs -- `coordination/` → workflow, labels, issue lifecycle -- `.gitea/` → issue and PR templates +- `src/pages/` → site pages: `index`, `officina`, `servizi`, `dove-siamo`, `contatti`, plus `sitemap.xml` +- `src/layouts/Base.astro` → HTML shell, meta/OG, canonical, AutoRepair JSON-LD, header/footer, reveal script +- `src/components/` → `Insegna` (open-now sign + weekly hours), `ServiziLista`, `Marchi`, `Faq` (+ FAQPage JSON-LD), `BloccoContatti` +- `src/data/officina.ts` → single source of business data (NAP, hours, services, FAQ) +- `src/styles/global.css` → design tokens and shared styles (ADR 0002) +- `public/` → favicon, robots.txt, partner logos +- `design/proposte/` → static design proposals (reference; 02 is the chosen direction) +- `design/assets/sito-attuale/` → images downloaded from the current site +- `docs/analisi/`, `docs/progetto/` → audit and development plan +- `docs/` (adr, context, runbooks, handoffs), `coordination/`, `.gitea/` → workflow +- `.claude/launch.json` → preview configs: `sito` (Astro dev, 4321), `proposte` (4173) ## Important flows -- TBD +- Opening hours: defined once in `src/data/officina.ts` → rendered as bars (Insegna), table (dove-siamo), JSON-LD (Base) diff --git a/docs/runbooks/deploy.md b/docs/runbooks/deploy.md index 9c73022..3fe93c7 100644 --- a/docs/runbooks/deploy.md +++ b/docs/runbooks/deploy.md @@ -1,6 +1,7 @@ # Deploy -TBD. Hosting target not decided yet — record the choice as an ADR, then document: -- Build command and output directory -- Deploy procedure -- Rollback procedure +Hosting not decided yet (see `docs/adr/0003-stack-astro-statico.md`). Record the choice as a new ADR, then document here: +- Build: `npm run build` → upload `dist/` +- Server rule: serve `/` from `/.html` (e.g. nginx `try_files $uri $uri.html $uri/ =404;`) +- Keep the current URLs (`/officina`, `/servizi`, `/dove-siamo`, `/contatti`) so no redirects are needed +- Rollback procedure: TBD diff --git a/docs/runbooks/local-dev.md b/docs/runbooks/local-dev.md index dc51f11..4e7ee71 100644 --- a/docs/runbooks/local-dev.md +++ b/docs/runbooks/local-dev.md @@ -1,11 +1,31 @@ # Local development -Stack not chosen yet. Once it is, document here: -- Prerequisites (runtime versions, tools) -- Install command -- Dev server command and URL -- Required environment variables (names only, never values) +## Prerequisites +- Node.js (tested with v24) and npm + +## Run the site +``` +npm install +npm run dev # http://localhost:4321 +``` + +## Build +``` +npm run build # static output in dist/ +npm run preview # serve dist/ locally +``` +Pages are emitted as `dist/.html` (`build.format: 'file'`); canonical URLs have no `.html`, matching the current site (`/officina`, `/servizi`, …). The web server must map `/officina` → `officina.html`. + +## Where things are +- Business data (address, phone, hours, services, FAQ): `src/data/officina.ts` — change it here, pages and JSON-LD follow +- Layout, meta tags, AutoRepair JSON-LD: `src/layouts/Base.astro` +- Global styles / design tokens: `src/styles/global.css` +- Sections: `src/components/` · Pages: `src/pages/` + +## Design proposals (reference only) +``` +python3 -m http.server 4173 --directory design # http://localhost:4173/proposte/ +``` ## Environment -`.env` (git-ignored) currently holds the Gitea API configuration: -`GITEA_API_URL`, `GITEA_TOKEN`, `GITEA_OWNER`, `GITEA_REPO`. +`.env` (git-ignored) holds the Gitea API configuration only: `GITEA_API_URL`, `GITEA_TOKEN`, `GITEA_OWNER`, `GITEA_REPO`. The site itself needs no environment variables. diff --git a/docs/runbooks/testing.md b/docs/runbooks/testing.md index 2865d36..6e9039e 100644 --- a/docs/runbooks/testing.md +++ b/docs/runbooks/testing.md @@ -1,6 +1,8 @@ # Testing -TBD once the stack is chosen. Document: -- Unit/integration test command -- Lint / format / typecheck commands -- Manual verification checklist (pages render, links work, mobile layout) +No automated tests yet. Before considering a change done: +- `npm run build` must complete without errors +- Manual check at 1280px and 375px: no horizontal scroll, one H1 per page, nav links work +- "Open now" sign: status and next opening are computed in Europe/Rome time +- Validate structured data (AutoRepair, FAQPage) with Google's Rich Results Test before launch +- Run Lighthouse / PageSpeed on the built site (baseline still missing, see docs/analisi)