diff --git a/AGENTS.md b/AGENTS.md index 1e8e86ab..960f9a7e 100644 --- a/AGENTS.md +++ b/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.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 - `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 -### Run Both Projects (Required) +### Run Active Host ```powershell -# Terminal 1 - API Backend -cd EnvelopeGenerator.API -dotnet run - -# Terminal 2 - Blazor Frontend +# Terminal - Blazor + Web API host cd EnvelopeGenerator.Server\EnvelopeGenerator.Server 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 ```powershell @@ -104,10 +100,10 @@ dotnet build EnvelopeGenerator.sln EnvelopeGenerator.Domain/ # Entities (Envelope, Receiver, Document, etc.) EnvelopeGenerator.Application/ # MediatR CQRS (Commands, Queries, Handlers) EnvelopeGenerator.Infrastructure/ # EF Core, SQL executors, repositories -EnvelopeGenerator.API/ # Controllers, endpoints EnvelopeGenerator.Server/ - EnvelopeGenerator.Server/ # Server-side Blazor components + EnvelopeGenerator.Server/ # Server-side Blazor + API controllers ├─ Components/Pages/ # @rendermode InteractiveServer + ├─ Controllers/ # Active Web API endpoints EnvelopeGenerator.Server.Client/ # Client-side WASM components ├─ Pages/ # @rendermode InteractiveWebAssembly ├─ 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 - `AllowedOrigins` - CORS (includes `http://localhost:5131`, `http://localhost:7192`) - `Cache:SignatureCacheExpiration` - Signature persistence timeout @@ -237,16 +233,15 @@ Routes `/api/*`, `/swagger/*`, `/openapi/*`, `/scalar/*` → `https://localhost: **No automated tests exist yet.** Manual testing workflow: -1. Start API (`dotnet run` in `EnvelopeGenerator.API`) -2. Start EnvelopeGenerator.Server (`dotnet run` in `EnvelopeGenerator.Server\EnvelopeGenerator.Server`) -3. Navigate to `https://localhost:5131` (or check console output for port) -4. Test sender login at `/sender/login` -5. Test receiver flow at `/envelope/login/{envelopeKey}` +1. Start EnvelopeGenerator.Server (`dotnet run` in `EnvelopeGenerator.Server\EnvelopeGenerator.Server`) +2. Navigate to `https://localhost:5131` (or check console output for port) +3. Test sender login at `/sender/login` +4. Test receiver flow at `/envelope/login/{envelopeKey}` ## Database **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) - Stored procedures: `PRSIG_*` prefix @@ -320,5 +315,4 @@ Each envelope maintains independent authentication state. None required. All config in `appsettings.json`. **Local dev ports:** -- API: `https://localhost:8088` -- WebUI: `https://localhost:5131` or `http://localhost:7192` +- App host (UI + API): `https://localhost:5131` or `http://localhost:7192` diff --git a/COPILOT_CONTEXT.md b/COPILOT_CONTEXT.md index 81ecf93b..15f5172c 100644 --- a/COPILOT_CONTEXT.md +++ b/COPILOT_CONTEXT.md @@ -39,7 +39,7 @@ This project contains: - `EnvelopeGenerator.Domain` — domain models, constants, shared abstractions - `EnvelopeGenerator.Infrastructure` — EF Core and infrastructure services - `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 - `EnvelopeGenerator.Service` @@ -121,7 +121,7 @@ Current controller set includes: - `SignatureController` - `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. --- diff --git a/FORM_APPLICATION_CONTEXT.md b/FORM_APPLICATION_CONTEXT.md index d3aebcbb..6702f132 100644 --- a/FORM_APPLICATION_CONTEXT.md +++ b/FORM_APPLICATION_CONTEXT.md @@ -1,7 +1,7 @@ # EnvelopeGenerator.Form — VB.NET Desktop Application Context ## 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) @@ -368,7 +368,7 @@ End Sub --- -## Migration to EnvelopeGenerator.Server + API +## Migration to EnvelopeGenerator.Server ### Mapping Table