Commit Graph

7 Commits

Author SHA1 Message Date
Serreau Jovann
8b35e2b6d2 feat: comptabilite + prestataires + rapport financier + stats dynamiques
Comptabilite (Super Admin) :
- ComptabiliteController avec 7 exports CSV/JSON compatibles SAGE
  (journal ventes, grand livre, FEC, balance agee, reglements,
  commissions Stripe 1.5%+0.25E, couts services)
- Export PDF via ComptaPdf (FPDF) avec bloc legal pre-rempli,
  tableau pagine, champ signature DocuSeal
- Signature electronique DocuSeal + callback + envoi email signe
  avec template dedie (compta_export_signed.html.twig)
- Rapport financier public (RapportFinancierPdf) : recettes par
  service, depenses (Stripe, infra, prestataires), bilan excedent/deficit
- Codes comptables clients EC-XXXX (plus de 411xxx)

Prestataires (Super Admin) :
- Entite Prestataire (raisonSociale, siret, email, phone, adresse)
- Entite FacturePrestataire (numFacture, montantHt, montantTtc,
  year, month, isPaid, PDF via Vich)
- CRUD complet avec recherche SIRET via proxy API data.gouv.fr
- Commande cron app:reminder:factures-prestataire (5 du mois)
- Factures prestataires integrees dans export couts services
- Sidebar Super Admin : entree Prestataires + Comptabilite

Stats (/admin/stats) :
- Cout prestataire dynamique depuis FacturePrestataire
- Fusion Infra + Prestataire en "Cout de fonctionnement"
- Commission Stripe corrigee (1.5% + 0.25E par transaction)

Divers :
- DocuSealService::sendComptaForSignature() + getApi()
- Customer::generateCodeComptable() format EC-XXXX-XXXXX
- Protection double prefixe EC- a la creation client
- Bouton regenerer PDF cache quand advert state=accepted
- Modals sans script inline (data-modal-open/close dans app.js)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 23:39:31 +02:00
Serreau Jovann
fded9c2528 fix: Postfix dev relay vers Mailpit pour capturer tous les emails
- RELAYHOST changé de "" vers "[mailpit]:1025" : tous les emails
  sortants passent par Mailpit (visible sur http://localhost:8025)
- smtp_tls_security_level=none : pas de TLS vers Mailpit en dev
- depends_on mailpit ajouté pour garantir le démarrage

En prod : RELAYHOST sera vide (envoi direct) ou vers AWS SES.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 22:08:24 +02:00
Serreau Jovann
5c4576ca27 feat: ajout Dovecot avec authentification PostgreSQL (base esymail)
Architecture :
- Base de données esymail sur PostgreSQL existant, table mailbox
  (email, password BLF-CRYPT, domain, quota_mb, is_active, timestamps)
- Dovecot auth via dovecot-sql.conf : passdb + userdb en SQL
- Stockage mails en Maildir /var/mail/vhosts/%d/%n
- UID/GID 1000 (vmail) pour les fichiers mail
- Socket auth Postfix pour SASL (/var/spool/postfix/private/auth)

Fichiers :
- docker/dovecot/Dockerfile : dovecot/dovecot + dovecot-pgsql, user vmail
- docker/dovecot/dovecot.conf : protocols imap/pop3, auth SQL, logging
- docker/dovecot/dovecot-sql.conf : connexion PostgreSQL, queries
  password_query/user_query/iterate_query sur table mailbox
- docker/dovecot/init-esymail.sql : CREATE DATABASE esymail, CREATE TABLE
  mailbox avec index, compte test test@siteconseil.fr/test1234

Docker :
- Service dovecot sans port exposé (interne uniquement)
- Volumes dovecot-mail (Maildir) et dovecot-logs (partagé avec fail2ban)
- Dépend de database (healthcheck)
- init-esymail.sql monté dans /docker-entrypoint-initdb.d/ de PostgreSQL

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:44:45 +02:00
Serreau Jovann
8c6b485acd feat: ajout Fail2ban pour protection Dovecot IMAPS/POP3S (993/995)
Configuration :
- docker/fail2ban/jail.local : jail dovecot uniquement sur ports 993,995,
  bantime 1h, findtime 10min, maxretry 5 tentatives
- docker/fail2ban/filter.d/dovecot.conf : regex pour auth failed,
  disconnected, aborted login (IMAP + POP3)

Docker :
- Image crazymax/fail2ban, network_mode host (accès iptables),
  cap_add NET_ADMIN + NET_RAW pour manipuler les règles firewall
- Volume dovecot-logs partagé en lecture seule pour lire les logs Dovecot
- Volume fail2ban-data pour persister la DB des bans

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:42:11 +02:00
Serreau Jovann
caf7869e8c feat: ajout Postfix, Rspamd et ClamAV dans docker-compose-dev
Services internes (aucun port exposé sur l'hôte) :
- Postfix (boky/postfix) : SMTP interne, hostname mail.siteconseil.local,
  domaines autorisés siteconseil.fr/siteconseil.local, milter vers Rspamd
  sur port 11332, healthcheck via postfix status
- Rspamd (rspamd/rspamd) : filtrage spam/phishing, connecté à ClamAV,
  milter protocol 6 pour Postfix
- ClamAV (clamav/clamav:stable) : antivirus, healthcheck clamdcheck,
  start_period 120s pour le téléchargement initial des signatures

Chaîne : PHP → Postfix:25 → Rspamd:11332 → ClamAV:3310
Volumes persistants : postfix-data, rspamd-data, clamav-data

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:24:52 +02:00
Serreau Jovann
6fa970e60d refactor: rebrand project to CRM SITECONSEIL (SARL SITECONSEIL)
- Rename all references from E-Cosplay/Ecosplay to SITECONSEIL
- Update entity from Association to SARL SITECONSEIL (Siret: 418664058)
- Update address to 27 rue Le Serurier, 02100 Saint-Quentin
- Update emails: contact@siteconseil.fr, rgpd@siteconseil.fr
- Update hosting from GCP to OVHcloud (Roubaix, Gravelines, Strasbourg, Paris)
- Update legal pages: mentions legales, CGV, RGPD, conformite, hebergement, cookies, CGU
- Add tarifs page with tabs: Site Internet, E-Commerce, Nom de domaine, Esy-Mail, Esy-Mailer, Esy-Tchat, Esy-Meet, Esy-Defender
- Add Discord webhook notification workflow
- Disable deploy and sonarqube workflows
- Update OAuth Keycloak realm to master
- Update logo references to logo_facture.png
- Remove forced image sizing in Liip Imagine filters
- Update SonarQube project key and badge token
- Update tribunal competent to Saint-Quentin
- Move tarif tabs JS to app.js (CSP compliance)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 18:48:25 +02:00
Serreau Jovann
686de99909 init 2026-04-01 15:42:52 +02:00