From f82a299877509e61db3ff8927788745560a1f61b Mon Sep 17 00:00:00 2001 From: gilles Date: Sun, 13 Sep 2026 18:35:22 +0200 Subject: [PATCH] docs: rewrite README with architecture, Docker and GDPR info --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3f111a5..36d1cec 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,32 @@ -# new +# Notes — Application web SPA PWA -Application web SPA PWA (React + TypeScript + Tailwind CSS + Vite). +Application de prise de notes personnelle, installable et utilisable hors connexion. +Les données restent dans le **localStorage** du navigateur : aucune donnée n'est partagée ni transmise à un serveur externe. + +## Fonctionnalités + +- Créer, lire, modifier et supprimer des notes +- Stockage local (localStorage) — données 100 % privées +- Modale RGPD accessible depuis le bouton **?** dans le header +- Modale de confirmation avant suppression +- PWA installable avec service worker (hors connexion) +- Design responsive mobile-first (Tailwind CSS) +- Protection des routes inconnues (page d'erreur 404) + +## Stack technique + +| Technologie | Rôle | +| --- | --- | +| React 19 + TypeScript | UI | +| Vite 8 | Build tool | +| Tailwind CSS 4 | Style | +| Vitest | Tests unitaires | +| vite-plugin-pwa | Service worker + manifest | +| nginx | Serveur de production (Docker) | ## Prérequis -- Node.js >= 20.19.0 (ou >= 22.12.0) +- Node.js >= 20.19.0 - pnpm >= 9 ## Installation @@ -28,10 +50,36 @@ pnpm install | `pnpm typecheck` | Vérification TypeScript | | `pnpm check` | Chaîne qualité : lint → format → typecheck → tests → coverage | -## Environnement +## Docker -Copiez `.env.example` vers `.env` pour définir les variables (préfixe `VITE_`). +```bash +docker build -t notes . +docker run -p 8080:80 notes +``` + +L'app sera accessible sur http://localhost:8080. + +## Architecture + +``` +src/ +├── components/ # Composants React (UI) +│ ├── ErrorPage # Page d'erreur 404 +│ ├── FloatingButton # Bouton d'ajout de note +│ ├── DeleteModal # Modale de confirmation suppression +│ ├── NoteEditor # Formulaire de création/édition +│ ├── NoteList # Liste des notes +│ ├── NoteReadView # Vue lecture d'une note +│ └── RgpdInfo # Modal RGPD (informations données) +├── hooks/ # Hook personnalisé useNotes +├── interfaces/ # Types des props (typeScript) +├── lib/ # Logique métier (validation, stockage) +├── types/ # Types shared (Note, NotePatch) +├── App.tsx # Composant racine +├── main.tsx # Point d'entrée +└── style.css # Tailwind + styles globaux +``` ## Licence -MIT — voir [LICENSE](LICENSE). +MIT — voir [LICENSE](LICENSE). \ No newline at end of file