This commit is contained in:
2026-04-29 20:58:36 -04:00
parent 20f8a14bfb
commit 43bcf449fd
126 changed files with 524 additions and 394 deletions

View File

@@ -1,4 +1,4 @@
namespace Socialize.Common.Domain;
namespace Socialize.Api.Common.Domain;
public abstract class Entity
{

View File

@@ -1,15 +1,16 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Socialize.Modules.Approvals.Data;
using Socialize.Modules.Assets.Data;
using Socialize.Modules.Clients.Data;
using Socialize.Modules.Comments.Data;
using Socialize.Modules.ContentItems.Data;
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Notifications.Data;
using Socialize.Modules.Projects.Data;
using Socialize.Modules.Workspaces.Data;
using Socialize.Api.Modules.Approvals.Data;
using Socialize.Api.Modules.Assets.Data;
using Socialize.Api.Modules.Clients.Data;
using Socialize.Api.Modules.Comments.Data;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Notifications.Data;
using Socialize.Api.Modules.Projects.Data;
using Socialize.Api.Modules.Workspaces.Data;
namespace Socialize.Data;
namespace Socialize.Api.Data;
public class AppDbContext(
DbContextOptions<AppDbContext> options)

View File

@@ -1,6 +1,7 @@
using System.Text;
using Socialize.Data;
using Socialize.Infrastructure.Security;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Facebook;
using Microsoft.AspNetCore.Authentication.Google;

View File

@@ -1,14 +1,2 @@
global using FluentValidation;
global using FastEndpoints;
global using JetBrains.Annotations;
global using Microsoft.EntityFrameworkCore;
global using Socialize.Data;
global using Socialize.Modules.Approvals.Data;
global using Socialize.Modules.Assets.Data;
global using Socialize.Modules.Clients.Data;
global using Socialize.Modules.Comments.Data;
global using Socialize.Modules.ContentItems.Data;
global using Socialize.Modules.Identity.Data;
global using Socialize.Modules.Notifications.Data;
global using Socialize.Modules.Projects.Data;
global using Socialize.Modules.Workspaces.Data;

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.BlobStorage.Contracts;
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
public static class CommonFileNames
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.BlobStorage.Contracts;
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
internal static class ContainerNames
{

View File

@@ -1,6 +1,6 @@
using System.Text;
namespace Socialize.Infrastructure.BlobStorage.Contracts;
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
public static class ContentTypes
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.BlobStorage.Contracts;
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
public interface IBlobStorage
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.BlobStorage.Contracts;
namespace Socialize.Api.Infrastructure.BlobStorage.Contracts;
public static class SubDirectoryNames
{

View File

@@ -1,9 +1,9 @@
using Azure;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models;
using Socialize.Infrastructure.BlobStorage.Contracts;
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
namespace Socialize.Infrastructure.BlobStorage.Services;
namespace Socialize.Api.Infrastructure.BlobStorage.Services;
public class AzureBlobStorage : IBlobStorage
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.Configuration;
namespace Socialize.Api.Infrastructure.Configuration;
public class WebsiteOptions
{

View File

@@ -1,12 +1,12 @@
using Socialize.Infrastructure.BlobStorage.Contracts;
using Socialize.Infrastructure.BlobStorage.Services;
using Socialize.Infrastructure.Configuration;
using Socialize.Infrastructure.Emailer.Configuration;
using Socialize.Infrastructure.Emailer.Contracts;
using Socialize.Infrastructure.Emailer.Services;
using Socialize.Infrastructure.Payments.Stripe.Configuration;
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
using Socialize.Api.Infrastructure.BlobStorage.Services;
using Socialize.Api.Infrastructure.Configuration;
using Socialize.Api.Infrastructure.Emailer.Configuration;
using Socialize.Api.Infrastructure.Emailer.Contracts;
using Socialize.Api.Infrastructure.Emailer.Services;
using Socialize.Api.Infrastructure.Payments.Stripe.Configuration;
namespace Socialize.Infrastructure;
namespace Socialize.Api.Infrastructure;
public static class DependencyInjection
{

View File

@@ -1,11 +1,21 @@
using Microsoft.EntityFrameworkCore;
using System.Security.Claims;
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Contracts;
using Socialize.Modules.Identity.Data;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Contracts;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Assets.Data;
using Socialize.Api.Modules.Approvals.Data;
using Socialize.Api.Modules.Comments.Data;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Clients.Data;
using Socialize.Api.Modules.Notifications.Data;
using Socialize.Api.Modules.Projects.Data;
using Socialize.Api.Modules.Workspaces.Data;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Options;
namespace Socialize.Infrastructure.Development;
namespace Socialize.Api.Infrastructure.Development;
public static class DevelopmentSeedExtensions
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.Development;
namespace Socialize.Api.Infrastructure.Development;
public record DevelopmentSeedOptions
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.Emailer.Configuration;
namespace Socialize.Api.Infrastructure.Emailer.Configuration;
public class EmailerOptions
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.Emailer.Contracts;
namespace Socialize.Api.Infrastructure.Emailer.Contracts;
public interface IEmailSender
{

View File

@@ -1,6 +1,6 @@
using Socialize.Infrastructure.Emailer.Contracts;
using Socialize.Api.Infrastructure.Emailer.Contracts;
namespace Socialize.Infrastructure.Emailer.Services;
namespace Socialize.Api.Infrastructure.Emailer.Services;
public class LoggerEmailSender(ILogger<IEmailSender> logger)
: IEmailSender

View File

@@ -1,9 +1,9 @@
using Socialize.Infrastructure.Emailer.Configuration;
using Socialize.Infrastructure.Emailer.Contracts;
using Socialize.Api.Infrastructure.Emailer.Configuration;
using Socialize.Api.Infrastructure.Emailer.Contracts;
using Microsoft.Extensions.Options;
using PostmarkDotNet;
namespace Socialize.Infrastructure.Emailer.Services;
namespace Socialize.Api.Infrastructure.Emailer.Services;
public class PostmarkEmailSender : IEmailSender
{

View File

@@ -1,11 +1,11 @@
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using Socialize.Infrastructure.Emailer.Configuration;
using Socialize.Infrastructure.Emailer.Contracts;
using Socialize.Api.Infrastructure.Emailer.Configuration;
using Socialize.Api.Infrastructure.Emailer.Contracts;
using Microsoft.Extensions.Options;
namespace Socialize.Infrastructure.Emailer.Services;
namespace Socialize.Api.Infrastructure.Emailer.Services;
public class ResendEmailSender : IEmailSender
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Socialize.Infrastructure.Payments.Stripe.Configuration;
namespace Socialize.Api.Infrastructure.Payments.Stripe.Configuration;
public class StripeOptions
{

View File

@@ -1,7 +1,7 @@
using System.Security.Claims;
using Socialize.Modules.Identity.Contracts;
using Socialize.Api.Modules.Identity.Contracts;
namespace Socialize.Infrastructure.Security;
namespace Socialize.Api.Infrastructure.Security;
public sealed class AccessScopeService
{

View File

@@ -1,6 +1,6 @@
using System.Security.Claims;
namespace Socialize.Infrastructure.Security;
namespace Socialize.Api.Infrastructure.Security;
public static class ClaimsPrincipalExtensions
{

View File

@@ -3,7 +3,7 @@ using System.Security.Claims;
using System.Text;
using Microsoft.IdentityModel.Tokens;
namespace Socialize.Infrastructure.Security;
namespace Socialize.Api.Infrastructure.Security;
public static class JwtTokenHelper
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.Security;
namespace Socialize.Api.Infrastructure.Security;
public static class KnownClaims
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Infrastructure.Security;
namespace Socialize.Api.Infrastructure.Security;
public class MissingClaimException(
string claimName)

View File

@@ -1,7 +1,7 @@
using System.Security.Cryptography;
using System.Text;
namespace Socialize.Infrastructure.Security;
namespace Socialize.Api.Infrastructure.Security;
// If we need to add special characters we can alternate between 2 pools.
public static class PasswordGenerator

View File

@@ -1,6 +1,6 @@
using System.Security.Cryptography;
namespace Socialize.Infrastructure.Security;
namespace Socialize.Api.Infrastructure.Security;
public static class RefreshTokenGenerator
{

View File

@@ -1,6 +1,6 @@
using System.Text.RegularExpressions;
namespace Socialize.Infrastructure.YouTube;
namespace Socialize.Api.Infrastructure.YouTube;
public static class YouTubeUrlHelper
{

View File

@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Socialize.Data;
using Socialize.Api.Data;
#nullable disable

View File

@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Socialize.Data;
using Socialize.Api.Data;
#nullable disable

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Approvals.Data;
namespace Socialize.Api.Modules.Approvals.Data;
public class ApprovalDecision
{

View File

@@ -1,4 +1,6 @@
namespace Socialize.Modules.Approvals.Data;
using Microsoft.EntityFrameworkCore;
namespace Socialize.Api.Modules.Approvals.Data;
public static class ApprovalModelConfiguration
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Approvals.Data;
namespace Socialize.Api.Modules.Approvals.Data;
public class ApprovalRequest
{

View File

@@ -1,6 +1,6 @@
using Socialize.Modules.Approvals.Data;
using Socialize.Api.Modules.Approvals.Data;
namespace Socialize.Modules.Approvals;
namespace Socialize.Api.Modules.Approvals;
public static class DependencyInjection
{

View File

@@ -1,8 +1,12 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using System.Security.Cryptography;
using Socialize.Infrastructure.Security;
using Socialize.Modules.Notifications.Contracts;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Approvals.Data;
using Socialize.Api.Modules.Notifications.Contracts;
namespace Socialize.Modules.Approvals.Handlers;
namespace Socialize.Api.Modules.Approvals.Handlers;
public record CreateApprovalRequestRequest(
Guid WorkspaceId,
@@ -39,7 +43,8 @@ public class CreateApprovalRequestHandler(
public override async Task HandleAsync(CreateApprovalRequestRequest request, CancellationToken ct)
{
ContentItem? contentItem = await dbContext.ContentItems
var contentItem = await dbContext
.ContentItems
.SingleOrDefaultAsync(
candidate => candidate.Id == request.ContentItemId && candidate.WorkspaceId == request.WorkspaceId,
ct);
@@ -57,7 +62,7 @@ public class CreateApprovalRequestHandler(
return;
}
ApprovalRequest approval = new()
var approval = new ApprovalRequest()
{
Id = Guid.NewGuid(),
WorkspaceId = request.WorkspaceId,

View File

@@ -1,6 +1,11 @@
using Socialize.Infrastructure.Security;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Modules.Approvals.Data;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Infrastructure.Security;
namespace Socialize.Modules.Approvals.Handlers;
namespace Socialize.Api.Modules.Approvals.Handlers;
public record GetApprovalsRequest(Guid ContentItemId);

View File

@@ -1,7 +1,12 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Notifications.Contracts;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Approvals.Data;
using Socialize.Api.Modules.Notifications.Contracts;
namespace Socialize.Modules.Approvals.Handlers;
namespace Socialize.Api.Modules.Approvals.Handlers;
public record SubmitApprovalDecisionRequest(
string Decision,

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Assets.Data;
namespace Socialize.Api.Modules.Assets.Data;
public class Asset
{

View File

@@ -1,4 +1,6 @@
namespace Socialize.Modules.Assets.Data;
using Microsoft.EntityFrameworkCore;
namespace Socialize.Api.Modules.Assets.Data;
public static class AssetModelConfiguration
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Assets.Data;
namespace Socialize.Api.Modules.Assets.Data;
public class AssetRevision
{

View File

@@ -1,6 +1,6 @@
using Socialize.Modules.Assets.Data;
using Socialize.Api.Modules.Assets.Data;
namespace Socialize.Modules.Assets;
namespace Socialize.Api.Modules.Assets;
public static class DependencyInjection
{

View File

@@ -1,7 +1,12 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Notifications.Contracts;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Assets.Data;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Notifications.Contracts;
namespace Socialize.Modules.Assets.Handlers;
namespace Socialize.Api.Modules.Assets.Handlers;
public record CreateAssetRevisionRequest(
string SourceReference,

View File

@@ -1,7 +1,12 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Notifications.Contracts;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Assets.Data;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Notifications.Contracts;
namespace Socialize.Modules.Assets.Handlers;
namespace Socialize.Api.Modules.Assets.Handlers;
public record CreateGoogleDriveAssetRequest(
Guid WorkspaceId,

View File

@@ -1,5 +1,9 @@
using Socialize.Infrastructure.Security;
namespace Socialize.Modules.Assets.Handlers;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
namespace Socialize.Api.Modules.Assets.Handlers;
public record GetAssetsRequest(Guid ContentItemId);
@@ -40,7 +44,7 @@ public class GetAssetsHandler(
public override async Task HandleAsync(GetAssetsRequest request, CancellationToken ct)
{
ContentItem? item = await dbContext.ContentItems
var item = await dbContext.ContentItems
.SingleOrDefaultAsync(candidate => candidate.Id == request.ContentItemId, ct);
if (item is null)
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Clients.Data;
namespace Socialize.Api.Modules.Clients.Data;
public class Client
{

View File

@@ -1,4 +1,6 @@
namespace Socialize.Modules.Clients.Data;
using Microsoft.EntityFrameworkCore;
namespace Socialize.Api.Modules.Clients.Data;
public static class ClientModelConfiguration
{

View File

@@ -1,6 +1,6 @@
using Socialize.Modules.Clients.Data;
using Socialize.Api.Modules.Clients.Data;
namespace Socialize.Modules.Clients;
namespace Socialize.Api.Modules.Clients;
public static class DependencyInjection
{

View File

@@ -1,8 +1,11 @@
using Socialize.Infrastructure.BlobStorage.Contracts;
using Socialize.Infrastructure.Security;
using Socialize.Modules.Clients.Data;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Clients.Data;
namespace Socialize.Modules.Clients.Handlers;
namespace Socialize.Api.Modules.Clients.Handlers;
public record ChangeClientPortraitRequest(
IFormFile File);

View File

@@ -1,5 +1,10 @@
using Socialize.Infrastructure.Security;
namespace Socialize.Modules.Clients.Handlers;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Modules.Clients.Data;
using Socialize.Api.Infrastructure.Security;
namespace Socialize.Api.Modules.Clients.Handlers;
public record CreateClientRequest(
Guid WorkspaceId,

View File

@@ -1,7 +1,10 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Clients.Data;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Clients.Data;
namespace Socialize.Modules.Clients.Handlers;
namespace Socialize.Api.Modules.Clients.Handlers;
public record GetClientsRequest(Guid? WorkspaceId);

View File

@@ -1,7 +1,10 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Clients.Data;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Clients.Data;
namespace Socialize.Modules.Clients.Handlers;
namespace Socialize.Api.Modules.Clients.Handlers;
public record UpdateClientRequest(
string Name,

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Comments.Data;
namespace Socialize.Api.Modules.Comments.Data;
public class Comment
{

View File

@@ -1,4 +1,6 @@
namespace Socialize.Modules.Comments.Data;
using Microsoft.EntityFrameworkCore;
namespace Socialize.Api.Modules.Comments.Data;
public static class CommentModelConfiguration
{

View File

@@ -1,6 +1,6 @@
using Socialize.Modules.Comments.Data;
using Socialize.Api.Modules.Comments.Data;
namespace Socialize.Modules.Comments;
namespace Socialize.Api.Modules.Comments;
public static class DependencyInjection
{

View File

@@ -1,7 +1,12 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Notifications.Contracts;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Comments.Data;
using Socialize.Api.Modules.Notifications.Contracts;
namespace Socialize.Modules.Comments.Handlers;
namespace Socialize.Api.Modules.Comments.Handlers;
public record CreateCommentRequest(
Guid WorkspaceId,

View File

@@ -1,6 +1,11 @@
using Socialize.Infrastructure.Security;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Modules.Comments.Data;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Infrastructure.Security;
namespace Socialize.Modules.Comments.Handlers;
namespace Socialize.Api.Modules.Comments.Handlers;
public record GetCommentsRequest(Guid ContentItemId);

View File

@@ -1,7 +1,12 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Notifications.Contracts;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Comments.Data;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Notifications.Contracts;
namespace Socialize.Modules.Comments.Handlers;
namespace Socialize.Api.Modules.Comments.Handlers;
public class ResolveCommentHandler(
AppDbContext dbContext,

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.ContentItems.Data;
namespace Socialize.Api.Modules.ContentItems.Data;
public class ContentItem
{

View File

@@ -1,4 +1,6 @@
namespace Socialize.Modules.ContentItems.Data;
using Microsoft.EntityFrameworkCore;
namespace Socialize.Api.Modules.ContentItems.Data;
public static class ContentItemModelConfiguration
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.ContentItems.Data;
namespace Socialize.Api.Modules.ContentItems.Data;
public class ContentItemRevision
{

View File

@@ -1,6 +1,6 @@
using Socialize.Modules.ContentItems.Data;
using Socialize.Api.Modules.ContentItems.Data;
namespace Socialize.Modules.ContentItems;
namespace Socialize.Api.Modules.ContentItems;
public static class DependencyInjection
{

View File

@@ -1,7 +1,12 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Notifications.Contracts;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Notifications.Contracts;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Workspaces.Data;
namespace Socialize.Modules.ContentItems.Handlers;
namespace Socialize.Api.Modules.ContentItems.Handlers;
public record CreateContentItemRequest(
Guid WorkspaceId,

View File

@@ -1,7 +1,11 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Notifications.Contracts;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Notifications.Contracts;
namespace Socialize.Modules.ContentItems.Handlers;
namespace Socialize.Api.Modules.ContentItems.Handlers;
public record CreateContentItemRevisionRequest(
string Title,

View File

@@ -1,7 +1,10 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.ContentItems.Data;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.ContentItems.Data;
namespace Socialize.Modules.ContentItems.Handlers;
namespace Socialize.Api.Modules.ContentItems.Handlers;
public record ContentItemDetailDto(
Guid Id,

View File

@@ -1,5 +1,10 @@
using Socialize.Infrastructure.Security;
namespace Socialize.Modules.ContentItems.Handlers;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.ContentItems.Data;
namespace Socialize.Api.Modules.ContentItems.Handlers;
public record ContentItemRevisionDto(
Guid Id,

View File

@@ -1,7 +1,10 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.ContentItems.Data;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.ContentItems.Data;
namespace Socialize.Modules.ContentItems.Handlers;
namespace Socialize.Api.Modules.ContentItems.Handlers;
public record GetContentItemsRequest(Guid? WorkspaceId, Guid? ClientId, Guid? ProjectId);

View File

@@ -1,8 +1,11 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.ContentItems.Data;
using Socialize.Modules.Notifications.Contracts;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.ContentItems.Data;
using Socialize.Api.Modules.Notifications.Contracts;
namespace Socialize.Modules.ContentItems.Handlers;
namespace Socialize.Api.Modules.ContentItems.Handlers;
public record UpdateContentItemStatusRequest(string Status);

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Identity.Configuration;
namespace Socialize.Api.Modules.Identity.Configuration;
public record JwtOptions
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Identity.Contracts;
namespace Socialize.Api.Modules.Identity.Contracts;
public interface IUserLookup
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Identity.Contracts;
namespace Socialize.Api.Modules.Identity.Contracts;
public static class KnownRoles
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Identity.Contracts;
namespace Socialize.Api.Modules.Identity.Contracts;
public record UserReference(
Guid Id,

View File

@@ -1,8 +1,8 @@
using System.Security.Claims;
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Models;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Models;
namespace Socialize.Modules.Identity.Data;
namespace Socialize.Api.Modules.Identity.Data;
public class IdentityService(
UserManager userManager,

View File

@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Identity;
namespace Socialize.Modules.Identity.Data;
namespace Socialize.Api.Modules.Identity.Data;
public class Role : IdentityRole<Guid>
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Identity;
namespace Socialize.Modules.Identity.Data;
namespace Socialize.Api.Modules.Identity.Data;
public class User : IdentityUser<Guid>
{

View File

@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Options;
namespace Socialize.Modules.Identity.Data;
namespace Socialize.Api.Modules.Identity.Data;
public sealed class UserManager(
IUserStore<User> store,

View File

@@ -1,11 +1,11 @@
using Socialize.Data;
using Socialize.Modules.Identity.Configuration;
using Socialize.Modules.Identity.Contracts;
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Services;
using Socialize.Api.Data;
using Socialize.Api.Modules.Identity.Configuration;
using Socialize.Api.Modules.Identity.Contracts;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Services;
using Microsoft.AspNetCore.Identity;
namespace Socialize.Modules.Identity;
namespace Socialize.Api.Modules.Identity;
public static class DependencyInjection
{

View File

@@ -1,8 +1,9 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ChangeAddressRequest(

View File

@@ -1,8 +1,9 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ChangeAliasRequest(

View File

@@ -1,8 +1,9 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ChangeBirthDateRequest(

View File

@@ -1,8 +1,9 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
using Microsoft.AspNetCore.Identity;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ChangeEmailRequest(

View File

@@ -1,8 +1,9 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ChangeFullnameRequest(

View File

@@ -1,8 +1,9 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ChangePhoneRequest(

View File

@@ -1,9 +1,10 @@
using Socialize.Infrastructure.BlobStorage.Contracts;
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ChangePortraitRequest(

View File

@@ -1,10 +1,11 @@
using System.Web;
using Socialize.Infrastructure.Configuration;
using Socialize.Infrastructure.Emailer.Contracts;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.Extensions.Options;
using System.Web;
using Socialize.Api.Infrastructure.Configuration;
using Socialize.Api.Infrastructure.Emailer.Contracts;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ForgotPasswordRequest(
@@ -53,29 +54,29 @@ public class ForgotPasswordHandler(
string message = $"""
<div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; color: #333;">
<h1 style="color: #2c3e50; margin-bottom: 20px;">Reset Your Socialize Password</h1>
<p style="font-size: 16px; line-height: 1.5; margin-bottom: 25px;">
Please click the button below to reset your password:
</p>
<div style="text-align: center; margin: 30px 0;">
<a href='{resetLink}'
style="background-color: #3498db;
color: white;
text-decoration: none;
padding: 12px 24px;
border-radius: 4px;
font-weight: bold;
display: inline-block;
<a href='{resetLink}'
style="background-color: #3498db;
color: white;
text-decoration: none;
padding: 12px 24px;
border-radius: 4px;
font-weight: bold;
display: inline-block;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
Reset Password
</a>
</div>
<p style="font-size: 14px; color: #7f8c8d; margin-top: 30px;">
If you did not request a password reset, please ignore this email.
</p>
<p style="font-size: 14px; color: #7f8c8d; margin-top: 20px;">
If the button doesn't work, you can copy and paste this link into your browser:
<br>

View File

@@ -1,9 +1,10 @@
using FastEndpoints;
using System.Security.Claims;
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Models;
using Socialize.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Models;
using Socialize.Api.Infrastructure.Security;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public class GetCurrentUserQueryHandler(

View File

@@ -1,8 +1,9 @@
using Socialize.Infrastructure.BlobStorage.Contracts;
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Models;
using FastEndpoints;
using Socialize.Api.Infrastructure.BlobStorage.Contracts;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Models;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public class GetCurrentUserPortraitHandler(

View File

@@ -1,10 +1,11 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Configuration;
using Socialize.Modules.Identity.Services;
using FastEndpoints;
using Microsoft.Extensions.Options;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Configuration;
using Socialize.Api.Modules.Identity.Services;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record LoginRequest(

View File

@@ -1,13 +1,14 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Configuration;
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Services;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Options;
using System.Text.Json;
using System.Text.Json.Serialization;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Configuration;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Services;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public class FacebookUserInfo

View File

@@ -1,13 +1,14 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Configuration;
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Services;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Options;
using System.Text.Json;
using System.Text.Json.Serialization;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Configuration;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Services;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
internal class GoogleToken
{

View File

@@ -1,10 +1,12 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Configuration;
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Services;
using FastEndpoints;
using Microsoft.Extensions.Options;
using Microsoft.EntityFrameworkCore;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Configuration;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Services;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record RefreshTokenRequest(

View File

@@ -1,8 +1,9 @@
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Services;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Services;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record RegisterRequest(

View File

@@ -1,7 +1,8 @@
using Socialize.Modules.Identity.Data;
using Socialize.Modules.Identity.Services;
using FastEndpoints;
using Socialize.Api.Modules.Identity.Data;
using Socialize.Api.Modules.Identity.Services;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ResendVerificationRequest(

View File

@@ -1,7 +1,8 @@
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record ResetPasswordRequest(

View File

@@ -1,8 +1,9 @@
using Socialize.Infrastructure.Security;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record SetPasswordRequest(

View File

@@ -1,8 +1,9 @@
using System.Web;
using Socialize.Modules.Identity.Data;
using FastEndpoints;
using Microsoft.AspNetCore.Identity;
using System.Web;
using Socialize.Api.Modules.Identity.Data;
namespace Socialize.Modules.Identity.Handlers;
namespace Socialize.Api.Modules.Identity.Handlers;
[PublicAPI]
public record VerifyEmailRequest(

View File

@@ -1,7 +1,7 @@
using Socialize.Modules.Identity.Models;
using Socialize.Api.Modules.Identity.Models;
using Microsoft.AspNetCore.Identity;
namespace Socialize.Modules.Identity;
namespace Socialize.Api.Modules.Identity;
public static class IdentityResultExtensions
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Identity.Models;
namespace Socialize.Api.Modules.Identity.Models;
public class Result(
bool succeeded,

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Identity.Models;
namespace Socialize.Api.Modules.Identity.Models;
public class RoleModel
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Identity.Models;
namespace Socialize.Api.Modules.Identity.Models;
public class UserDto
{

View File

@@ -1,4 +1,4 @@
namespace Socialize.Modules.Identity.Models;
namespace Socialize.Api.Modules.Identity.Models;
public class UserModel
{

Some files were not shown because too many files have changed in this diff Show More