You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrade to .NET 10 and migrate to Dapper-based ORM
Upgraded the backend API from .NET 9 to .NET 10 for improved performance.
Replaced Entity Framework Core with RoboDodd.OrmLite (Dapper-based)
to simplify database operations and eliminate migrations.
Added webhook capture and management features, including new
endpoints (`/api/hook/{bucket}` and `/api/webhooks/*`), real-time
webhook notifications via SignalR, and new entity models
(`Webhook` and `WebhookBucket`). Updated the Angular 19 frontend
to support webhook capture and inspection.
Updated documentation to reflect architectural changes, removed
EF Core dependencies, and added new dependencies for RoboDodd.OrmLite.
Revised project structure and patterns to align with the new ORM.
Copy file name to clipboardExpand all lines: CLAUDE.md
+26-19Lines changed: 26 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,22 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
5
5
## Project Overview
6
6
7
7
MailVoid is a developer email testing tool with two main components:
8
-
-**Backend API**: C# .NET 9 web API that manages emails, authentication, and webhook integration
9
-
-**Frontend**: Angular 19 web application for viewing and managing test emails
8
+
-**Backend API**: C# .NET 10 web API that manages emails, authentication, and webhook integration
9
+
-**Frontend**: Angular 19 web application for viewing and managing test emails and webhooks
10
10
11
-
The application receives webhook events from your mail server and stores emails in a MySQL database for developers to view through the web interface.
11
+
The application receives webhook events from your mail server and stores emails in a MySQL database for developers to view through the web interface. It also includes a webhook capture feature for testing HTTP webhooks.
12
12
13
13
## Architecture
14
14
15
15
### Backend (src/MailVoidApi/)
16
-
-**Controllers**: REST API endpoints for authentication, mail management, and webhooks
17
-
-**Services**: Core business logic including AuthService, MailGroupService, UserService, and background task processing
18
-
-**Models**: Entity classes for User, Mail, MailGroup, and RefreshToken with Entity Framework annotations
19
-
-**Data**: MailVoidDbContext for Entity Framework Core database operations
16
+
-**Controllers**: REST API endpoints for authentication, mail management, webhook capture, and webhook management
17
+
-**Services**: Core business logic including AuthService, MailGroupService, UserService, WebhookBucketService, and background task processing
18
+
-**Models**: Entity classes for User, Mail, MailGroup, RefreshToken, Webhook, and WebhookBucket with RoboDodd.OrmLite annotations
19
+
-**Data**: DatabaseService for RoboDodd.OrmLite database operations (Dapper-based)
20
20
-**Common**: Shared utilities including pagination, caching (TimedCache), and database extensions
21
21
-**Authentication**: JWT-based authentication with refresh token support
22
-
-**Database**: MySQL with Entity Framework Core 8 and Pomelo MySQL provider
23
-
-**Real-time**: SignalR hub for real-time email notifications
22
+
-**Database**: MySQL with RoboDodd.OrmLite (Dapper-based micro ORM)
23
+
-**Real-time**: SignalR hub for real-time email and webhook notifications
24
24
25
25
### Frontend (src/MailVoidWeb/)
26
26
-**Architecture**: Angular 19 standalone components with reactive forms and routing
@@ -39,7 +39,7 @@ The application receives webhook events from your mail server and stores emails
39
39
dotnet run # Run API (also starts frontend via SPA proxy)
40
40
dotnet build # Build the API
41
41
dotnet test# Run tests (if any exist)
42
-
dotnet ef database update # Apply database migrations
42
+
# Note: Database tables are created automatically on startup (no migrations needed)
43
43
```
44
44
45
45
### Frontend (Angular)
@@ -70,12 +70,15 @@ npm run format # Format code with Prettier
70
70
## Key Patterns
71
71
72
72
### Backend Patterns
73
-
- Controllers use Entity Framework Core with Pomelo MySQL provider for database operations
73
+
- Controllers use RoboDodd.OrmLite (Dapper-based) for database operations
74
+
- Use `db.From<T>()` for fluent query building with `.Where()`, `.OrderBy()`, `.Limit()`
75
+
- Use `db.SelectAsync<T>()`, `db.SingleAsync<T>()`, `db.InsertAsync()`, `db.UpdateAsync()`, `db.DeleteAsync()`
76
+
- Use `db.CountAsync<T>()` for counting records
74
77
- JWT authentication with refresh token rotation
75
78
- Background task queue for async operations
76
79
- Pagination implemented via PagedResults<T> utility
77
80
- Custom exception handling and logging
78
-
-DbContext pattern with MailVoidDbContext for data access
81
+
-DatabaseService pattern for connection management
79
82
80
83
### Frontend Patterns
81
84
- Standalone Angular components (no NgModules)
@@ -102,6 +105,8 @@ npm run format # Format code with Prettier
102
105
-**MailGroup**: Rules-based email organization with retention policies
103
106
-**RefreshToken**: Secure token rotation for authentication
104
107
-**UserMailRead**: Tracking read status for emails per user
108
+
-**Webhook**: Captured HTTP webhook requests
109
+
-**WebhookBucket**: Organization for webhook captures with retention policies
105
110
106
111
## Default Credentials
107
112
- Username: admin
@@ -113,19 +118,21 @@ npm run format # Format code with Prettier
113
118
-`/api/mailgroup/*`: Mail group management
114
119
-`/api/user/*`: User management and settings
115
120
-`/api/health`: Health check endpoint
121
+
-`/api/hook/{bucket}`: Webhook capture endpoint (POST/PUT/PATCH - no auth required)
122
+
-`/api/webhooks/*`: Webhook management API (requires auth)
116
123
-`/webhooks/mail`: Mail server webhook endpoint
117
124
-`/mailHub`: SignalR hub for real-time notifications
0 commit comments