Skip to content

Commit d8993a5

Browse files
authored
Merge pull request #378 from ChangemakerStudios/chore/remove-electron-net
Remove dormant Electron.NET integration
2 parents 42ee9f7 + 8e6786e commit d8993a5

13 files changed

Lines changed: 5 additions & 2687 deletions

Claude.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ The solution is organized into several projects with clear separation of concern
2525
- WebView2 for HTML email rendering
2626
- ReactiveUI for reactive programming patterns
2727

28-
- **Papercut.Service** - Windows Service/HTTP server for receiving emails (net8.0)
28+
- **Papercut.Service** - Windows Service/HTTP server for receiving emails (net10.0)
2929
- ASP.NET Core based with embedded web UI
30-
- AngularJS web interface (embedded in Web/Assets/)
31-
- ElectronNET.API integration
30+
- Angular web interface (source in Web/, built into Web/Assets/)
3231
- Can run independently of the desktop UI
3332
- Accessible via HTTP (default port 8080)
3433

src/Papercut.Service/Electron.md

Lines changed: 0 additions & 111 deletions
This file was deleted.

src/Papercut.Service/ElectronService.cs

Lines changed: 0 additions & 123 deletions
This file was deleted.

src/Papercut.Service/Papercut.Service.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,13 @@
4444
</ItemGroup>
4545
</Target>
4646
<ItemGroup>
47-
<None Remove="electron.manifest.json" />
4847
<None Update="appsettings.Production.json">
4948
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
5049
</None>
5150
</ItemGroup>
52-
<ItemGroup>
53-
<Content Include="electron.manifest.json">
54-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
55-
</Content>
56-
</ItemGroup>
5751
<ItemGroup>
5852
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="11.0.2" />
5953
<PackageReference Include="AutofacSerilogIntegration" Version="5.0.0" />
60-
<PackageReference Include="ElectronNET.API" Version="23.6.2" />
6154
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="10.0.11" />
6255
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="2.2.0" />
6356
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />

src/Papercut.Service/Program.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818

1919
using Autofac.Extensions.DependencyInjection;
20-
using ElectronNET.API;
2120
using Microsoft.AspNetCore.Builder;
2221
using Microsoft.Extensions.Hosting;
2322
using Microsoft.Extensions.Logging;
@@ -85,14 +84,10 @@ private static WebApplication CreateWebApp(string[] args)
8584
{
8685
sp.AddSingleton(context.Configuration);
8786
sp.AddSingleton(context.HostingEnvironment);
88-
89-
if (HybridSupport.IsElectronActive)
90-
sp.AddHostedService<ElectronService>();
9187
});
9288

9389
builder.Logging.ClearProviders();
9490
builder.Host.UseSerilog();
95-
builder.WebHost.UseElectron(args);
9691

9792
var startup = new PapercutServiceStartup();
9893

src/Papercut.Service/Readme.md

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Papercut.Service
22

3-
**Papercut.Service** is a modern ASP.NET Core 8.0 web application that serves as the backend service for Papercut SMTP. It provides both SMTP email capture functionality and a RESTful API for managing messages, with an optional Electron-based desktop interface.
3+
**Papercut.Service** is a modern ASP.NET Core web application that serves as the backend service for Papercut SMTP. It provides SMTP email capture, a RESTful API for managing messages, and the embedded Angular web UI.
44

55
## 🎯 Purpose & Architecture
66

77
Papercut.Service is designed as a **hybrid application** that can operate in multiple modes:
88

99
- **Standalone Service**: Runs as a background Windows service for server deployments
10-
- **Desktop Application**: Optionally runs with an Electron GUI for desktop usage
1110
- **Web API Service**: Always provides HTTP endpoints for message management
1211
- **SMTP Server**: Captures SMTP messages sent to configurable ports
1312

@@ -90,9 +89,8 @@ src/Papercut.Service/
9089
- **Papercut.Rules** - Message processing rules engine
9190
- **Papercut.Common** - Shared utilities and extensions
9291

93-
#### **Optional Desktop Support**
94-
- **ElectronNET.API** - Cross-platform desktop wrapper (when enabled)
95-
- **Angular 17 Web UI** - Modern frontend embedded as static assets
92+
#### **Embedded Web UI**
93+
- **Angular Web UI** - Modern frontend embedded as static assets
9694

9795
## 🚀 How to Run Papercut.Service
9896

@@ -107,9 +105,6 @@ Papercut.Service.exe
107105
Papercut.Service.exe install --sudo
108106
```
109107

110-
### Option 3: With Electron Desktop Interface
111-
The service can optionally launch with a desktop GUI when Electron support is active. This provides a native desktop experience while maintaining the same backend functionality.
112-
113108
### Command Line Options
114109
Get a full listing of available command line options:
115110
```bash
@@ -208,18 +203,6 @@ docker run -d -p 8080:8080 -p 2525:2525 -e HttpPathPrefix=/webmail changemakerst
208203

209204
The default (empty) serves the web UI at the root as before. Requests without the prefix continue to work, so proxies that strip the prefix are also supported — but a prefix-stripping proxy must redirect the bare prefix (`/webmail``/webmail/`) itself, since the app only sees `/` and cannot issue that redirect. Forwarding the full prefix (with `HttpPathPrefix` set) avoids this entirely.
210205

211-
## 🖥️ Electron Desktop Mode
212-
213-
**Status**: Currently available but not actively used in production deployments.
214-
215-
The Electron integration (`ElectronService.cs`) provides:
216-
- Cross-platform desktop window hosting the web UI
217-
- Native application menus and system integration
218-
- Platform-specific icons and behaviors
219-
- Desktop notifications and app lifecycle management
220-
221-
**Future Plans**: Electron support is maintained for potential future desktop distribution scenarios. See `Electron.md` for detailed analysis of the Electron implementation.
222-
223206
## 📦 Deployment Modes
224207

225208
### 1. Windows Service (Recommended for Production)
@@ -252,7 +235,6 @@ The Electron integration (`ElectronService.cs`) provides:
252235
- **Autofac** - Dependency injection container
253236

254237
### Optional Dependencies
255-
- **ElectronNET.API 23.6.2** - Desktop GUI support (when enabled)
256238
- **Node.js & npm** - For building embedded Angular web UI
257239

258240
## 🔍 Troubleshooting
@@ -271,7 +253,6 @@ Comprehensive logging is available through Serilog:
271253
## 📄 Related Documentation
272254

273255
- `Web/README.md` - Angular frontend documentation
274-
- `Electron.md` - Electron desktop integration analysis
275256
- `Web/TESTING.md` - Web UI testing guidelines
276257

277258
---

src/Papercut.Service/electron.manifest.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/Papercut.Service/launch.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)