.NET development that just works. Add a module, it spins up automagically with sane defaults. Zero scaffolding, reduced cognitive load.
Complex enterprise patterns shouldn't break your concentration. Sora modules snap together and auto-configure, so you stay in the zone.
Want a ready-to-use API? Add Sylin.Sora.Web
. MongoDB?
Snap in Sylin.Sora.Data.Mongo
and done. It discovers defaults,
sets up structures, handles scaffoldingβso you don't have to.
Stop remembering 47 different setup steps. Sane defaults get you productive immediately. Customize when you need to, not because you have to.
No more endless configuration files, startup registrations, or repetitive CRUD controllers. Define entities, get APIs automatically.
Built for containers, microservices, and cloud deployment. Health checks, observability, and graceful degradation included.
Vector stores, embeddings, and agent endpoints out of the box. Add AI capabilities without the complexity. (Planned)
Battle-tested patterns: CQRS, Event Sourcing, DDD. Comprehensive logging, metrics, and error handling built in.
# Install templates first
dotnet new install Sylin.Sora.Templates::0.1.0-preview
# Choose your starting point
dotnet new sora-tiny-api -n MyApi # JSON storage
dotnet new sora-tiny-app -n MyApp # SQLite
dotnet new sora-tiny-docker -n MyApp # MongoDB + Docker
dotnet new sora-tiny-worker -n MyApp # Background service
public class Todo : Entity<Todo>
{
public string Title { get; set; } = string.Empty;
public bool IsCompleted { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
var builder = WebApplication.CreateBuilder(args);
// This single line configures everything
builder.Services.AddSora();
var app = builder.Build();
// Auto-discovers modules and sets up endpoints
app.UseSora();
app.Run();
You now have:
Each module is a Lego piece that auto-configures when added to your project. Mix and match to build exactly what you need.
File-based storage. Perfect for prototypes and demos.
Embedded SQL database. Zero configuration required.
MongoDB adapter with auto-configuration.
SQL helpers and string-query support.
RESTful APIs, middleware, and web hosting.
RabbitMQ integration for message-driven architecture.
CQRS primitives and command/query patterns.
Vector stores, embeddings, and AI agent endpoints. (Planned)
// Define your entity
public class Product : Entity<Product>
{
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
public string Category { get; set; } = string.Empty;
}
// Use it anywhere
var product = await new Product
{
Name = "Laptop",
Price = 999.99m,
Category = "Electronics"
}.Save();
// Query with filtering
var electronics = await Product.Where(p => p.Category == "Electronics");
var expensive = await Product.Where(p => p.Price > 500);
// Get by ID
var found = await Product.Get(product.Id);
Automatic REST endpoints created at /api/products
// Command with validation
public record CreateOrderCommand(string CustomerId, List<OrderItem> Items)
: ICommand<Order>;
public class CreateOrderHandler : ICommandHandler<CreateOrderCommand, Order>
{
public async Task<Order> Handle(CreateOrderCommand command)
{
// Business logic here
var order = new Order(command.CustomerId, command.Items);
// Events are automatically captured and published
order.AddEvent(new OrderCreatedEvent(order.Id, order.Total));
return await order.Save();
}
}
// Query with projections
public class OrderSummaryQuery : IQuery<List<OrderSummary>>
{
public string CustomerId { get; set; }
}
public class OrderSummaryHandler : IQueryHandler<OrderSummaryQuery, List<OrderSummary>>
{
public async Task<List<OrderSummary>> Handle(OrderSummaryQuery query)
{
return await OrderSummary.Where(o => o.CustomerId == query.CustomerId);
}
}
// Add AI capabilities
builder.Services.AddSora()
.AddAiDefaults(); // Vector store + embeddings
// AI-searchable entity
public class Document : Entity<Document>, IVectorizable
{
public string Title { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
// Auto-generates embeddings on save
public string GetTextForEmbedding() => $"{Title} {Content}";
}
// Semantic search
app.MapPost("/search", async (string query) =>
{
var results = await Document.SimilaritySearch(query, limit: 10);
return results.Select(r => new { r.Document.Title, r.Score });
});
// AI agent endpoint
app.MapAgentEndpoints("/ai", config =>
{
config.WithSystemPrompt("You are a helpful document assistant");
config.WithVectorStore<Document>();
});
Automatic endpoints: /ai/chat
, /ai/embed
, /ai/search
// Define your business logic
public record CreateOrderCommand(string CustomerId, List<OrderItem> Items)
: ICommand<Order>;
// That's it. Sora handles:
// β
Command validation & handlers
// β
Event sourcing & outbox patterns
// β
API endpoint creation
// β
Health checks & observability
// β
Multi-store routing
// β
Error handling & logging
Task | Traditional Enterprise .NET | With Sora Framework |
---|---|---|
Add CQRS |
Install + configure MediatR Create handler base classes Wire up 47 registrations Debug mysterious DI issues |
Research best practices
dotnet add package Sylin.Sora.Data.Cqrs Handlers auto-generated β¨ |
Add Database |
Configure connection strings Setup DbContext Create repositories Handle migrations |
Choose an ORM
dotnet add package Sylin.Sora.Data.Sqlite Auto-configured on startup β¨ |
Create API |
Write CRUD actions Add validation Handle errors Configure routing |
Create controller
REST endpoints auto-generated |
Define entity class
Add Logging |
Set log levels Add structured logging Handle correlation IDs |
Configure providers
Structured, correlated, ready |
Included by default
Health Checks |
Configure endpoints Add custom checks Setup UI/monitoring |
Install packages
Database, cache, external services |
Auto-configured for all modules