feat: read opening hours from Google Business Profile

Places API script normalizes regular and special hours; build uses a
snapshot, an orari sidecar refreshes /dati/orari.json every 6 hours for
the open-now sign. Adds the company legal name. Key stays in .env.server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 16:13:35 +01:00
co-authored by Claude Opus 5.5
parent 29d8700081
commit a651519dbe
15 changed files with 378 additions and 46 deletions
+4 -2
View File
@@ -4,7 +4,9 @@
- `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`, `StripFoto` (3-photo strip)
- `src/data/officina.ts` → single source of business data (NAP, hours, services, FAQ)
- `src/data/officina.ts` → single source of business data (NAP, legal name, services, FAQ)
- `src/data/orari.ts` → opening hours: Google snapshot `orari-google.json` or fallback (ADR 0005)
- `scripts/orari-google.mjs` → reads hours from Places API (deploy + `orari` container on the server)
- `src/styles/global.css` → design tokens and shared styles (ADR 0002)
- `public/` → favicon, robots.txt, partner logos
- `src/assets/home/`, `src/assets/officina/` → page photos (demonstrative, AI-generated; optimized by astro:assets via `StripFoto`)
@@ -16,4 +18,4 @@
- `.claude/launch.json` → preview configs: `sito` (Astro dev, 4321), `proposte` (4173)
## Important flows
- Opening hours: defined once in `src/data/officina.ts` → rendered as bars (Insegna), table (dove-siamo), JSON-LD (Base)
- Opening hours: Google Business Profile → Places API → `orari-google.json` (build: text, table, JSON-LD) and `/dati/orari.json` (runtime: Insegna "open now", special closures)