# etrupja/circleapp architecture

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

- Interactive diagram: https://gitdiagram.com/etrupja/circleapp
- Repository: https://github.com/etrupja/circleapp

## Overview

CircleApp is an ASP.NET MVC social platform. A signed-in user enters through MVC controllers, which coordinate social features such as posts, friends, stories, hashtags, and notifications; data services implement those operations against the Entity Framework context. The README documents the broader product capabilities, while the excerpts and source index substantiate only some specific calls. Unshown feature links are therefore omitted rather than inferred; SQL Server is documented as the database target.

Main entry points: [`CircleApp.Data/AppDbContext.cs`](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/AppDbContext.cs) (Entity Framework context), [`CircleApp/Controllers/HomeController.cs`](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/HomeController.cs) (Home and posts), [`CircleApp.Data/Services/NotificationsService.cs`](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/NotificationsService.cs) (Notification delivery), [`CircleApp/Controllers/FriendsController.cs`](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/FriendsController.cs) (Friend requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["MVC application"]
  node_home["Home and posts<br/>[HomeController.cs]"]
  node_friendsctl["Friend requests"]
  node_notificationsctl["Notifications"]
  node_auth["Authentication"]
  node_settings["Profile settings"]
  node_admin["Administration<br/>[AdminController.cs]"]
  node_base["Controller identity<br/>[BaseController.cs]"]
end

subgraph group_features["Social features"]
  node_postservice["Post operations<br/>[PostsService.cs]"]
  node_friendservice["Friend operations<br/>[FriendsService.cs]"]
  node_storyservice["Story operations<br/>[StoriesService.cs]"]
  node_hashtagservice["Trending hashtags<br/>[HashtagsService.cs]"]
  node_notificationservice["Notification delivery"]
  node_fileservice["Media files<br/>[FilesService.cs]"]
  node_userservice["User operations<br/>[UsersService.cs]"]
end

subgraph group_data["Data and persistence"]
  node_postmodel["Posts and engagement<br/>[Post.cs]"]
  node_user_model["User accounts<br/>[User.cs]"]
  node_comment["Comments<br/>[Comment.cs]"]
  node_favorite["Favorites<br/>[Favorite.cs]"]
  node_like["Likes<br/>[Like.cs]"]
  node_friendrequest["Friend requests<br/>[FriendRequest.cs]"]
  node_dbcontext["Entity Framework context<br/>[AppDbContext.cs]"]
end

node_user(("Visitor"))
node_sql[("SQL Server")]

node_user -->|"uses"| node_home
node_user -->|"manages"| node_friendsctl
node_user -->|"signs in"| node_auth
node_home -->|"calls"| node_postservice
node_home -->|"calls"| node_hashtagservice
node_home -->|"calls"| node_fileservice
node_home -->|"calls"| node_notificationservice
node_friendsctl -->|"calls"| node_friendservice
node_friendsctl -->|"calls"| node_notificationservice
node_notificationsctl -->|"calls"| node_notificationservice
node_settings -->|"calls"| node_userservice
node_settings -->|"calls"| node_fileservice
node_postservice -->|"requests alerts"| node_notificationservice
node_postservice -->|"reads and writes"| node_dbcontext
node_friendservice -->|"reads and writes"| node_dbcontext
node_notificationservice -->|"reads and writes"| node_dbcontext
node_dbcontext -->|"maps"| node_postmodel
node_dbcontext -->|"maps"| node_user_model
node_dbcontext -->|"maps"| node_comment
node_dbcontext -->|"maps"| node_favorite
node_dbcontext -->|"maps"| node_like
node_dbcontext -->|"maps"| node_friendrequest
node_dbcontext -.->|"persists data"| node_sql

click node_home "https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/HomeController.cs"
click node_friendsctl "https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/FriendsController.cs"
click node_notificationsctl "https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/NotificationsController.cs"
click node_auth "https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/AuthenticationController.cs"
click node_settings "https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/SettingsController.cs"
click node_admin "https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/AdminController.cs"
click node_base "https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/Base/BaseController.cs"
click node_postservice "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/PostsService.cs"
click node_friendservice "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/FriendsService.cs"
click node_storyservice "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/StoriesService.cs"
click node_hashtagservice "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/HashtagsService.cs"
click node_notificationservice "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/NotificationsService.cs"
click node_fileservice "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/FilesService.cs"
click node_userservice "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/UsersService.cs"
click node_postmodel "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/Post.cs"
click node_user_model "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/User.cs"
click node_comment "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/Comment.cs"
click node_favorite "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/Favorite.cs"
click node_like "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/Like.cs"
click node_friendrequest "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/FriendRequest.cs"
click node_dbcontext "https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/AppDbContext.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_home,node_friendsctl,node_notificationsctl,node_auth,node_settings,node_admin,node_base toneBlue
class node_postservice,node_friendservice,node_storyservice,node_hashtagservice,node_notificationservice,node_fileservice,node_userservice,node_sql toneAmber
class node_postmodel,node_user_model,node_comment,node_favorite,node_like,node_friendrequest,node_dbcontext toneMint
class node_user toneIndigo
```

## Components

### MVC application

- [Home and posts](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/HomeController.cs): `CircleApp/Controllers/HomeController.cs`
- [Friend requests](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/FriendsController.cs): `CircleApp/Controllers/FriendsController.cs`
- [Notifications](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/NotificationsController.cs): `CircleApp/Controllers/NotificationsController.cs`
- [Authentication](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/AuthenticationController.cs): `CircleApp/Controllers/AuthenticationController.cs`
- [Profile settings](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/SettingsController.cs): `CircleApp/Controllers/SettingsController.cs`
- [Administration](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/AdminController.cs): `CircleApp/Controllers/AdminController.cs`
- [Controller identity](https://github.com/etrupja/circleapp/blob/master/CircleApp/Controllers/Base/BaseController.cs): `CircleApp/Controllers/Base/BaseController.cs`

### Social features

- [Post operations](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/PostsService.cs): `CircleApp.Data/Services/PostsService.cs`
- [Friend operations](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/FriendsService.cs): `CircleApp.Data/Services/FriendsService.cs`
- [Story operations](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/StoriesService.cs): `CircleApp.Data/Services/StoriesService.cs`
- [Trending hashtags](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/HashtagsService.cs): `CircleApp.Data/Services/HashtagsService.cs`
- [Notification delivery](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/NotificationsService.cs): `CircleApp.Data/Services/NotificationsService.cs`
- [Media files](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/FilesService.cs): `CircleApp.Data/Services/FilesService.cs`
- [User operations](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Services/UsersService.cs): `CircleApp.Data/Services/UsersService.cs`

### Data and persistence

- [Posts and engagement](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/Post.cs): `CircleApp.Data/Models/Post.cs`
- [User accounts](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/User.cs): `CircleApp.Data/Models/User.cs`
- [Comments](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/Comment.cs): `CircleApp.Data/Models/Comment.cs`
- [Favorites](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/Favorite.cs): `CircleApp.Data/Models/Favorite.cs`
- [Likes](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/Like.cs): `CircleApp.Data/Models/Like.cs`
- [Friend requests](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/Models/FriendRequest.cs): `CircleApp.Data/Models/FriendRequest.cs`
- [Entity Framework context](https://github.com/etrupja/circleapp/blob/master/CircleApp.Data/AppDbContext.cs): `CircleApp.Data/AppDbContext.cs`

### Other components

- **Visitor**
- **SQL Server**

## Connections

- Visitor → Home and posts: uses
- Visitor → Friend requests: manages
- Visitor → Authentication: signs in
- Home and posts → Post operations: calls (evidence: `CircleApp/Controllers/HomeController.cs`)
- Home and posts → Trending hashtags: calls (evidence: `CircleApp/Controllers/HomeController.cs`)
- Home and posts → Media files: calls (evidence: `CircleApp/Controllers/HomeController.cs`)
- Home and posts → Notification delivery: calls (evidence: `CircleApp/Controllers/HomeController.cs`)
- Friend requests → Friend operations: calls (evidence: `CircleApp/Controllers/FriendsController.cs`)
- Friend requests → Notification delivery: calls (evidence: `CircleApp/Controllers/FriendsController.cs`)
- Notifications → Notification delivery: calls (evidence: `CircleApp/Controllers/NotificationsController.cs`)
- Profile settings → User operations: calls (evidence: `CircleApp/Controllers/SettingsController.cs`)
- Profile settings → Media files: calls (evidence: `CircleApp/Controllers/SettingsController.cs`)
- Post operations → Notification delivery: requests alerts (evidence: `CircleApp.Data/Services/PostsService.cs`)
- Post operations → Entity Framework context: reads and writes (evidence: `CircleApp.Data/Services/PostsService.cs`)
- Friend operations → Entity Framework context: reads and writes (evidence: `CircleApp.Data/Services/FriendsService.cs`)
- Notification delivery → Entity Framework context: reads and writes (evidence: `CircleApp.Data/Services/NotificationsService.cs`)
- Entity Framework context → Posts and engagement: maps (evidence: `CircleApp.Data/AppDbContext.cs`)
- Entity Framework context → User accounts: maps (evidence: `CircleApp.Data/AppDbContext.cs`)
- Entity Framework context → Comments: maps (evidence: `CircleApp.Data/AppDbContext.cs`)
- Entity Framework context → Favorites: maps (evidence: `CircleApp.Data/AppDbContext.cs`)
- Entity Framework context → Likes: maps (evidence: `CircleApp.Data/AppDbContext.cs`)
- Entity Framework context → Friend requests: maps (evidence: `CircleApp.Data/AppDbContext.cs`)
- Entity Framework context → SQL Server: persists data
