I'm excited to share EasyMessages - a lightweight .NET library that provides standardized, reusable messages for all scenarios.
The Real Problem
How many times has this happened to you?
// You write this
return BadRequest(new { message = "Invalid credentials" });
// QA flags it: "Can you make it more descriptive?"
// You change it
// QA flags it again: "Should match our other auth messages"
// Repeat...
Message wording is the most time-consuming and cumbersome part of development. QA will always have feedback. So I decided to standardize it.
The Solution
using RecurPixel.EasyMessages;
// Pre-built, standardized messages
Msg.Auth.LoginFailed().ToJson();
Msg.Crud.Created("User").ToConsole();
Msg.Validation.RequiredField("Email").ToJson();
Standardized. Clear. No more back-and-forth.
Why I Built This
As developers, we shouldn't waste mental energy on:
- "How should I word this error?"
- "What message should I show for successful creation?"
- "Is this validation message clear enough?"
Let the library handle it. Focus on your business logic.
Key Features
- ✅ 100+ pre-built messages (success, error, validation, info, warnings)
- ✅ Zero configuration
- ✅ IntelliSense-friendly
- ✅ All message types covered
- ✅ Multiple output formats
- ✅ Extensible
Message Categories
- Authentication - Login, logout, tokens, permissions
- CRUD Operations - Created, updated, deleted, not found
- Validation - Required fields, formats, ranges
- System - Errors, processing, maintenance
- Database - Connection, queries, transactions
- Files - Upload, download, validation
- Network - Timeouts, service issues
Quick Start
dotnet add package RecurPixel.EasyMessages --version 0.1.0-alpha.1
// Your first message in 5 seconds
Msg.Auth.LoginFailed().ToConsole(useColors: true);
// Success messages
Msg.Crud.Updated("Profile").ToJson();
// Validation messages
Msg.Validation.InvalidFormat("Email").ToConsole();
What's Coming
This is an alpha release. Here's the roadmap:
-
Beta (2 weeks): ASP.NET Core integration,
.ToApiResponse(), DI support - v1.0 (6 weeks): Production-ready, 200+ messages, full docs
I Need Your Help!
This is an early preview. I'm looking for:
- Feedback on the API design
- Bug reports
- Feature suggestions
- What messages do YOU write over and over?
Try it out and let me know what you think!
🔗 Links:
Top comments (0)