chore: bootstrap del progetto Astro con strumenti di qualità
- Astro 7.4.0 in output statico, TypeScript strict, sitemap - ESLint (flat config, Astro + TS), Prettier, EditorConfig, .nvmrc - configurazioni di Playwright, Lighthouse CI e html-validate - script npm di §3.3 (segnaposto per gli script non ancora implementati) - README, DECISIONS, TODO-STUDIO e CHANGELOG iniziali - mockup e brief in docs/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zJ9ZWGKvoKoxYwbmnRKdJ
This commit is contained in:
32 files changed
+14184
-436
No files matched your search
@@ -0,0 +1,15 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
+24
-434
@@ -1,442 +1,32 @@
|
||||
# ---> VisualStudio
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
*.env
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
|
||||
[Dd]ebug/x64/
|
||||
[Dd]ebugPublic/x64/
|
||||
[Rr]elease/x64/
|
||||
[Rr]eleases/x64/
|
||||
bin/x64/
|
||||
obj/x64/
|
||||
|
||||
[Dd]ebug/x86/
|
||||
[Dd]ebugPublic/x86/
|
||||
[Rr]elease/x86/
|
||||
[Rr]eleases/x86/
|
||||
bin/x86/
|
||||
obj/x86/
|
||||
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
[Aa][Rr][Mm]64[Ee][Cc]/
|
||||
bld/
|
||||
[Oo]bj/
|
||||
[Oo]ut/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Build results on 'Bin' directories
|
||||
**/[Bb]in/*
|
||||
# Uncomment if you have tasks that rely on *.refresh files to move binaries
|
||||
# (https://github.com/github/gitignore/pull/3736)
|
||||
#!**/[Bb]in/*.refresh
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
*.trx
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Approval Tests result files
|
||||
*.received.*
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.idb
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
# but not Directory.Build.rsp, as it configures directory-level build defaults
|
||||
!Directory.Build.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
# Dipendenze
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
# Output di build e rilascio
|
||||
dist/
|
||||
release/
|
||||
.astro/
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
# Report dei test
|
||||
test-results/
|
||||
playwright-report/
|
||||
blob-report/
|
||||
.lighthouseci/
|
||||
.cache/
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
# Variabili d'ambiente locali
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
# Log
|
||||
npm-debug.log*
|
||||
*.log
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
**/.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
**/.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
**/.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
**/__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
#tools/**
|
||||
#!tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
MSBuild_Logs/
|
||||
|
||||
# AWS SAM Build and Temporary Artifacts folder
|
||||
.aws-sam
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
**/.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
**/.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
**/.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
# File di sistema / editor
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
desktop.ini
|
||||
.idea/
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# ---> VisualStudioCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
!*.code-workspace
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
*.swp
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "https://html-validate.org/schemas/config.json",
|
||||
"extends": ["html-validate:recommended"],
|
||||
"rules": {
|
||||
"doctype-html": "error",
|
||||
"element-required-attributes": "error",
|
||||
"heading-level": "error",
|
||||
"no-dup-id": "error",
|
||||
"wcag/h37": "error"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
node_modules/
|
||||
dist/
|
||||
release/
|
||||
.astro/
|
||||
test-results/
|
||||
playwright-report/
|
||||
blob-report/
|
||||
.lighthouseci/
|
||||
package-lock.json
|
||||
public/
|
||||
docs/mockups/
|
||||
docs/screenshots/
|
||||
docs/BRIEF.md
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"plugins": ["prettier-plugin-astro"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.astro",
|
||||
"options": { "parser": "astro" }
|
||||
},
|
||||
{
|
||||
"files": "*.md",
|
||||
"options": { "proseWrap": "preserve" }
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"astro-build.astro-vscode",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
Tutte le modifiche rilevanti a questo progetto sono documentate in questo file.
|
||||
|
||||
Il formato segue [Keep a Changelog](https://keepachangelog.com/it-IT/1.1.0/) e il progetto adotta il [Versionamento Semantico](https://semver.org/lang/it/).
|
||||
|
||||
## [Non rilasciato]
|
||||
|
||||
### Aggiunto
|
||||
|
||||
- Struttura iniziale del progetto Astro, strumenti di qualità del codice e script npm.
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
# Registro delle decisioni
|
||||
|
||||
Ogni scelta non banale presa durante lo sviluppo (brief §0.4). Formato: data · contesto · scelta · alternative scartate · motivazione.
|
||||
|
||||
---
|
||||
|
||||
## D-001 — Repository esistente su Forgejo e branch di lavoro
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** il brief (§14.0) prevede `git init`, ma il repository `BalboSoft/Studio_Grasso` esiste già su Forgejo con un commit iniziale (README di due righe e `.gitignore`).
|
||||
- **Scelta:** si lavora sul clone del repository esistente. Lo sviluppo avviene sul branch `feat/sito-v1` (un commit per fase, Conventional Commits in italiano); a fine fase 8 il branch viene unito in `main` con un merge commit (`--no-ff`), così `main` locale è pronto per il push.
|
||||
- **Alternative scartate:** `git init` di un nuovo repository (perderebbe la storia remota e richiederebbe un push forzato); commit diretti su `main` (meno leggibile la storia per fasi).
|
||||
- **Motivazione:** conserva la storia remota, nessun push forzato necessario, `main` resta pulito fino al merge finale.
|
||||
|
||||
## D-002 — Sostituzione del `.gitignore` iniziale
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** il `.gitignore` del commit iniziale è il modello «VisualStudio» (C#/.NET), non pertinente a un progetto Node/Astro.
|
||||
- **Scelta:** sostituito con un `.gitignore` specifico (`node_modules`, `dist`, `release`, `.astro`, `test-results`, `playwright-report`, `.lighthouseci`, file di sistema).
|
||||
- **Alternative scartate:** aggiungere le voci in coda al modello esistente (centinaia di regole inutili, alcune potenzialmente fuorvianti).
|
||||
- **Motivazione:** semplicità e chiarezza (§0.3, punto 4).
|
||||
|
||||
## D-003 — Versione di Node.js
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** il brief chiede «Node.js LTS corrente (≥ 22)». A ottobre 2026 la LTS attiva è Node 24 (Krypton); Node 22 è in manutenzione. `eslint-plugin-astro` 3.x richiede Node `^22.22.3 || ^24.16.0 || >=26.3.0`, Astro 7 richiede `>=22.22.0`.
|
||||
- **Scelta:** `.nvmrc` = `24`; `engines.node` = `>=22.22.3`. Sviluppo e test eseguiti con Node 24.22.0.
|
||||
- **Alternative scartate:** Node 22 come riferimento (LTS in manutenzione); `engines` `>=24` (escluderebbe inutilmente Node 22 aggiornato).
|
||||
- **Motivazione:** LTS attiva per lo sviluppo, compatibilità dichiarata con il minimo realmente supportato dalle dipendenze.
|
||||
|
||||
## D-004 — Astro 7.4.0
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** il brief chiede l'ultima versione stabile di Astro, verificata con `npm view astro version`.
|
||||
- **Scelta:** `astro@7.4.0` (risultato di `npm view astro version` il 2026-10-15), con `@astrojs/sitemap@3.7.4`.
|
||||
- **Alternative scartate:** nessuna (requisito esplicito).
|
||||
- **Motivazione:** requisito del brief §3.1.
|
||||
|
||||
## D-005 — TypeScript 6.0.3 invece di 7.0.2
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** l'ultima TypeScript è la 7.0.2, ma `@astrojs/check@0.9.10` dichiara `typescript ^5 || ^6` e `typescript-eslint@8.71.2` richiede `typescript <6.1.0`.
|
||||
- **Scelta:** `typescript@6.0.3` (ultima 6.x), modalità `strict` tramite `astro/tsconfigs/strict`.
|
||||
- **Alternative scartate:** TypeScript 7 (fuori dai peer delle dipendenze, rischio di `astro check` non funzionante).
|
||||
- **Motivazione:** compatibilità garantita dalle dipendenze ufficiali.
|
||||
|
||||
## D-006 — Playwright 1.56.1 (versione bloccata)
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** il brief usa come riferimento l'immagine CI `mcr.microsoft.com/playwright:v1.56.0-noble` e chiede che coincida con la versione di `@playwright/test`. L'ambiente di sviluppo dispone di Chromium revision 1194, quella usata da Playwright 1.56.x; le versioni successive (1.57+) richiedono un Chromium diverso.
|
||||
- **Scelta:** `@playwright/test@1.56.1` e `playwright@1.56.1` (ultima patch della 1.56); immagine CI `mcr.microsoft.com/playwright:v1.56.1-noble`.
|
||||
- **Alternative scartate:** Playwright 1.64.1 (richiederebbe lo scaricamento di un nuovo browser e un'immagine diversa da quella indicata nel brief).
|
||||
- **Motivazione:** test riproducibili in locale e in CI con lo stesso browser; aggiornare Playwright significa aggiornare insieme `package.json` e l'immagine dei workflow (documentato nel README).
|
||||
|
||||
## D-007 — Versioni esatte delle dipendenze
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** riproducibilità della build e del pacchetto di rilascio.
|
||||
- **Scelta:** tutte le dipendenze sono dichiarate con versione esatta (senza `^`) e `package-lock.json` è committato; la CI usa `npm ci`.
|
||||
- **Alternative scartate:** intervalli semver (`^x.y.z`).
|
||||
- **Motivazione:** build identiche nel tempo; gli aggiornamenti diventano commit espliciti.
|
||||
|
||||
## D-008 — Avvisi di `npm audit` sulle dipendenze di sviluppo
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** `npm audit` segnala 17 vulnerabilità, tutte in dipendenze transitive di strumenti di sviluppo (soprattutto `@lhci/cli`: `tmp`, `uuid`, `basic-ftp`, `extract-zip`). `npm audit --omit=dev` = 0 vulnerabilità.
|
||||
- **Scelta:** nessuna azione; nessuno di questi pacchetti finisce nel sito pubblicato (che contiene solo file statici).
|
||||
- **Alternative scartate:** `npm audit fix --force` (introdurrebbe versioni incompatibili e romperebbe Lighthouse CI).
|
||||
- **Motivazione:** rischio nullo per il sito pubblicato; gli strumenti girano solo in locale/CI su input fidato.
|
||||
|
||||
## D-009 — Nessun `eslint-plugin-jsx-a11y`
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** le regole a11y di `eslint-plugin-astro` richiedono `eslint-plugin-jsx-a11y`, che non supporta ESLint 10.
|
||||
- **Scelta:** si usa la configurazione `recommended` di `eslint-plugin-astro`; l'accessibilità è verificata da axe-core (tutte le pagine, due viewport), html-validate (regole WCAG) e Lighthouse (punteggio 1.0).
|
||||
- **Alternative scartate:** declassare ESLint alla 9 solo per questo plugin.
|
||||
- **Motivazione:** copertura a11y più forte a runtime che in lint statico; toolchain aggiornata.
|
||||
|
||||
## D-010 — Icone Lucide senza `astro-icon`
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** il brief consente `@iconify-json/lucide` + `astro-icon` oppure file SVG in `src/icons/`.
|
||||
- **Scelta:** componente `Icon.astro` che legge i tracciati da `@iconify-json/lucide` (JSON) a build time e genera SVG inline con `aria-hidden="true"`. Nessuna integrazione aggiuntiva.
|
||||
- **Alternative scartate:** `astro-icon` (porta con sé `@iconify/tools` e decine di dipendenze transitive, compatibilità con Astro 7 non dichiarata); copiare a mano i file SVG (manutenzione più scomoda).
|
||||
- **Motivazione:** zero runtime, meno dipendenze, stesso set di icone (Lucide, licenza ISC).
|
||||
|
||||
## D-011 — Script segnaposto in fase 0
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** il brief chiede di definire in fase 0 tutti gli script npm di §3.3 «anche se vuoti».
|
||||
- **Scelta:** gli script in `scripts/` sono creati come segnaposto e implementati nelle fasi 1 (icone), 6 (test) e 7 (packaging e release).
|
||||
- **Alternative scartate:** nessuna.
|
||||
- **Motivazione:** requisito del brief §14.0.
|
||||
|
||||
## D-012 — Mockup e brief in `docs/`
|
||||
|
||||
- **Data:** 2026-10-15
|
||||
- **Contesto:** i mockup sono stati forniti in formato WebP (non PNG come indicato nell'Appendice A).
|
||||
- **Scelta:** copiati in `docs/mockups/` con i nomi dell'Appendice A ed estensione `.webp`; il brief completo è conservato in `docs/BRIEF.md` come riferimento dei requisiti.
|
||||
- **Alternative scartate:** convertirli in PNG (file più pesanti senza benefici).
|
||||
- **Motivazione:** il riferimento visivo resta nel repository insieme ai requisiti.
|
||||
@@ -1,3 +1,21 @@
|
||||
# Studio_Grasso
|
||||
# Sito web dello Studio Grasso
|
||||
|
||||
Sito internet per Studio Grasso
|
||||
Sito statico dello **Studio Grasso — Studio Tributario e Societario** (Montegrosso d'Asti e Asti), realizzato con [Astro](https://astro.build/).
|
||||
|
||||
> Documento in costruzione: la versione completa (comandi, pubblicazione su Forgejo, rilasci) viene scritta nella fase 8.
|
||||
|
||||
## Requisiti
|
||||
|
||||
- Node.js LTS (vedi `.nvmrc`, minimo `22.22.3`) e npm.
|
||||
|
||||
## Comandi principali
|
||||
|
||||
```bash
|
||||
npm ci # installa le dipendenze esatte di package-lock.json
|
||||
npm run dev # server di sviluppo su http://localhost:4321
|
||||
npm run build # genera il sito statico in dist/
|
||||
npm run verify # tutti i controlli di qualità (eseguito anche dalla CI)
|
||||
npm run package # crea i pacchetti di rilascio in release/
|
||||
```
|
||||
|
||||
Requisiti di progetto: `docs/BRIEF.md`. Decisioni tecniche: `DECISIONS.md`. Dati da fornire: `TODO-STUDIO.md`.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Dati e azioni richiesti allo Studio
|
||||
|
||||
Elenco di ciò che non è stato possibile ricavare dal sito attuale e che lo Studio deve fornire o confermare (brief §0.5). Il sito costruito non contiene segnaposto: dove un dato manca, la pagina ne fa a meno.
|
||||
|
||||
## Bloccante prima della pubblicazione
|
||||
|
||||
1. **Titolare della P.IVA 01597790052.** Indicare la denominazione esatta del titolare del sito (persona fisica o società, ad es. «Studio Tributario Grasso S.r.l.» come lascia supporre la PEC `studiotributariograssosrl@pec.it`).
|
||||
2. **Dominio definitivo del nuovo sito.** Default: `https://www.grassoezio.it`.
|
||||
|
||||
## Consigliato
|
||||
|
||||
1. **Far validare** privacy policy, cookie policy e note legali da un consulente.
|
||||
@@ -0,0 +1,34 @@
|
||||
// @ts-check
|
||||
import sitemap from '@astrojs/sitemap';
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
/**
|
||||
* URL pubblico del sito. Si imposta con la variabile d'ambiente SITE_URL
|
||||
* (es. `SITE_URL=https://www.esempio.it npm run build`). Default: dominio attuale.
|
||||
*/
|
||||
const site = (process.env.SITE_URL || 'https://www.grassoezio.it').replace(/\/+$/, '');
|
||||
|
||||
export default defineConfig({
|
||||
site,
|
||||
output: 'static',
|
||||
trailingSlash: 'always',
|
||||
compressHTML: true,
|
||||
build: {
|
||||
format: 'directory',
|
||||
// Il CSS piccolo viene incluso nella pagina (consentito dalla CSP: style-src 'unsafe-inline').
|
||||
inlineStylesheets: 'auto',
|
||||
},
|
||||
devToolbar: { enabled: false },
|
||||
integrations: [
|
||||
sitemap({
|
||||
// La pagina di conferma del modulo è `noindex`: non va in sitemap.
|
||||
filter: (page) => !page.includes('/contatti/grazie/'),
|
||||
}),
|
||||
],
|
||||
vite: {
|
||||
build: {
|
||||
// Nessuno script inline: la CSP consente solo `script-src 'self'`.
|
||||
assetsInlineLimit: 0,
|
||||
},
|
||||
},
|
||||
});
|
||||
+2433
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 168 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
@@ -0,0 +1,41 @@
|
||||
// Configurazione ESLint (flat config) — JavaScript, TypeScript e componenti Astro.
|
||||
import js from '@eslint/js';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
import astro from 'eslint-plugin-astro';
|
||||
import globals from 'globals';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
export default defineConfig(
|
||||
{
|
||||
ignores: [
|
||||
'dist/',
|
||||
'release/',
|
||||
'.astro/',
|
||||
'node_modules/',
|
||||
'playwright-report/',
|
||||
'test-results/',
|
||||
'blob-report/',
|
||||
'.lighthouseci/',
|
||||
],
|
||||
},
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
...astro.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: { ...globals.browser, ...globals.node },
|
||||
},
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.cjs'],
|
||||
languageOptions: { sourceType: 'commonjs' },
|
||||
rules: { '@typescript-eslint/no-require-imports': 'off' },
|
||||
},
|
||||
);
|
||||
@@ -0,0 +1,37 @@
|
||||
// Lighthouse CI — budget di §9.3 del brief (preset mobile di Lighthouse, 3 run, mediana).
|
||||
// Chrome: si usa il Chromium installato da Playwright, così funziona anche nel container CI.
|
||||
const { chromium } = require('playwright');
|
||||
|
||||
module.exports = {
|
||||
ci: {
|
||||
collect: {
|
||||
staticDistDir: './dist',
|
||||
url: [
|
||||
'http://localhost/',
|
||||
'http://localhost/servizi/',
|
||||
'http://localhost/servizi/consulenza-fiscale-tributaria-e-societaria/',
|
||||
'http://localhost/contatti/',
|
||||
],
|
||||
numberOfRuns: 3,
|
||||
chromePath: chromium.executablePath(),
|
||||
settings: {
|
||||
chromeFlags: '--no-sandbox --headless=new --disable-dev-shm-usage --disable-gpu',
|
||||
},
|
||||
},
|
||||
assert: {
|
||||
preset: 'lighthouse:recommended',
|
||||
aggregationMethod: 'median-run',
|
||||
assertions: {
|
||||
'categories:performance': ['error', { minScore: 0.95 }],
|
||||
'categories:accessibility': ['error', { minScore: 1 }],
|
||||
'categories:best-practices': ['error', { minScore: 0.95 }],
|
||||
'categories:seo': ['error', { minScore: 1 }],
|
||||
},
|
||||
},
|
||||
upload: {
|
||||
// Nessun invio a servizi esterni: i report restano in locale.
|
||||
target: 'filesystem',
|
||||
outputDir: '.lighthouseci/reports',
|
||||
},
|
||||
},
|
||||
};
|
||||
Generated
+11262
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "sito-studio-grasso",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "Sito web statico dello Studio Grasso — Studio Tributario e Societario (Montegrosso d'Asti e Asti)",
|
||||
"license": "UNLICENSED",
|
||||
"engines": {
|
||||
"node": ">=22.22.3"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview --host 127.0.0.1 --port 4321",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"check": "astro check",
|
||||
"test:html": "html-validate \"dist/**/*.html\"",
|
||||
"test:links": "node scripts/check-links.mjs",
|
||||
"test:e2e": "playwright test --project=e2e",
|
||||
"test:a11y": "playwright test --project=a11y",
|
||||
"test:lighthouse": "lhci autorun --config=lighthouserc.cjs",
|
||||
"test:compliance": "node scripts/check-compliance.mjs",
|
||||
"test:package": "node scripts/check-package.mjs",
|
||||
"test": "npm run test:html && npm run test:links && npm run test:e2e && npm run test:a11y && npm run test:compliance",
|
||||
"verify": "npm run lint && npm run format:check && npm run check && npm run build && npm test && npm run test:lighthouse",
|
||||
"package": "npm run build && node scripts/package.mjs && npm run test:package",
|
||||
"icons": "node scripts/generate-icons.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/sitemap": "3.7.4",
|
||||
"@fontsource-variable/fraunces": "5.3.0",
|
||||
"@fontsource-variable/inter": "5.3.0",
|
||||
"astro": "7.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "0.9.10",
|
||||
"@axe-core/playwright": "4.14.0",
|
||||
"@eslint/js": "10.0.1",
|
||||
"@iconify-json/lucide": "1.2.144",
|
||||
"@lhci/cli": "0.15.1",
|
||||
"@playwright/test": "1.56.1",
|
||||
"archiver": "8.0.0",
|
||||
"astro-eslint-parser": "3.2.0",
|
||||
"eslint": "10.12.0",
|
||||
"eslint-plugin-astro": "3.2.1",
|
||||
"globals": "17.13.0",
|
||||
"html-validate": "11.16.2",
|
||||
"linkinator": "8.1.0",
|
||||
"playwright": "1.56.1",
|
||||
"prettier": "3.9.10",
|
||||
"prettier-plugin-astro": "1.1.1",
|
||||
"sharp": "0.35.5",
|
||||
"typescript": "6.0.3",
|
||||
"typescript-eslint": "8.71.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
/**
|
||||
* Test end-to-end e di accessibilità sul sito compilato (`dist/`), servito da `astro preview`.
|
||||
* Esegui prima `npm run build`: l'elenco delle pagine viene letto dalla sitemap generata.
|
||||
*/
|
||||
const PORT = Number(process.env.PREVIEW_PORT ?? 4321);
|
||||
const HOST = '127.0.0.1';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: 'tests',
|
||||
fullyParallel: true,
|
||||
forbidOnly: Boolean(process.env.CI),
|
||||
retries: 0,
|
||||
workers: process.env.CI ? 2 : undefined,
|
||||
timeout: 30_000,
|
||||
reporter: [['list'], ['html', { outputFolder: 'playwright-report', open: 'never' }]],
|
||||
use: {
|
||||
baseURL: `http://${HOST}:${PORT}`,
|
||||
locale: 'it-IT',
|
||||
trace: 'retain-on-failure',
|
||||
screenshot: 'only-on-failure',
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'e2e',
|
||||
testDir: 'tests/e2e',
|
||||
use: { ...devices['Desktop Chrome'], viewport: { width: 1440, height: 900 } },
|
||||
},
|
||||
{
|
||||
name: 'a11y',
|
||||
testDir: 'tests/a11y',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
},
|
||||
],
|
||||
webServer: {
|
||||
command: `npx astro preview --host ${HOST} --port ${PORT}`,
|
||||
url: `http://${HOST}:${PORT}/`,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 60_000,
|
||||
stdout: 'ignore',
|
||||
stderr: 'pipe',
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
// Segnaposto della fase 0: l'implementazione completa arriva nelle fasi successive (vedi DECISIONS.md).
|
||||
console.log('scripts/changelog-notes.mjs: non ancora implementato (fase 0).');
|
||||
@@ -0,0 +1,2 @@
|
||||
// Segnaposto della fase 0: l'implementazione completa arriva nelle fasi successive (vedi DECISIONS.md).
|
||||
console.log('scripts/check-compliance.mjs: non ancora implementato (fase 0).');
|
||||
@@ -0,0 +1,2 @@
|
||||
// Segnaposto della fase 0: l'implementazione completa arriva nelle fasi successive (vedi DECISIONS.md).
|
||||
console.log('scripts/check-links.mjs: non ancora implementato (fase 0).');
|
||||
@@ -0,0 +1,2 @@
|
||||
// Segnaposto della fase 0: l'implementazione completa arriva nelle fasi successive (vedi DECISIONS.md).
|
||||
console.log('scripts/check-package.mjs: non ancora implementato (fase 0).');
|
||||
@@ -0,0 +1,2 @@
|
||||
// Segnaposto della fase 0: l'implementazione completa arriva nelle fasi successive (vedi DECISIONS.md).
|
||||
console.log('scripts/generate-icons.mjs: non ancora implementato (fase 0).');
|
||||
@@ -0,0 +1,2 @@
|
||||
// Segnaposto della fase 0: l'implementazione completa arriva nelle fasi successive (vedi DECISIONS.md).
|
||||
console.log('scripts/package.mjs: non ancora implementato (fase 0).');
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
# Segnaposto della fase 0: l'implementazione completa arriva nella fase 7.
|
||||
echo "scripts/release-upload.sh: non ancora implementato (fase 0)."
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
// Pagina provvisoria della fase 0: viene sostituita dalla home completa nella fase 3.
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="it">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Studio Grasso — Studio Tributario e Societario</title>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>Studio Grasso</h1>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [".astro/types.d.ts", "**/*"],
|
||||
"exclude": [
|
||||
"dist",
|
||||
"release",
|
||||
"node_modules",
|
||||
"playwright-report",
|
||||
"test-results",
|
||||
".lighthouseci"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user