diff --git a/implementation.md b/implementation.md
index bdf4009..a98bc56 100644
--- a/implementation.md
+++ b/implementation.md
@@ -170,6 +170,7 @@ graph TB
- **Purpose**: Orchestrate complete publishing workflows
- **Technology**: ASP.NET Core + Hangfire
- **Responsibilities**:
+ - Package creation from successful builds
- Coordinate document generation
- Manage cloud uploads
- Update help center articles
@@ -188,6 +189,19 @@ erDiagram
datetime LastLogin
}
+ Packages {
+ int Id PK
+ string Name
+ string Version
+ string Description
+ int SourceBuildId FK
+ json CloudStorageConfig
+ json HelpCenterConfig
+ string Status
+ datetime CreatedAt
+ datetime UpdatedAt
+ }
+
Projects {
int Id PK
string Name
@@ -206,24 +220,16 @@ erDiagram
datetime StartTime
datetime EndTime
string LogPath
- }
-
- Packages {
- int Id PK
- string Name
- int ProjectId FK
- json CloudStorageConfig
- json HelpCenterConfig
- datetime CreatedAt
+ string ArtifactPath
}
Publications {
int Id PK
int PackageId FK
- string Version
string Status
datetime PublishedAt
string ReleaseNotesPath
+ json PublicationDetails
}
StorageProviders {
@@ -242,24 +248,24 @@ erDiagram
boolean IsActive
}
- Projects ||--o{ Builds : "has builds"
- Projects ||--o{ Packages : "has packages"
+ Projects ||--o{ Builds : "produces builds"
+ Builds ||--o| Packages : "creates package"
Packages ||--o{ Publications : "has publications"
```
#### Core Entities
```sql
+-- Packages: Top-level finalized software releases
+Packages (Id, Name, Version, Description, SourceBuildId, CloudStorageConfig, HelpCenterConfig, Status, CreatedAt, UpdatedAt)
+
-- Projects from CruiseControl.NET
Projects (Id, Name, Description, CCNetProjectName, Status, CreatedAt, UpdatedAt)
-- Build information
-Builds (Id, ProjectId, BuildNumber, Status, StartTime, EndTime, LogPath)
-
--- Software packages configuration
-Packages (Id, Name, ProjectId, CloudStorageConfig, HelpCenterConfig, CreatedAt)
+Builds (Id, ProjectId, BuildNumber, Status, StartTime, EndTime, LogPath, ArtifactPath)
-- Publishing history
-Publications (Id, PackageId, Version, Status, PublishedAt, ReleaseNotesPath)
+Publications (Id, PackageId, Status, PublishedAt, ReleaseNotesPath, PublicationDetails)
-- User management
Users (Id, Username, PasswordHash, Role, CreatedAt, LastLogin)
@@ -477,6 +483,14 @@ sequenceDiagram
participant HF as Hangfire
participant SH as SignalR Hub
+ Note over User,UI: Package Creation Phase
+ User->>UI: Select Build & Create Package
+ UI->>GW: POST /api/packages/create-from-build
+ GW->>PUB: Create Package from Build
+ PUB->>SH: Package Created Notification
+ SH->>UI: Real-time Package Status
+
+ Note over User,UI: Publishing Phase
User->>UI: Select Package & Initiate Publishing
UI->>GW: POST /api/publish/package/{id}
GW->>PUB: Queue Publishing Job
@@ -494,14 +508,14 @@ sequenceDiagram
HELP-->>HF: Articles Updated
HF->>SH: Notify Completion
- SH->>UI: Real-time Status Update
+ SH->>UI: Real-time Publication Status
UI->>User: Show Completion Status
```
## Data Flow Architecture
```mermaid
-flowchart LR
+flowchart TD
subgraph "External Sources"
CC[CruiseControl.NET
Build Logs]
FB[FogBugz/Manuscript
Developer Data]
@@ -512,13 +526,16 @@ flowchart LR
MS[Manuscript Service
API Client]
end
- subgraph "Data Storage"
- DB[(PostgreSQL
Centralized Data)]
+ subgraph "Core Data Model"
+ PROJ[Projects
CC.NET Projects]
+ BUILDS[Builds
From Projects]
+ PKG[Packages
Finalized Releases]
+ PUB_DATA[Publications
Publishing History]
end
subgraph "Processing Layer"
DS[Document Service
PDF Generator]
- PUB[Publishing Service
Orchestrator]
+ PUB[Publishing Service
Package Creator & Orchestrator]
end
subgraph "Output Channels"
@@ -527,30 +544,34 @@ flowchart LR
end
subgraph "User Interface"
- UI[React Frontend
Management Console]
+ UI[React Frontend
Package Management Console]
end
CC --> PS
FB --> MS
- PS --> DB
- MS --> DB
- DB --> DS
- DB --> PUB
- DS --> STOR
+ PS --> PROJ
+ MS --> PROJ
+ PROJ --> BUILDS
+ BUILDS --> PKG
+ PKG --> PUB_DATA
+
+ UI --> PKG
+ PKG --> PUB
+ PUB --> DS
PUB --> STOR
PUB --> HELP
- DB --> UI
+ PUB --> PUB_DATA
classDef external fill:#ffebee
classDef ingestion fill:#e3f2fd
- classDef storage fill:#f3e5f5
- classDef processing fill:#e8f5e8
- classDef output fill:#fff3e0
+ classDef coredata fill:#e8f5e8
+ classDef processing fill:#fff3e0
+ classDef output fill:#f3e5f5
classDef ui fill:#fce4ec
class CC,FB external
class PS,MS ingestion
- class DB storage
+ class PROJ,BUILDS,PKG,PUB_DATA coredata
class DS,PUB processing
class STOR,HELP output
class UI ui