![]() |
VOOZH | about |
dotnet add package SaaS-Factory.AppBlueprint.Contracts --version 1.0.6
NuGet\Install-Package SaaS-Factory.AppBlueprint.Contracts -Version 1.0.6
<PackageReference Include="SaaS-Factory.AppBlueprint.Contracts" Version="1.0.6" />
<PackageVersion Include="SaaS-Factory.AppBlueprint.Contracts" Version="1.0.6" />Directory.Packages.props
<PackageReference Include="SaaS-Factory.AppBlueprint.Contracts" />Project file
paket add SaaS-Factory.AppBlueprint.Contracts --version 1.0.6
#r "nuget: SaaS-Factory.AppBlueprint.Contracts, 1.0.6"
#:package SaaS-Factory.AppBlueprint.Contracts@1.0.6
#addin nuget:?package=SaaS-Factory.AppBlueprint.Contracts&version=1.0.6Install as a Cake Addin
#tool nuget:?package=SaaS-Factory.AppBlueprint.Contracts&version=1.0.6Install as a Cake Tool
👁 NuGet Version
👁 License: MIT
The AppBlueprint.Contracts package provides a shared library of Data Transfer Objects (DTOs) for client-server communication. This package contains request and response models that define the contract between the API and its clients, following Clean Architecture principles.
dotnet add package SaaS-Factory.AppBlueprint.Contracts
This package has minimal dependencies:
using AppBlueprint.Contracts.Baseline.Authentication;
// Login request
var loginRequest = new LoginRequest
{
Email = "user@example.com",
Password = "SecurePassword123!"
};
// Login response
public class LoginResponse
{
public string AccessToken { get; set; }
public string RefreshToken { get; set; }
public DateTime ExpiresAt { get; set; }
}
using AppBlueprint.Contracts.Baseline.Profile;
// Create profile request
var createProfileRequest = new CreateProfileRequest
{
FirstName = "John",
LastName = "Doe",
DateOfBirth = new DateTime(1990, 1, 1),
Gender = "Male",
UserName = "johndoe",
IsActive = true,
Language = "en-US",
Timezone = DateTime.UtcNow,
Avatar = "https://example.com/avatar.jpg",
Slug = "john-doe"
};
// Profile response
public class ProfileResponse
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
public DateTime DateOfBirth { get; set; }
public string? Gender { get; set; }
public string? UserName { get; set; }
public bool IsActive { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset LastLogin { get; set; }
public string? Language { get; set; }
public DateTime Timezone { get; set; }
public string? Avatar { get; set; }
public string? Slug { get; set; }
}
using AppBlueprint.Contracts.B2B.Team;
// Create team request
var createTeamRequest = new CreateTeamRequest
{
Name = "Development Team",
Description = "Our awesome dev team",
TenantId = tenantId
};
// Team member invitation
var inviteRequest = new InviteTeamMemberRequest
{
Email = "newmember@example.com",
Role = "Developer"
};
AppBlueprint.Contracts/
├── Baseline/
│ ├── Authentication/
│ │ ├── Requests/
│ │ │ ├── LoginRequest.cs
│ │ │ └── RegisterRequest.cs
│ │ └── Responses/
│ │ └── LoginResponse.cs
│ ├── Profile/
│ │ ├── Requests/
│ │ │ ├── CreateProfileRequest.cs
│ │ │ └── UpdateProfileRequest.cs
│ │ └── Responses/
│ │ └── ProfileResponse.cs
│ └── Payment/
│ └── Requests/
│ └── ProfileRequest.cs
├── B2B/
│ ├── Team/
│ ├── Tenant/
│ └── Subscription/
├── B2C/
│ └── (Future B2C-specific contracts)
└── Admin/
└── (Future admin-specific contracts)
required keyword for mandatory properties{Action}{Entity}Request (e.g., CreateUserRequest){Entity}Response or {Action}{Entity}ResponseIWhile this package doesn't include validation logic, it's designed to work with:
// Example with FluentValidation (in Application layer)
public class CreateProfileRequestValidator : AbstractValidator<CreateProfileRequest>
{
public CreateProfileRequestValidator()
{
RuleFor(x => x.FirstName).NotEmpty().MaximumLength(50);
RuleFor(x => x.LastName).NotEmpty().MaximumLength(50);
RuleFor(x => x.UserName).NotEmpty().MaximumLength(30);
RuleFor(x => x.Email).EmailAddress();
}
}
This package follows semantic versioning:
⚠️ Breaking Changes: Adding required properties or removing properties are breaking changes.
When contracts change:
// Before
public class UserResponse
{
public string Name { get; set; }
}
// After - Add nullable property (non-breaking)
public class UserResponse
{
public string Name { get; set; }
public string? Email { get; set; } // New optional property
}
// This requires a major version bump
// Deprecate first, remove in next major version
[Obsolete("Use NewProperty instead")]
public string OldProperty { get; set; }
This package is part of the AppBlueprint ecosystem:
This package is part of the SaaS Factory Labs AppBlueprint template. Contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on SaaS-Factory.AppBlueprint.Contracts:
| Package | Downloads |
|---|---|
|
SaaS-Factory.AppBlueprint.Application
Application layer with CQRS commands, queries, and use cases following Clean Architecture principles |
|
|
SaaS-Factory.AppBlueprint.Presentation.ApiModule
Presentation layer with API endpoints, controllers, and middleware following Clean Architecture principles |
This package is not used by any popular GitHub repositories.