Infrastructure,
Simplified.
A suite of focused .NET libraries — distributed via private NuGet — that wrap AWS services into clean, expressive C# APIs. Stop fighting SDKs. Ship in minutes, not days.
Stop writing boilerplate. Start shipping.
The same DynamoDB query — on the left, raw AWS SDK with manual credential wiring, expression attributes, and dictionary marshalling. On the right, idiomatic C# with Kanject.Core.NoSqlDatabase. Drag to compare.
You write this. We generate that.
Kanject.Core ships with Roslyn source generators and analyzers that turn a handful of attributes into a full, type-safe repository layer — compiled at build time. No reflection, no runtime surprises, no wrong-way-to-hold-it.
// <auto-generated> by Kanject.SourceGen — do not edit </auto-generated>
// Generated at build time from [Repository], [EntityRepository<T>],
// [EmbedRepository<T>] and [DbContext] attributes.
namespace Kanject.Insights.Provider.Aws.Abstractions.Repositories;
public partial class CohortInsightRepository : RepositoryBase<CohortInsightEntity>
{
private readonly KanjectInsightDbContext _dbContext;
private readonly IEntityRepository<CohortInsightDefinitionEntity> _definitions;
private readonly IEntityRepository<CohortActivityInsightDefinitionEntity> _activityDefs;
private readonly IEntityRepository<List<CohortInsightMetricEntity>> _metrics;
private readonly IEntityRepository<List<CohortInsightFilterEntity>> _filters;
private readonly IEntityRepository<List<CohortInsightAlertRuleEntity>> _alertRules;
private readonly IEntityRepository<List<CohortInsightAlertStateEntity>> _alertStates;
private readonly CohortSnapshotRepository _snapshots;
public CohortInsightRepository(
KanjectInsightDbContext dbContext,
IEntityRepository<CohortInsightDefinitionEntity> definitions,
IEntityRepository<CohortActivityInsightDefinitionEntity> activityDefs,
IEntityRepository<List<CohortInsightMetricEntity>> metrics,
IEntityRepository<List<CohortInsightFilterEntity>> filters,
IEntityRepository<List<CohortInsightAlertRuleEntity>> alertRules,
IEntityRepository<List<CohortInsightAlertStateEntity>> alertStates,
CohortSnapshotRepository snapshots)
: base(dbContext, version: 2)
{
_dbContext = dbContext;
_definitions = definitions;
_activityDefs = activityDefs;
_metrics = metrics;
_filters = filters;
_alertRules = alertRules;
_alertStates = alertStates;
_snapshots = snapshots;
}
// + 340 lines: typed getters, migrations, health checks,
// DI registration, batch helpers, analyzer hints…
}Every build emits a manual.
Every Kanject Core library writes a comprehensive Markdown spec at compile time — generated repositories, key templates, indexes, queues, event topics, cache contexts. The same source-generator pass that emits typed C# also emits the README, in full. Drop the file straight into your AI assistant for instant, accurate codebase context.
using Kanject.Core.NoSqlDatabase.Provider.DynamoDb.Annotations.Attributes;
[Repository(Entity = typeof(CountryEntity), Version = 2)]
[DbContext(typeof(ConfigurationDbContext))]
[EntityRepository<CountryDialingCodeEntity>]
[EntityRepository<List<CountrySeasonEntity>>]
[EntityRepository<List<CountrySetupEntity>>]
[EmbedRepository<PayoutProviderRepository>]
[EmbedRepository<ShippingProviderRepository>]
[DynamoDbGsi(name: "country-by-iso", pk: "iso2", sk: "name")]
public partial class CountryRepository;
// 11 lines. The source generator does the rest… Trifted.Configuration.Data — DynamoDB Schema Reference
| Database Contexts | 1 |
| Repositories | 19 |
| Global Secondary Indexes | 2 |
| Item Collections | 1 |
| Embedded Repositories | 7 |
| Unique Entities | 29 |
| Key Templates | 84 |
| Kanject Indexes | 26 |
- Quick Overview
- Core Concepts & Glossary
- Common Tasks
- Constraints & Invariants
- Single-Table Key Design
- Database Contexts
- Repositories 19
- Global Secondary Indexes
- Capacity & Throughput
- Hot Partition Risk Analysis
- WCU/RCU Cost per Access Pattern
- CloudWatch Alarm Recommendations
- Security Posture & IAM Actions
- Method Quick Reference
- … 13 more sections
Kanject.Core.NoSqlDatabase
A clean .NET wrapper around AWS DynamoDB. Handles connection pooling, error retries, and type marshalling automatically — so you write clean, readable C# instead of fighting the SDK.
using Kanject.Core.NoSqlDatabase.Provider.DynamoDbV2.Extensions;
// Register once in Program.cs — options pattern, env-aware
builder.Services.AddDynamoNoSqlDatabase(options =>
{
options.Namespace = appSettings.DatabaseNamespace;
options.AccessKey = appSettings.AwsAccessKeyId;
options.SecretKey = appSettings.AwsAccessSecretKey;
options.AwsRegion = appSettings.AwsRegion;
#if DEBUG
options.EnableDbMigration();
options.EnableDebugLogging();
#endif
});
// Inject anywhere — self-documenting repository pattern
public class ProductRepository(INoSqlDatabase db)
{
public Task<IReadOnlyList<Product>> GetByCategoryAsync(string category)
=> db.QueryAsync<Product>(
partitionKey: $"category#{category}",
sortKeyPrefix: "product#",
limit: 20);
} Kanject.Core.Queue + Logs
Async-first SQS wrapper with built-in dead-letter queue support and retry logic. Pair with Kanject.Core.Logs for structured, correlated log output — all in a few lines of C#.
using Kanject.Core.Queue.Extensions;
using Kanject.Core.Logs.Extensions;
builder.Services.AddSqsQueue(options =>
{
options.AwsRegion = appSettings.AwsRegion;
options.DeadLetterQueueEnabled = true;
options.MaxRetries = 3;
});
builder.Services.AddKanjectLogs();
// Inject — clean async API, structured logs correlated by request
public class OrderService(IQueueService queue, ILogger<OrderService> log)
{
public async Task PlaceAsync(Order order)
{
await queue.SendAsync("order-processing", order);
log.LogInformation("Order queued {OrderId}", order.Id);
}
} Kanject.Core.FileRepository + Secrets
File storage done right — automatic content-type detection, presigned URLs, and access control. Pair with Kanject.Core.Secrets for safe AWS Secrets Manager retrieval in any environment.
using Kanject.Core.FileRepository.Provider.AwsS3.Extensions;
using Kanject.Core.Secrets.Extensions;
builder.Services.AddAwsS3FileRepository(options =>
{
options.BucketName = fileSettings.BucketName;
options.Region = appSettings.AwsRegion;
options.FileServerBaseUrl = fileSettings.FileServerBaseUrl;
options.ResourceTypeDefinitions.AddResourceTypeDefinitions();
});
builder.AddAwsSystemManagerParameterStore(); // zero-config secrets
// Inject both — presigned URLs, content-type auto-detection
public class AvatarService(IFileRepository files, ISecretsProvider secrets)
{
public Task<string> UploadAsync(Stream stream, Guid userId)
=> files.UploadAsync(stream, $"avatars/{userId}.png", isPublic: true);
} Simplify your cloud
journey today.
Join forward-thinking developers and businesses who trust Kanject to eliminate cloud complexity and accelerate innovation.