Unify Blazor frontend and API into EnvelopeGenerator.Server
The `EnvelopeGenerator.Server` project now serves as the unified runtime host for both the Blazor frontend and Web API backend, deprecating the `EnvelopeGenerator.API` project. All API endpoints have been merged into `EnvelopeGenerator.Server`. Key changes: - Updated `EnvelopeGenerator.Server` to include API controllers. - Deprecated `EnvelopeGenerator.API` and removed it from the active solution. - Simplified development workflow to run only `EnvelopeGenerator.Server`. - Updated `appsettings.json` to consolidate configuration settings. - Adjusted documentation to reflect the new unified architecture. - Updated manual testing steps and environment variable references. - Migrated legacy VB.NET app references to the new architecture. These changes simplify development, deployment, and testing workflows while consolidating the solution architecture.
This commit is contained in:
34
AGENTS.md
34
AGENTS.md
@@ -69,9 +69,9 @@ This section explains every markdown file in the repo: what it contains, why it
|
|||||||
- **EnvelopeGenerator.Server** (Server): `@rendermode InteractiveServer` - PDF viewers requiring DevExpress backend
|
- **EnvelopeGenerator.Server** (Server): `@rendermode InteractiveServer` - PDF viewers requiring DevExpress backend
|
||||||
- **EnvelopeGenerator.Server.Client** (WASM): `@rendermode InteractiveWebAssembly` - Login, dashboards, business logic
|
- **EnvelopeGenerator.Server.Client** (WASM): `@rendermode InteractiveWebAssembly` - Login, dashboards, business logic
|
||||||
|
|
||||||
**Backend:** EnvelopeGenerator.API (ASP.NET Core 8.0)
|
**Backend + API Host:** `EnvelopeGenerator.Server` (ASP.NET Core 8.0, merged Blazor + Web API host)
|
||||||
|
|
||||||
**Proxy:** YARP in EnvelopeGenerator.Server routes `/api/*` → `localhost:8088` (API)
|
**Proxy:** YARP in `EnvelopeGenerator.Server` is used for external integrations (for example AuthHub forwarding), not for routing app APIs to `EnvelopeGenerator.API`.
|
||||||
|
|
||||||
### Deprecated Projects - DO NOT USE
|
### Deprecated Projects - DO NOT USE
|
||||||
- `EnvelopeGenerator.ReceiverUI` - Pure WASM (migrated to Server)
|
- `EnvelopeGenerator.ReceiverUI` - Pure WASM (migrated to Server)
|
||||||
@@ -80,18 +80,14 @@ This section explains every markdown file in the repo: what it contains, why it
|
|||||||
|
|
||||||
## Development Commands
|
## Development Commands
|
||||||
|
|
||||||
### Run Both Projects (Required)
|
### Run Active Host
|
||||||
```powershell
|
```powershell
|
||||||
# Terminal 1 - API Backend
|
# Terminal - Blazor + Web API host
|
||||||
cd EnvelopeGenerator.API
|
|
||||||
dotnet run
|
|
||||||
|
|
||||||
# Terminal 2 - Blazor Frontend
|
|
||||||
cd EnvelopeGenerator.Server\EnvelopeGenerator.Server
|
cd EnvelopeGenerator.Server\EnvelopeGenerator.Server
|
||||||
dotnet run
|
dotnet run
|
||||||
```
|
```
|
||||||
|
|
||||||
**Critical:** Both must run simultaneously. EnvelopeGenerator.Server proxy forwards `/api/*` to API.
|
**Critical:** `EnvelopeGenerator.Server` is the active runtime host for both UI and API controllers.
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
```powershell
|
```powershell
|
||||||
@@ -104,10 +100,10 @@ dotnet build EnvelopeGenerator.sln
|
|||||||
EnvelopeGenerator.Domain/ # Entities (Envelope, Receiver, Document, etc.)
|
EnvelopeGenerator.Domain/ # Entities (Envelope, Receiver, Document, etc.)
|
||||||
EnvelopeGenerator.Application/ # MediatR CQRS (Commands, Queries, Handlers)
|
EnvelopeGenerator.Application/ # MediatR CQRS (Commands, Queries, Handlers)
|
||||||
EnvelopeGenerator.Infrastructure/ # EF Core, SQL executors, repositories
|
EnvelopeGenerator.Infrastructure/ # EF Core, SQL executors, repositories
|
||||||
EnvelopeGenerator.API/ # Controllers, endpoints
|
|
||||||
EnvelopeGenerator.Server/
|
EnvelopeGenerator.Server/
|
||||||
EnvelopeGenerator.Server/ # Server-side Blazor components
|
EnvelopeGenerator.Server/ # Server-side Blazor + API controllers
|
||||||
├─ Components/Pages/ # @rendermode InteractiveServer
|
├─ Components/Pages/ # @rendermode InteractiveServer
|
||||||
|
├─ Controllers/ # Active Web API endpoints
|
||||||
EnvelopeGenerator.Server.Client/ # Client-side WASM components
|
EnvelopeGenerator.Server.Client/ # Client-side WASM components
|
||||||
├─ Pages/ # @rendermode InteractiveWebAssembly
|
├─ Pages/ # @rendermode InteractiveWebAssembly
|
||||||
├─ Services/ # HTTP API clients
|
├─ Services/ # HTTP API clients
|
||||||
@@ -199,7 +195,7 @@ Routes `/api/*`, `/swagger/*`, `/openapi/*`, `/scalar/*` → `https://localhost:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### API Config (`API/appsettings.json`)
|
### Server Host Config (`EnvelopeGenerator.Server/EnvelopeGenerator.Server/appsettings.json`)
|
||||||
- `ConnectionStrings:Default` - SQL Server DB
|
- `ConnectionStrings:Default` - SQL Server DB
|
||||||
- `AllowedOrigins` - CORS (includes `http://localhost:5131`, `http://localhost:7192`)
|
- `AllowedOrigins` - CORS (includes `http://localhost:5131`, `http://localhost:7192`)
|
||||||
- `Cache:SignatureCacheExpiration` - Signature persistence timeout
|
- `Cache:SignatureCacheExpiration` - Signature persistence timeout
|
||||||
@@ -237,16 +233,15 @@ Routes `/api/*`, `/swagger/*`, `/openapi/*`, `/scalar/*` → `https://localhost:
|
|||||||
**No automated tests exist yet.**
|
**No automated tests exist yet.**
|
||||||
|
|
||||||
Manual testing workflow:
|
Manual testing workflow:
|
||||||
1. Start API (`dotnet run` in `EnvelopeGenerator.API`)
|
1. Start EnvelopeGenerator.Server (`dotnet run` in `EnvelopeGenerator.Server\EnvelopeGenerator.Server`)
|
||||||
2. Start EnvelopeGenerator.Server (`dotnet run` in `EnvelopeGenerator.Server\EnvelopeGenerator.Server`)
|
2. Navigate to `https://localhost:5131` (or check console output for port)
|
||||||
3. Navigate to `https://localhost:5131` (or check console output for port)
|
3. Test sender login at `/sender/login`
|
||||||
4. Test sender login at `/sender/login`
|
4. Test receiver flow at `/envelope/login/{envelopeKey}`
|
||||||
5. Test receiver flow at `/envelope/login/{envelopeKey}`
|
|
||||||
|
|
||||||
## Database
|
## Database
|
||||||
|
|
||||||
**SQL Server** (DD_ECM)
|
**SQL Server** (DD_ECM)
|
||||||
- Connection string in `API/appsettings.json`
|
- Connection string in `EnvelopeGenerator.Server/EnvelopeGenerator.Server/appsettings.json`
|
||||||
- EF Core migrations NOT used (manual SQL scripts)
|
- EF Core migrations NOT used (manual SQL scripts)
|
||||||
- Stored procedures: `PRSIG_*` prefix
|
- Stored procedures: `PRSIG_*` prefix
|
||||||
|
|
||||||
@@ -320,5 +315,4 @@ Each envelope maintains independent authentication state.
|
|||||||
None required. All config in `appsettings.json`.
|
None required. All config in `appsettings.json`.
|
||||||
|
|
||||||
**Local dev ports:**
|
**Local dev ports:**
|
||||||
- API: `https://localhost:8088`
|
- App host (UI + API): `https://localhost:5131` or `http://localhost:7192`
|
||||||
- WebUI: `https://localhost:5131` or `http://localhost:7192`
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ This project contains:
|
|||||||
- `EnvelopeGenerator.Domain` — domain models, constants, shared abstractions
|
- `EnvelopeGenerator.Domain` — domain models, constants, shared abstractions
|
||||||
- `EnvelopeGenerator.Infrastructure` — EF Core and infrastructure services
|
- `EnvelopeGenerator.Infrastructure` — EF Core and infrastructure services
|
||||||
- `EnvelopeGenerator.PdfEditor` — PDF-related backend utilities
|
- `EnvelopeGenerator.PdfEditor` — PDF-related backend utilities
|
||||||
- `EnvelopeGenerator.API` — still exists in the solution, but the current merged app host is `EnvelopeGenerator.Server`
|
- `EnvelopeGenerator.API` — deprecated project (no longer part of the active solution/runtime path)
|
||||||
|
|
||||||
### Legacy / Do Not Touch
|
### Legacy / Do Not Touch
|
||||||
- `EnvelopeGenerator.Service`
|
- `EnvelopeGenerator.Service`
|
||||||
@@ -121,7 +121,7 @@ Current controller set includes:
|
|||||||
- `SignatureController`
|
- `SignatureController`
|
||||||
- `TfaRegistrationController`
|
- `TfaRegistrationController`
|
||||||
|
|
||||||
Do not assume API behavior lives only in `EnvelopeGenerator.API`; the active merged host contains controller endpoints directly.
|
Do not assume API behavior lives in `EnvelopeGenerator.API`; the active merged host contains controller endpoints directly.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# EnvelopeGenerator.Form — VB.NET Desktop Application Context
|
# EnvelopeGenerator.Form — VB.NET Desktop Application Context
|
||||||
|
|
||||||
## Purpose
|
## Purpose
|
||||||
**Legacy Windows Forms application** for envelope creation, management, and signature field placement. Built with **DevExpress components** and **GdPicture14** for PDF manipulation. This application is being **migrated to EnvelopeGenerator.Server + API** architecture.
|
**Legacy Windows Forms application** for envelope creation, management, and signature field placement. Built with **DevExpress components** and **GdPicture14** for PDF manipulation. This application is being **migrated to `EnvelopeGenerator.Server` architecture** (merged Blazor + Web API host).
|
||||||
|
|
||||||
**Primary Libraries:** DevExpress XtraGrid/XtraEditors, GdPicture14, VB.NET (.NET Framework 4.6.2)
|
**Primary Libraries:** DevExpress XtraGrid/XtraEditors, GdPicture14, VB.NET (.NET Framework 4.6.2)
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ End Sub
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Migration to EnvelopeGenerator.Server + API
|
## Migration to EnvelopeGenerator.Server
|
||||||
|
|
||||||
### Mapping Table
|
### Mapping Table
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user