Storage: Azure Table Storage (entities) + Azure Blob Storage (binaries). 11 aggregate roots, 10 repository interfaces.
| Diagram | Purpose |
|---|---|
| DataModel.mmd | Full ERD — all 11 entities with field types |
| DataModel_SIMPLE.mmd | Relationship map — stakeholder overview |
| Entity | PK / FK | Key Fields | Table |
|---|---|---|---|
User |
Id |
ExternalId (OAuth sub), AuthProvider, Email, DisplayName, LastLoginAt |
users |
Session |
Id, UserId→User |
AppType, ComplexityLevel (1-5), CurrentPhase, Status, TopIdeaIds[], SelectedIdeaIds[], SynthesisId? |
sessions |
Idea |
Id, SessionId→Session |
Title, Description, BatchNumber, DnaKeywords[] max 20, Score (weighted swipe) |
ideas |
Swipe |
Id, SessionId, IdeaId, UserId |
Direction (Like/Dislike), DurationMs, SpeedCategory |
swipes |
Mutation |
Id, SessionId |
ParentIdeaIds[], MutationType (Crossover/Repurposing), MutationRationale, Score |
mutations |
FeatureVariation |
Id, SessionId, MutationId |
Features[] (Name+Desc+Priority), ServiceIntegrations[], VariationTheme, Score |
featurevariations |
Synthesis |
Id, SessionId |
SourceIdeaIds[], MergedTitle, MergedDescription, ThematicBridge, RetainedElements{} |
syntheses |
RefinementAnswer |
Id, SessionId |
Phase (PM/Architect), QuestionNumber, QuestionText, QuestionCategory, AnswerText |
refinementanswers |
VisualAsset |
Id, SessionId |
BlobUrl, ThumbnailUrl, Prompt, StyleAttributes{}, IsSelected |
visualassets |
Artifact |
Id, SessionId, UserId |
Type (PRD/TechnicalDeepDive/VisualAssetPack), Content (Markdown), BlobUrl? (ZIP), IsPublished, HumanReadableSlug |
artifacts |
ProductPersonality |
UserId (PK = UserId) |
ProductBiases{} (±1.0), TechnicalBiases{}, DislikedPatterns[], SwipeSpeedProfile, TotalSessions |
personalities |
| Enum | Values |
|---|---|
AppType |
Web, Mobile, API, SaaS, Game, Other |
SessionPhase |
Phase0 through Phase8, Completed |
SessionStatus |
Active, Completed, Abandoned |
SwipeDirection |
Like, Dislike |
SwipeSpeed |
Fast (<1s), Medium (1-3s), Slow (>3s) |
MutationType |
Crossover, Repurposing |
FeaturePriority |
MoSCoW: Must, Should, Could, WontHave |
RefinementPhase |
Phase4_PM, Phase5_Architect |
ArtifactType |
PRD, TechnicalDeepDive, VisualAssetPack |
AuthProvider |
Google, GitHub, Microsoft |
| Data Type | Storage | Rationale |
|---|---|---|
| Structured entities (User, Session, Idea, etc.) | Azure Table Storage | Low cost, serverless, no schema migration |
| Image files (PNG visual mockups) | Azure Blob Storage | ~2MB per DALL-E 3 image, 4 per session |
| Document artifacts (PDF exports) | Azure Blob Storage | ~500KB per PDF |
| ZIP visual packs | Azure Blob Storage | ~10MB per ZIP |
| AI response cache | In-process IMemoryCache |
50MB limit, keyed by SHA-256 prompt hash |
Table Storage partition strategy: PartitionKey = SessionId for session-scoped entities; PartitionKey = UserId for User and ProductPersonality; ensures efficient point lookups and single-partition scans.
[Created] Phase0 (Scope)
↓ POST /ideas
Phase1 (Spark) — swipe 20 ideas
↓ GET /top-ideas
Phase2 (Mutation) — rate 9 mutations
↓ GET /top-mutations
Phase3 (FeatureExpansion) — rate variations
↓ POST /selections
Phase4 (Synthesis) — merge concepts
↓ POST /synthesis
Phase5 (Refinement_PM) — 5-10 PM Q&A
↓ POST /refinement?phase=pm
Phase6 (Refinement_Tech) — 5-10 Arch Q&A
↓ POST /refinement?phase=tech
Phase7 (Visual) — DALL-E 3 mockups
↓ POST /visuals/select
Phase8 (Artifacts) — PRD + TechSpec + ZIP
↓
[Completed] Status=Completed, CompletedAt set
Side transitions:
Any phase → [Abandoned] (30-day retention, then deleted)
Any phase → Resume via POST /sessions/{id}/resume
| State | Retention |
|---|---|
| Completed sessions | 1 year |
| Abandoned sessions | 30 days |
| Published artifacts | Indefinite (gallery) |
| Blob Storage files | Mirror session retention |
All in src/PoAppIdea.Core/Interfaces/:
ISessionRepository, IIdeaRepository, ISwipeRepository, IMutationRepository,
IFeatureVariationRepository, ISynthesisRepository, IRefinementAnswerRepository,
IVisualAssetRepository, IArtifactRepository, IPersonalityRepository
All implemented against Azure Table Storage in src/PoAppIdea.Web/Infrastructure/Storage/.