Rapid.Microservice.Framework by Aruna Devadiga
Rapid.Microservice.Framework is a plugin-based .NET microservice framework designed for lightning-fast service development. It handles endpoint creation, database management, and job execution out-of-the-box — letting developers focus entirely on business logic.
🚀 Key Features
✅ Auto-generates REST APIs from your plugins along with standard APIs
✅ Automatically creates controller classes for all your model or data model classes
⏱️ Scheduled job execution with simple XML config
💾 Automatic database handling using plugin-based storage engines
🔍 Built-in logging and monitoring for easy debugging
🔄 Plugin architecture for easy extensibility and customization
🔒 Multi-tenancy support with AppId-based data separation
💾 Built-in storage support with SQLite and other pluggable DBs
📡 RESTful querying based on AppId (multi-project/multi-tenant)
⚙️ Self-contained Windows Service for seamless deployment
🔌 Plugin-based development and logic execution (via Jobs)
🧩 Ideal for SaaS and enterprise tools
🛠️ Windows service ready-to-run executable included after build
📦 Installation
dotnet add package Rapid.Microservice.Framework.Core
🛠️ Getting Started
📝 Requirement
You want a microservice to:
-
Read line coverage metrics from nightly build dumps.
-
Save snapshot data per project.
-
Expose historical coverage trends via REST APIs.
1️⃣ Create Your Job Plugin Project
Create a Class Library project targeting .NET Framework 4.8.
Add a reference to latest Rapid.Microservice.Framework.Core.
dotnet add package Rapid.Microservice.Framework.Core
2️⃣ Define DTO & Job Class
DTO Class: CodeCoverageDto.cs
[AutoController("CodeCoverage")]
public class CodeCoverageDataResponse : BasicResponse
{
public double LineCoverage { get; set; }
public string Project { get; set; }
}
Job Class: CodeCoverageJob.cs
using System;
using Rapid.Microservices.Framework.Core.Common.Logger;
using Rapid.Microservices.Framework.Core.DataAccess;
using Rapid.Microservices.Framework.Core.Infrastructure.JobManager;
using Rapid.Microservices.Controller.PlugIn.Sample.ResponseModels;
namespace Rapid.Microservices.Controller.PlugIn.Sample.Jobs
{
public class CodeCoverageJob : Job<CodeCoverageDataResponse>
{
public override void DoJob(string date, IJobConfiguration jobConfiguration)
{
var AppId = jobConfiguration.AppId;
var project = jobConfiguration.Config["Project"];
var coverageDumpPath = jobConfiguration.Config["CoverageDumpPath"];
var lineCoverage = ReadCodeCoverageFromDump(coverageDumpPath);
try
{
var result = new CodeCoverageDataResponse
{
AppId = appId,
LineCoverage = lineCoverage,
ReportDate = date,
Project = project
};
Save(result);
}
catch (Exception exception)
{
LoggerService.Error(this, $"Reading CodeCoverage Metrics for {appId} failed", exception);
}
}
}
private double ReadCodeCoverageFromDump(string path)
{
return 78.5;
}
}
1️⃣ Using [AutoController("controllername")] class attribute or/and create the Controller Class
By default, the framework automatically generates controller for all DTO classes with the [AutoController] class level attribute. This allows you to access the API endpoints without creating a controller class manually.
Example:
- In above example, CodeCoverageDto class carries [AutoController("CodeCoverage")], hence the framework creates
CodeCoverageController
class automatically.
- Users can access its API endpoints by referencing CodeCoverage in the URL
In case you want to create a custom controller class to add more REST APIs, you can do so by creating a new class and inheriting from BaseController<T>
.
Create a CodeCoverageController.cs
file in your plugin project:
public class CodeCoverageController : BaseController<CodeCoverageDto>
{
}
Both AutoController and Custom Controller class leverages built-in APIs from BaseController for:
/api/CodeCoverage/DataJson/AppId | Latest snapshot data by AppId |
/api/CodeCoverage/TrendDataJson/AppId/30 | Historical trend data by AppId and duration in days |
/api/CodeCoverage/PredictionDataJson/AppId | Forecasted snapshot data (if enabled) |
/api/CodeCoverage/PredictionTrendDataJsonAppId/30 | Trend of predictions over time |
Feel free to extend CodeCoverageController with additional custom APIs to meet your business logic needs.
3️⃣ Build the Project
After building, your output bin folder will include:
- Rapid.Microservices.Framework.Service.exe
- configurations/
- Sample_ServiceConfiguration.xml
- Sample_JobConfiguration.xml
- install_service.bat
- uninstall_service.bat
- readme.md
- license.txt
- other binaries
Then rename Sample_ServiceConfiguration.xml to ServiceConfiguration.xml and Sample_JobConfiguration.xml to JobConfiguration.xml
4️⃣ Deploy the Service
Copy all files from bin to your deployment folder:
D:\Microservices\CodeCoverage\
5️⃣ Configure the Service
Edit ServiceConfiguration.xml
<Configurations>
<Service>
<Id>CodeCoverage</Id>
<Name>Code Coverage Service</Name>
<DisplayName>Code Coverage Service</DisplayName>
<Description>Provides snapshot and trend of line coverage for projects</Description>
<Host>localhost</Host>
<Protocol>http</Protocol>
<Port>8010</Port>
<DbPlugIn>sqlite</DbPlugIn>
<PlugIns>CodeCoverage.PlugIn.dll</PlugIns>
<LogFilePath>D:\Microservices\CodeCoverage\logs</LogFilePath>
</Service>
<Jobs>
<Job>
<Name>CodeCoverageJob</Name>
<Enabled>True</Enabled>
<Interval>180</Interval>
</Job>
</Jobs>
<Notification>
<EmailIds>
<To>support@@vedicaai.com</To>
<Cc>operator@@vedicaai.com</Cc>
</EmailIds>
</Notification>
</Configurations>
Then in ServiceConfiguration.xml
📝 Update <PlugIns
> to your dll name.
🕒 <Interval
> is in minutes (e.g., 180 = every 3 hours).
Edit JobConfiguration.xml
Copy
Edit
<Configurations>
<Jobs>
<Job>
<Name>CodeCoverageJob</Name>
<AppId>DataElement-123</AppId>
<Project>MyProjectName</AppId>
<CoverageDumpPath>C:\Build\Artifacts\Coverage\</CoverageDumpPath>
</Job>
</Jobs>
</Configurations>
🆔 Set a unique for each Data Element.
6️⃣ Install and Run the Windows Service
Run from deployment folder:
install_service.bat
Then open Services (services.msc), locate Code Coverage Service, and start it.
🌐 Query via REST API
Once the job runs and saves data, retrieve snapshot data using:
GET http://localhost:8010/api/CodeCoverage/DataJson/DataElement-123
Here, DataElement-123
is the AppId and is case sensitive.
✅ Example Response => Latest Data Element
{
"AppId": "DataElement-123",
"LineCoverage": 78.5,
"ReportDate": "2025-04-04",
"timestamp": "2025-04-04T22:00:00Z",
"Project": "MyProjectName"
}
Also to retrieve trend data using:
GET http://localhost:8010/api/CodeCoverage/TrendDataJson/myproject-123/4
Here, DataElement-123
is the AppId and 4
is the number of days data to fetch.
✅ Example Response => List of Data Elements
[
{
"AppId": "DataElement-123",
"LineCoverage": 78.5,
"ReportDate": "2025-04-04",
"timestamp": "2025-04-04T22:00:00Z",
"Project": "MyProjectName"
},
{
"AppId": "DataElement-123",
"LineCoverage": 77.5,
"ReportDate": "2025-04-03",
"timestamp": "2025-04-03T22:00:00Z",
"Project": "MyProjectName"
},
{
"AppId": "DataElement-123",
"LineCoverage": 74.5,
"ReportDate": "2025-04-02",
"timestamp": "2025-04-02T22:00:00Z",
"Project": "MyProjectName"
},
{
"AppId": "DataElement-123",
"LineCoverage": 72.5,
"ReportDate": "2025-04-01",
"timestamp": "2025-04-01T22:00:00Z",
"Project": "MyProjectName"
}
]
🧩 Multi-Tenancy & Data Segregation
-
AppId uniquely identifies each Data Element
-
All saved Data Element is retrieved using AppId
-
REST APIs return only Data Element for the specified AppId
🔄 Job Scheduling
-
Jobs run at intervals configured in ServiceConfiguration.xml
-
Each job runs in its own execution context
-
Additional job classes can be added as needed and configured separately in JobConfiguration.xml
💼 Use Cases
-
Metrics collection services
-
Build/test/deployment tracking
-
Health check monitors
-
Custom backend APIs for dashboards
-
Internal microservices for enterprise systems
-
Scheduled microservices (ETL, metrics, data scrapers)
-
Internal tools (build monitors, test metrics, deployment logs)
-
SaaS dashboards with project-specific APIs
🧰 Additional Notes
-
Multi-Tenant Design: AppId enables scoped data separation per data element/project.
-
Logging: Log path configurable in ServiceConfiguration.xml.
-
Database: Use sqlite, postgresql, mssql via plugin-based backends.
-
Job Scheduling: Supports any number of jobs with independent schedules.
-
Plugin Architecture: Easily extend functionality by creating new plugins.
📃 License
The Core Framework is not open-source, but is freely distributed via NuGet.
This software is a personal passion project, developed and shared freely for the benefit of the community. It is intended to support learning, experimentation, research, in-house business applications and personal use in non-commercial settings.
📧 aruna.devadiga@gmail.com
🙋 Support & Contributions
This framework is not open source, but it is freely distributed via NuGet.
If you encounter issues, bugs, or have suggestions, feel free to reach out to the maintainers or submit feedback via the appropriate support channels.
📧 aruna.devadiga@gmail.com
📍 Quick Reference
Package Name | Rapid.Microservice.Framework.Core |
Service Entry Point | Rapid.Microservices.Framework.Service.exe |
Config Directory | bin/configuration/ |
Endpoint Format - Snapshot data | /api/controller/datajson/appid |
Endpoint Format - Trend data | /api/controller/trenddatajson/appid/duration |
Install Command | install_service.bat |
Uninstall Command | uninstall_service.bat |