📊 Progression globale
0/0🧱 PHASE 0 — Fondations
10/12- Dépôt local initialisé sur base MakerKit `next-supabase-saas-kit-turbo`
- Repo GitHub privé : [github.com/frenchtwins/koncert](https://github.com/frenchtwins/koncert)
- pnpm install OK (Node 25, pnpm 10.33)
- Typecheck `apps/web` clean après chaque commit
- Build production OK (36+ routes)
- Lint + format clean (oxlint + oxfmt)
- Locale par défaut `fr` (messages FR pour **tous les namespaces** : common, auth, marketing, account, teams, billing)
- Branding KONCERT (logo wordmark gradient, metadata, product name)
- Footer + navigation rebrandés (plus de mentions Makerkit en prod)
- **Jamais** afficher "French Twins" côté utilisateur (vérifié)
- Keystatic (CMS) : remplacer les exemples par contenu KONCERT ou désactiver pour MVP
- Remplacer logo wordmark par un SVG custom (design graphiste à venir)
🛡️ PHASE 0.5 — Sécurité & conformité (transverse)
7/11- Audit log (`public.audit_log` + `log_event()` SECURITY DEFINER) — migration `20260420030502_koncert_security`
- Rate-limiting DB (`rate_limits` + `rate_limit_check()`)
- Chiffrement `pgcrypto` des credentials d'intégration (`encrypt_secret` + `get_integration_credentials`)
- Contrainte CHECK qui interdit de stocker `api_key/secret/token/password` en clair
- Demandes RGPD (table `data_requests` avec RLS admin)
- `SECURITY.md` (politique de divulgation, checklist pré-prod)
- UI Intégrations qui appelle `encrypt_secret` via RPC — jamais de secret en clair côté app
- Provisionner `app.encryption_key` dans Supabase :
- Activer MFA sur les comptes Supabase / Vercel / Stripe côté admin KONCERT
- Cloudflare Turnstile sur signup (anti-bot)
- Pen-test externe avant ouverture publique
🔐 PHASE 1 — Auth & Accounts (fournis par MakerKit)
5/6- Auth email/password, OAuth Google/Apple, magic link, MFA TOTP, password reset
- Personal accounts (`auth.users.id = accounts.id`)
- Team accounts (multi-tenant, slugs, invitations, rôles)
- Rôles + permissions (owner, member + matrice `role_permissions`)
- Layouts dashboard perso `/home/(user)` + team `/home/[account]`
- Configurer providers OAuth (Google + Apple) côté Supabase dashboard
🗄️ PHASE 2 — Database métier
8/10- Migration `20260420030501_koncert_business` : artists, shows, venues, events
- Migration `20260420030501_koncert_business` : ticket_types, orders, tickets
- Migration `20260420030501_koncert_business` : contacts, contact_segments, campaigns
- Migration `20260420030501_koncert_business` : documents, transports, accommodations, road_sheets
- Migration `20260420030501_koncert_business` : ai_tasks
- Migration `20260420030502_koncert_security` : audit_log, rate_limits, integrations chiffrée, data_requests
- Vue publique `koncert_public_ticket_types` pour les pages de vente
- RLS complète (`has_role_on_account`, `is_account_owner`) sur toutes les tables
- Seed data démo : endpoint `POST /api/koncert/sample-data` prêt, manque le call depuis Supabase démarré
- Régénérer `database.types.ts` via `pnpm supabase:web:typegen`
🏠 PHASE 4 — Dashboard central
5/5- Sidebar team account avec sections KONCERT (Production · Commercial · Business · IA · Settings)
- Dashboard home KONCERT custom : 4 KPIs + 5 prochaines dates + catalogue + AI activity
- **Graphe ventes 30 jours** (recharts AreaChart avec gradient brand)
- Bannière de bienvenue avec bouton "Peupler avec données démo" si espace vide
- Dark mode (MakerKit)
🎭 PHASE 5a — Catalogue production
3/3- `/home/[account]/artists` : list + create dialog (nom, genre, bio, slug auto)
- `/home/[account]/shows` : list + create dialog (lié à un artiste, durée, description)
- `/home/[account]/venues` : list + create dialog (type, ville, capacité, adresse)
🚌 PHASE 6 — Tournée
6/9- `/home/[account]/tour` : vue liste avec Prochaines dates + Historique
- Dialog de création de date (show, venue, horaires, statut, notes)
- Page détail event `/tour/[id]` avec horaires (load-in, soundcheck, doors, show)
- Changement de statut inline + édition notes (auto-save via server action)
- Feuille de route PDF IA (Claude Sonnet 4.6 + jspdf)
- Lien vers page de vente publique depuis la page détail
- Vue calendrier + vue carte Mapbox
- Transports & hébergements UI (schéma DB déjà prêt)
- Optimisation trajets (OSRM / Mapbox Directions)
🎟️ PHASE 5 — Billetterie
6/12- `/home/[account]/ticketing` : carte par événement à venir (vendus / capacité / CA)
- Dialog création catégorie de billet (7 kinds, prix EUR → cents)
- Page de vente publique `/public/event/[eventId]` (ticket types via vue SQL publique)
- QR code endpoint `/api/tickets/qr?payload=...` (qrcode.js, PNG 512×512 caché)
- Page billet électronique `/public/ticket/[code]` avec QR + infos event
- **Scanner QR terrain** `/home/[account]/ticketing/scan` + endpoint `/api/tickets/validate`
- Checkout Stripe Connect (encaissement sur compte tourneur)
- PWA manifest + service worker pour scan offline
- Liste invitations / guestlist
- Remboursements / annulations
- Stats ventes temps réel (Supabase Realtime)
- Agrégation ventes multi-plateformes (Weezevent / BilletWeb / Shotgun)
👥 PHASE 7 — CRM
2/6- `/home/[account]/crm` : 4 stats cards + table contacts (tags, fan_score, total_spent)
- Dialog création contact (fan / pro / venue / media / partner, tags CSV)
- Page détail contact (historique achats, notes)
- Import CSV
- Segmentation dynamique (filters JSONB, UI builder)
- Scoring fans automatique (jobs nocturne)
🤖 PHASE 8 — IA Claude (Sonnet 4.6)
10/13- Wrapper `lib/koncert-ai/` : client Anthropic lazy + pricing USD cents
- **Chat streaming** `/api/ai/chat` — SSE + prompt caching 5-min + adaptive thinking
- **Génération feuilles de route** `/api/ai/road-sheet` — Markdown → PDF client (jspdf)
- **Extraction PDF** `/api/ai/extract-dates` — vision + JSON structuré
- **Import auto** `/api/ai/import-date` — extraction → artist/show/venue/event d'un clic (reuse si match)
- **Campaign copy** `/api/ai/campaign-copy` — Claude rédige email/SMS/ads selon canal + event
- Tracking usage : `ai_tasks` avec tokens + cost_cents
- UI `/home/[account]/ai` : chat + PDF extractor (avec boutons import par ligne)
- Bouton "Feuille de route IA" sur la page détail event
- Bouton "Rédiger avec Claude" dans le dialog de création de campagne
- Génération affiches / posts réseaux (poster_generation)
- Tool use : donner à Claude un accès lecture aux events / venues / contacts via RLS
- Context compaction pour longues conversations
📢 PHASE 9 — Marketing / Publicité
3/6- `/home/[account]/marketing` : roadmap + canaux + CTA IA + CTA campagnes
- `/home/[account]/marketing/campaigns` : CRUD campagnes (email/SMS/Meta/Google/TikTok)
- AI copy generator intégré dans le dialog de création
- Connexion Meta Ads / Google Ads / TikTok Ads (OAuth + credentials chiffrés dans vault)
- Optimisation budgets automatique
- Tracking conversions
💼 PHASE 10 — Business
2/6- `/home/[account]/business` : hub avec lien vers documents + roadmap
- `/home/[account]/business/documents` : CRUD documents (devis/contrats/factures/rider/road_sheet)
- Templates pré-remplis depuis event data
- Signature électronique (DocuSign / SignWell)
- Suivi revenus/dépenses + rentabilité tournée
- Export comptable (CSV / QuickBooks / Pennylane)
🔌 PHASE 11 — Intégrations externes
4/10- **Stripe** — MakerKit billing SaaS (abonnements équipes)
- **Anthropic Claude** — SDK installé et câblé (Sonnet 4.6 sur 4 endpoints)
- **Supabase** — Auth/DB/Storage (config MakerKit)
- **Page Intégrations** : `/home/[account]/settings/integrations` — 10 providers avec dialog pgcrypto
- **Brevo** — emails + SMS (saisie clé OK, câblage SDK à faire)
- **Mapbox** — cartes tournée (token saisissable)
- **Pappers** — vérif entreprises
- **Meta / Google / TikTok Ads** — pubs (OAuth flow)
- **DocuSign / SignWell** — signature électronique
- **Stripe Connect** — encaissement billetterie sur compte tourneur
📱 PHASE 12 — Mobile & Polish
1/6- Scanner QR caméra (html5-qrcode, /ticketing/scan) + validation serveur
- Responsive mobile complet (à vérifier sur chaque page créée)
- PWA (manifest + service worker)
- Push notifications
- Performances (LCP, CLS)
- Accessibilité (WCAG AA)
🚀 PHASE 13 — Déploiement
1/6- Déploiement Vercel
- Domaine koncert.pro (DNS Cloudflare)
- HSTS preload + DMARC/SPF/DKIM
- Sentry / Vercel Analytics
- Onboarding nouveau user
- Page `/status` publique (noindex) pour suivre l'avancement
🌐 Comment voir l'avancement
0/0🚀 Quick start local (au réveil)
0/0🎯 Ce qu'il faut faire prioritairement
0/0