75 fichiers, ~1 mois de travail depuis f222861 (17/07). Contenu :
Onboarding self-service — jamais exécuté de bout en bout
OnboardingController, StripeWebhookController, StripeService, ResendEmailService
+ IEmailService (10 templates), EmailTemplates/, TrialLifecycleService (Hangfire),
PasswordTokenHelper, SlugHelper, 5 DTOs. Essai 14 j, Stripe customer/Checkout/Tax,
mot de passe oublié + invitation user, plafond IA d'essai.
Schéma Postgres v3 — passe pendant que la base est vide
ContentEmbedding + index HNSW (vector_cosine_ops), IEmbeddingService +
GoogleEmbeddingService (gemini-embedding-001, 768 dims), Deployment/Dockerfile.postgres
(postgis 3.4.3 + pgvector 0.8.6, épinglé par digest — un tag mobile rejouerait le
warning de collation glibc). Colonnes Resource : StoragePath, FileName,
IncludeInAiKnowledge, AiIndexStatus + nouveaux ResourceType ajoutés EN FIN d'enum.
Guide IA
Champs Guide* sur Instance + InstanceDTO, AssistantService lit la configuration client
dans les 4 blocs de prompt (ton codé en dur retiré, règle hors-sujet ajoutée aux deux
variantes qui n'en avaient pas), IHttpClientFactory à la place des new HttpClient().
Table VisitorQuestion + ConversationId sur AiChatRequest.
Stats
Rétention unifiée à 13 mois (instances ET plans), VisitEventPurgeService.
Nettoyage
IsStepLocked / IsHiddenInitially / FactContent supprimés de GuidedStep — IsStepLocked
rendait une étape définitivement infranchissable même après réussite.
SectionMap allégé (-57 lignes).
Tests
SectionParcoursControllerTests, FakeConfiguration, FakeEmailService.
ContentEmbedding a cassé 116 tests sur 124 (EF InMemory ne connaît pas Vector) :
l'entité est exclue quand le provider n'est pas Npgsql. Conséquence assumée —
le vector store n'est couvert par aucun test. dotnet test 124/124.
10 migrations EF. Base locale à jour, dotnet build 0 erreur.
Rien n'est en prod : la bascule Mongo → Postgres est décrite dans DOCS/STATUS.md §1quinquies.
⚠️ appsettings.json contient les clés Stripe (test) et Resend (prod) en clair — à rotationner.
60 lines
2.4 KiB
C#
60 lines
2.4 KiB
C#
using System;
|
|
|
|
namespace ManagerService.EmailTemplates
|
|
{
|
|
/// <summary>
|
|
/// Shared HTML shell for all transactional emails — MyInfoMate branding
|
|
/// (cyan #0df2df header, dark logo band, white content card).
|
|
/// </summary>
|
|
public static class EmailLayout
|
|
{
|
|
public static string Render(string title, string bodyHtml, string ctaText = null, string ctaUrl = null)
|
|
{
|
|
var ctaHtml = "";
|
|
if (!string.IsNullOrEmpty(ctaText) && !string.IsNullOrEmpty(ctaUrl))
|
|
{
|
|
ctaHtml = $@"
|
|
<table role=""presentation"" cellpadding=""0"" cellspacing=""0"" style=""margin: 28px 0 8px;"">
|
|
<tr>
|
|
<td style=""border-radius: 12px; background: #0df2df;"">
|
|
<a href=""{ctaUrl}"" style=""display: inline-block; padding: 14px 28px; font-family: Arial, sans-serif; font-size: 15px; font-weight: 700; color: #043b37; text-decoration: none;"">{ctaText}</a>
|
|
</td>
|
|
</tr>
|
|
</table>";
|
|
}
|
|
|
|
return $@"<!DOCTYPE html>
|
|
<html lang=""fr"">
|
|
<head><meta charset=""utf-8""><meta name=""viewport"" content=""width=device-width, initial-scale=1.0""></head>
|
|
<body style=""margin:0; padding:0; background:#f1f5f9; font-family: Arial, sans-serif;"">
|
|
<table role=""presentation"" width=""100%"" cellpadding=""0"" cellspacing=""0"" style=""background:#f1f5f9; padding: 32px 0;"">
|
|
<tr>
|
|
<td align=""center"">
|
|
<table role=""presentation"" width=""560"" cellpadding=""0"" cellspacing=""0"" style=""background:#ffffff; border-radius: 16px; overflow:hidden;"">
|
|
<tr>
|
|
<td style=""background:#0a1222; padding: 24px 32px;"">
|
|
<span style=""font-size: 18px; font-weight: 800; color:#ffffff;"">MyInfoMate</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style=""padding: 32px;"">
|
|
<h1 style=""margin:0 0 16px; font-size: 20px; color:#0f172a;"">{title}</h1>
|
|
<div style=""font-size: 14px; line-height: 1.6; color:#334155;"">{bodyHtml}</div>
|
|
{ctaHtml}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style=""padding: 20px 32px; border-top: 1px solid #e2e8f0; font-size: 12px; color:#94a3b8;"">
|
|
MyInfoMate — {DateTime.UtcNow.Year}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>";
|
|
}
|
|
}
|
|
}
|