# abdullaevz/socialafinalproject architecture

> Architecture diagram of the GitHub repository abdullaevz/socialafinalproject, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdullaevz/socialafinalproject
- Repository: https://github.com/abdullaevz/socialafinalproject

## Overview

SocialApp is an ASP.NET social-network application. Members browse profiles and posts, discover and manage friends, and use interactions such as likes, saves, comments, and messaging; administrators have user and moderation controls. The sampled friend controller shows profile requests dispatched through MediatR to application queries, while sampled handlers read through repository abstractions. The tree also documents account, media, banner, and moderation capabilities, but their detailed call paths were not sampled, so those links are omitted or marked unverified.

Main entry points: [`SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs`](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs) (Friend controller), [`SocialApp/src/Core/SocialApp.APPLICATION/Abstractions/Repositories/IReadRepository.cs`](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Abstractions/Repositories/IReadRepository.cs) (Read repository), [`SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/FriendQueries/GetCurrentUsers/GetCurrentUsersQueryHandler.cs`](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/FriendQueries/GetCurrentUsers/GetCurrentUsersQueryHandler.cs) (Friend queries), [`SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllPosts/GetAllPostsQueryHandler.cs`](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllPosts/GetAllPostsQueryHandler.cs) (Post queries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Web presentation"]
  node_mvc_friends["Friend controller"]
  node_mvc_account["Account controller"]
  node_mvc_posts["Post controller<br/>[PostController.cs]"]
  node_mvc_messages["Message controller"]
  node_mvc_admin["Admin moderation"]
end

subgraph group_application["Application workflows"]
  node_profile_queries["Profile queries"]
  node_friend_queries["Friend queries"]
  node_post_queries["Post queries"]
  node_user_posts["User post queries"]
  node_like_queries["Like queries"]
  node_social_accounts["Social accounts"]
  node_message_workflows["Messaging workflows"]
  node_moderation_workflows["Moderation workflows"]
  node_read_repository["Read repository<br/>[IReadRepository.cs]"]
end

subgraph group_domain["Social domain"]
  node_users[("User accounts<br/>[AppUser.cs]")]
  node_posts[("Posts<br/>[Post.cs]")]
  node_post_likes[("Post likes<br/>[PostLike.cs]")]
  node_messages[("Messages<br/>[Message.cs]")]
  node_banners[("Banners<br/>[Banner.cs]")]
end

subgraph group_infrastructure["Infrastructure"]
  node_app_db[("Application database<br/>[AppDbContext.cs]")]
  node_chat_service["Chat service<br/>[ChatService.cs]"]
  node_cloud_upload["Cloud uploads"]
end

node_member(("Member"))

node_member -.->|"uses"| node_mvc_friends
node_mvc_friends -->|"dispatches"| node_friend_queries
node_mvc_friends -->|"dispatches"| node_profile_queries
node_mvc_friends -->|"dispatches"| node_social_accounts
node_mvc_friends -->|"dispatches"| node_user_posts
node_mvc_friends -->|"dispatches"| node_like_queries
node_friend_queries -->|"reads friends"| node_read_repository
node_friend_queries -->|"loads users"| node_users
node_friend_queries -->|"loads posts"| node_posts
node_post_queries -->|"reads posts"| node_read_repository
node_user_posts -->|"reads posts"| node_read_repository
node_like_queries -->|"reads likes"| node_read_repository
node_mvc_account -.->|"dispatches"| node_profile_queries
node_mvc_posts -.->|"dispatches"| node_post_queries
node_mvc_messages -.->|"dispatches"| node_message_workflows
node_mvc_admin -.->|"dispatches"| node_moderation_workflows
node_message_workflows -.->|"manages"| node_messages
node_moderation_workflows -.->|"manages"| node_banners
node_post_queries -->|"reads"| node_posts
node_user_posts -->|"reads"| node_posts
node_like_queries -->|"reads"| node_post_likes
node_mvc_posts -.->|"uploads media"| node_cloud_upload
node_read_repository -.->|"queries"| node_app_db
node_mvc_messages -.->|"uses chat"| node_chat_service

click node_mvc_friends "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs"
click node_mvc_account "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/AccountController.cs"
click node_mvc_posts "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/PostController.cs"
click node_mvc_messages "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/MessageController.cs"
click node_mvc_admin "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Areas/Admin/Controllers/ModerationController.cs"
click node_profile_queries "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/UserQueries/GetUserById/GetUserByIdQueryHandler.cs"
click node_friend_queries "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/FriendQueries/GetCurrentUsers/GetCurrentUsersQueryHandler.cs"
click node_post_queries "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllPosts/GetAllPostsQueryHandler.cs"
click node_user_posts "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllUserPostsById/GetAllUserPostsQueryRequest.cs"
click node_like_queries "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostLikeQueries/CheckPostLike/CheckPostLikeQueryHandler.cs"
click node_social_accounts "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/SocialAccountQueries/SocialAcountsGetAllById/SocialAccountsQueryHandler.cs"
click node_message_workflows "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Commands/MessageCommands/CreateMessage/CreateMessageCommandRequest.cs"
click node_moderation_workflows "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Commands/ModerationCommands/BannerCommands/CreateBanner/CreateBannerCommandHandler.cs"
click node_read_repository "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Abstractions/Repositories/IReadRepository.cs"
click node_users "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/IdentityModels/AppUser.cs"
click node_posts "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/Post.cs"
click node_post_likes "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/PostLike.cs"
click node_messages "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/Message.cs"
click node_banners "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/Banner.cs"
click node_app_db "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Infrastructure/SocialApp.PERSISTENCE/Contexts/AppDbContext.cs"
click node_chat_service "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Infrastructure/SocialApp.INFRASTRUCTURE/Concretes/Servcies/ChatService.cs"
click node_cloud_upload "https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Infrastructure/SocialApp.INFRASTRUCTURE/Concretes/Servcies/CloudUploadService.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mvc_friends,node_mvc_account,node_mvc_posts,node_mvc_messages,node_mvc_admin toneBlue
class node_profile_queries,node_friend_queries,node_post_queries,node_user_posts,node_like_queries,node_social_accounts,node_message_workflows,node_moderation_workflows,node_read_repository toneAmber
class node_users,node_posts,node_post_likes,node_messages,node_banners toneMint
class node_app_db,node_chat_service,node_cloud_upload toneRose
class node_member toneIndigo
```

## Components

### Web presentation

- [Friend controller](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs): `SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs`
- [Account controller](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/AccountController.cs): `SocialApp/src/Presentation/SocialApp.MVC/Controllers/AccountController.cs`
- [Post controller](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/PostController.cs): `SocialApp/src/Presentation/SocialApp.MVC/Controllers/PostController.cs`
- [Message controller](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Controllers/MessageController.cs): `SocialApp/src/Presentation/SocialApp.MVC/Controllers/MessageController.cs`
- [Admin moderation](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Presentation/SocialApp.MVC/Areas/Admin/Controllers/ModerationController.cs): `SocialApp/src/Presentation/SocialApp.MVC/Areas/Admin/Controllers/ModerationController.cs`

### Application workflows

- [Profile queries](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/UserQueries/GetUserById/GetUserByIdQueryHandler.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/UserQueries/GetUserById/GetUserByIdQueryHandler.cs`
- [Friend queries](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/FriendQueries/GetCurrentUsers/GetCurrentUsersQueryHandler.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/FriendQueries/GetCurrentUsers/GetCurrentUsersQueryHandler.cs`
- [Post queries](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllPosts/GetAllPostsQueryHandler.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllPosts/GetAllPostsQueryHandler.cs`
- [User post queries](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllUserPostsById/GetAllUserPostsQueryRequest.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllUserPostsById/GetAllUserPostsQueryRequest.cs`
- [Like queries](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostLikeQueries/CheckPostLike/CheckPostLikeQueryHandler.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostLikeQueries/CheckPostLike/CheckPostLikeQueryHandler.cs`
- [Social accounts](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/SocialAccountQueries/SocialAcountsGetAllById/SocialAccountsQueryHandler.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/SocialAccountQueries/SocialAcountsGetAllById/SocialAccountsQueryHandler.cs`
- [Messaging workflows](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Commands/MessageCommands/CreateMessage/CreateMessageCommandRequest.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Features/Commands/MessageCommands/CreateMessage/CreateMessageCommandRequest.cs`
- [Moderation workflows](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Features/Commands/ModerationCommands/BannerCommands/CreateBanner/CreateBannerCommandHandler.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Features/Commands/ModerationCommands/BannerCommands/CreateBanner/CreateBannerCommandHandler.cs`
- [Read repository](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.APPLICATION/Abstractions/Repositories/IReadRepository.cs): `SocialApp/src/Core/SocialApp.APPLICATION/Abstractions/Repositories/IReadRepository.cs`

### Social domain

- [User accounts](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/IdentityModels/AppUser.cs): `SocialApp/src/Core/SocialApp.DOMAIN/Models/IdentityModels/AppUser.cs`
- [Posts](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/Post.cs): `SocialApp/src/Core/SocialApp.DOMAIN/Models/Post.cs`
- [Post likes](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/PostLike.cs): `SocialApp/src/Core/SocialApp.DOMAIN/Models/PostLike.cs`
- [Messages](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/Message.cs): `SocialApp/src/Core/SocialApp.DOMAIN/Models/Message.cs`
- [Banners](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Core/SocialApp.DOMAIN/Models/Banner.cs): `SocialApp/src/Core/SocialApp.DOMAIN/Models/Banner.cs`

### Infrastructure

- [Application database](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Infrastructure/SocialApp.PERSISTENCE/Contexts/AppDbContext.cs): `SocialApp/src/Infrastructure/SocialApp.PERSISTENCE/Contexts/AppDbContext.cs`
- [Chat service](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Infrastructure/SocialApp.INFRASTRUCTURE/Concretes/Servcies/ChatService.cs): `SocialApp/src/Infrastructure/SocialApp.INFRASTRUCTURE/Concretes/Servcies/ChatService.cs`
- [Cloud uploads](https://github.com/abdullaevz/socialafinalproject/blob/main/SocialApp/src/Infrastructure/SocialApp.INFRASTRUCTURE/Concretes/Servcies/CloudUploadService.cs): `SocialApp/src/Infrastructure/SocialApp.INFRASTRUCTURE/Concretes/Servcies/CloudUploadService.cs`

### Other components

- **Member**

## Connections

- Member → Friend controller: uses
- Friend controller → Friend queries: dispatches (evidence: `SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs`)
- Friend controller → Profile queries: dispatches (evidence: `SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs`)
- Friend controller → Social accounts: dispatches (evidence: `SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs`)
- Friend controller → User post queries: dispatches (evidence: `SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs`)
- Friend controller → Like queries: dispatches (evidence: `SocialApp/src/Presentation/SocialApp.MVC/Controllers/UserFriendController.cs`)
- Friend queries → Read repository: reads friends (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/FriendQueries/GetCurrentUsers/GetCurrentUsersQueryHandler.cs`)
- Friend queries → User accounts: loads users (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/FriendQueries/GetCurrentUsers/GetCurrentUsersQueryHandler.cs`)
- Friend queries → Posts: loads posts (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/FriendQueries/GetCurrentUsers/GetCurrentUsersQueryHandler.cs`)
- Post queries → Read repository: reads posts (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllPosts/GetAllPostsQueryHandler.cs`)
- User post queries → Read repository: reads posts (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllUserPostsById/GetAllUserPostsQueryRequest.cs`)
- Like queries → Read repository: reads likes (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostLikeQueries/CheckPostLike/CheckPostLikeQueryHandler.cs`)
- Account controller → Profile queries: dispatches
- Post controller → Post queries: dispatches
- Message controller → Messaging workflows: dispatches
- Admin moderation → Moderation workflows: dispatches
- Messaging workflows → Messages: manages
- Moderation workflows → Banners: manages
- Post queries → Posts: reads (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllPosts/GetAllPostsQueryHandler.cs`)
- User post queries → Posts: reads (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostQueries/GetAllUserPostsById/GetAllUserPostsQueryRequest.cs`)
- Like queries → Post likes: reads (evidence: `SocialApp/src/Core/SocialApp.APPLICATION/Features/Queries/PostLikeQueries/CheckPostLike/CheckPostLikeQueryHandler.cs`)
- Post controller → Cloud uploads: uploads media
- Read repository → Application database: queries
- Message controller → Chat service: uses chat
