# jagr-ecu/dotnet-react-activities architecture

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

- Interactive diagram: https://gitdiagram.com/jagr-ecu/dotnet-react-activities
- Repository: https://github.com/jagr-ecu/dotnet-react-activities

## Overview

This repository implements a social activity platform: users register or log in, discover and manage activities, join or host them, and interact through profiles, follows, photos, and activity comments/chat. The React client routes these experiences and maintains MobX stores; the ASP.NET API dispatches requests into application handlers, which use domain entities and persistence. Photo storage and user identity are behind infrastructure adapters. The README is empty, so feature coverage comes from the file tree; several client-to-API and unsampled handler links remain unverified.

Main entry points: [`Persistence/DataContext.cs`](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Persistence/DataContext.cs) (Entity Framework context), [`client-app/src/app/layout/App.tsx`](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/client-app/src/app/layout/App.tsx) (Route and session shell), [`Domain/AppUser.cs`](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/AppUser.cs) (User and activity entities), [`Application/Photos/Add.cs`](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Application/Photos/Add.cs) (Photo workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Route and session shell<br/>[App.tsx]"]
  node_stores["MobX store registry<br/>[store.ts]"]
  node_activity_ui["Activity screens"]
  node_profile_ui["Profile screens"]
  node_user_ui["Login and registration"]
  node_agent["HTTP client<br/>[agent.ts]"]
end

subgraph group_api["HTTP and realtime API"]
  node_controllers["Activity and account endpoints"]
  node_photo_controller["Photo endpoints"]
  node_token["JWT token service<br/>[TokenService.cs]"]
  node_chat["Realtime chat hub<br/>[ChatHub.cs]"]
end

subgraph group_application["Application workflows"]
  node_activity_workflows["Activity workflows"]
  node_comments["Activity comments"]
  node_profiles["Profiles and follows"]
  node_photos["Photo workflows<br/>[Add.cs]"]
  node_mapping["DTO mapping<br/>[MappingProfiles.cs]"]
end

subgraph group_domain["Domain and persistence"]
  node_users["User and activity entities<br/>[AppUser.cs]"]
  node_activity["Activity entity<br/>[Activity.cs]"]
  node_attendee["Attendance relation"]
  node_comment_entity["Comment entity<br/>[Comment.cs]"]
  node_photo_entity["Photo entity<br/>[Photo.cs]"]
  node_db[("Entity Framework context<br/>[DataContext.cs]")]
end

subgraph group_infrastructure["Infrastructure adapters"]
  node_user_accessor["Current-user adapter<br/>[UserAccessor.cs]"]
  node_photo_accessor["Cloud photo adapter<br/>[PhotoAccessor.cs]"]
end

node_user(("Platform user"))
node_cloudinary["Cloudinary service"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_activity_ui
node_app -->|"routes to"| node_profile_ui
node_app -->|"routes to"| node_user_ui
node_app -->|"reads session"| node_stores
node_stores -.->|"provides state"| node_activity_ui
node_activity_ui -.->|"requests data"| node_agent
node_profile_ui -.->|"requests data"| node_agent
node_user_ui -.->|"submits credentials"| node_agent
node_controllers -.->|"dispatches commands"| node_activity_workflows
node_controllers -->|"updates attendance"| node_activity_workflows
node_photo_controller -->|"dispatches photo commands"| node_photos
node_token -->|"creates claims from"| node_users
node_chat -.->|"exchanges messages"| node_user
node_activity_workflows -->|"reads and writes"| node_db
node_activity_workflows -->|"gets current user"| node_user_accessor
node_photos -->|"reads and writes"| node_db
node_photos -->|"gets current user"| node_user_accessor
node_photos -->|"uploads photo"| node_photo_accessor
node_photo_accessor -.->|"stores image"| node_cloudinary
node_user_accessor -.->|"resolves username"| node_users
node_db -->|"persists"| node_users
node_db -->|"persists"| node_activity
node_db -->|"persists"| node_attendee
node_db -->|"persists"| node_comment_entity
node_db -->|"persists"| node_photo_entity
node_mapping -->|"maps"| node_activity
node_mapping -->|"maps"| node_users
node_mapping -->|"maps"| node_comment_entity
node_comments -->|"reads and writes"| node_db
node_profiles -->|"reads and writes"| node_db
node_activity -->|"has attendees"| node_attendee
node_activity -->|"has comments"| node_comment_entity
node_users -->|"has photos"| node_photo_entity

click node_app "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/client-app/src/app/layout/App.tsx"
click node_stores "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/client-app/src/app/stores/store.ts"
click node_activity_ui "https://github.com/jagr-ecu/dotnet-react-activities/tree/main/client-app/src/features/activities"
click node_profile_ui "https://github.com/jagr-ecu/dotnet-react-activities/tree/main/client-app/src/features/activities/profiles"
click node_user_ui "https://github.com/jagr-ecu/dotnet-react-activities/tree/main/client-app/src/features/users"
click node_agent "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/client-app/src/app/api/agent.ts"
click node_controllers "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/API/Controllers/ActivitiesController.cs"
click node_photo_controller "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/API/Controllers/PhotosController.cs"
click node_token "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/API/Services/TokenService.cs"
click node_chat "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/API/SignalR/ChatHub.cs"
click node_activity_workflows "https://github.com/jagr-ecu/dotnet-react-activities/tree/main/Application/Activities"
click node_comments "https://github.com/jagr-ecu/dotnet-react-activities/tree/main/Application/Comments"
click node_profiles "https://github.com/jagr-ecu/dotnet-react-activities/tree/main/Application/Profiles"
click node_photos "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Application/Photos/Add.cs"
click node_mapping "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Application/Core/MappingProfiles.cs"
click node_users "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/AppUser.cs"
click node_activity "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/Activity.cs"
click node_attendee "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/ActivityAttendee.cs"
click node_comment_entity "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/Comment.cs"
click node_photo_entity "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/Photo.cs"
click node_db "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Persistence/DataContext.cs"
click node_user_accessor "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Infrastructure/Security/UserAccessor.cs"
click node_photo_accessor "https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Infrastructure/Photos/PhotoAccessor.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_app,node_stores,node_activity_ui,node_profile_ui,node_user_ui,node_agent,node_user toneBlue
class node_controllers,node_photo_controller,node_token,node_chat toneAmber
class node_activity_workflows,node_comments,node_profiles,node_photos,node_mapping toneMint
class node_users,node_activity,node_attendee,node_comment_entity,node_photo_entity,node_db toneRose
class node_user_accessor,node_photo_accessor,node_cloudinary toneIndigo
```

## Components

### Web client

- [Route and session shell](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/client-app/src/app/layout/App.tsx): `client-app/src/app/layout/App.tsx`
- [MobX store registry](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/client-app/src/app/stores/store.ts): `client-app/src/app/stores/store.ts`
- [Activity screens](https://github.com/jagr-ecu/dotnet-react-activities/tree/main/client-app/src/features/activities): `client-app/src/features/activities`
- [Profile screens](https://github.com/jagr-ecu/dotnet-react-activities/tree/main/client-app/src/features/activities/profiles): `client-app/src/features/activities/profiles`
- [Login and registration](https://github.com/jagr-ecu/dotnet-react-activities/tree/main/client-app/src/features/users): `client-app/src/features/users`
- [HTTP client](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/client-app/src/app/api/agent.ts): `client-app/src/app/api/agent.ts`

### HTTP and realtime API

- [Activity and account endpoints](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/API/Controllers/ActivitiesController.cs): `API/Controllers/ActivitiesController.cs`
- [Photo endpoints](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/API/Controllers/PhotosController.cs): `API/Controllers/PhotosController.cs`
- [JWT token service](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/API/Services/TokenService.cs): `API/Services/TokenService.cs`
- [Realtime chat hub](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/API/SignalR/ChatHub.cs): `API/SignalR/ChatHub.cs`

### Application workflows

- [Activity workflows](https://github.com/jagr-ecu/dotnet-react-activities/tree/main/Application/Activities): `Application/Activities`
- [Activity comments](https://github.com/jagr-ecu/dotnet-react-activities/tree/main/Application/Comments): `Application/Comments`
- [Profiles and follows](https://github.com/jagr-ecu/dotnet-react-activities/tree/main/Application/Profiles): `Application/Profiles`
- [Photo workflows](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Application/Photos/Add.cs): `Application/Photos/Add.cs`
- [DTO mapping](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Application/Core/MappingProfiles.cs): `Application/Core/MappingProfiles.cs`

### Domain and persistence

- [User and activity entities](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/AppUser.cs): `Domain/AppUser.cs`
- [Activity entity](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/Activity.cs): `Domain/Activity.cs`
- [Attendance relation](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/ActivityAttendee.cs): `Domain/ActivityAttendee.cs`
- [Comment entity](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/Comment.cs): `Domain/Comment.cs`
- [Photo entity](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Domain/Photo.cs): `Domain/Photo.cs`
- [Entity Framework context](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Persistence/DataContext.cs): `Persistence/DataContext.cs`

### Infrastructure adapters

- [Current-user adapter](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Infrastructure/Security/UserAccessor.cs): `Infrastructure/Security/UserAccessor.cs`
- [Cloud photo adapter](https://github.com/jagr-ecu/dotnet-react-activities/blob/main/Infrastructure/Photos/PhotoAccessor.cs): `Infrastructure/Photos/PhotoAccessor.cs`

### Other components

- **Platform user**
- **Cloudinary service**

## Connections

- Platform user → Route and session shell: uses (evidence: `client-app/src/app/layout/App.tsx`)
- Route and session shell → Activity screens: routes to (evidence: `client-app/src/app/layout/App.tsx`)
- Route and session shell → Profile screens: routes to (evidence: `client-app/src/app/layout/App.tsx`)
- Route and session shell → Login and registration: routes to (evidence: `client-app/src/app/layout/App.tsx`)
- Route and session shell → MobX store registry: reads session (evidence: `client-app/src/app/layout/App.tsx`)
- MobX store registry → Activity screens: provides state
- Activity screens → HTTP client: requests data
- Profile screens → HTTP client: requests data
- Login and registration → HTTP client: submits credentials
- Activity and account endpoints → Activity workflows: dispatches commands (evidence: `API/Controllers/ActivitiesController.cs`)
- Activity and account endpoints → Activity workflows: updates attendance (evidence: `API/Controllers/ActivitiesController.cs`)
- Photo endpoints → Photo workflows: dispatches photo commands (evidence: `API/Controllers/PhotosController.cs`)
- JWT token service → User and activity entities: creates claims from (evidence: `API/Services/TokenService.cs`)
- Realtime chat hub → Platform user: exchanges messages
- Activity workflows → Entity Framework context: reads and writes (evidence: `Application/Activities/UpdateAttendance.cs`)
- Activity workflows → Current-user adapter: gets current user (evidence: `Application/Activities/UpdateAttendance.cs`)
- Photo workflows → Entity Framework context: reads and writes (evidence: `Application/Photos/Add.cs`)
- Photo workflows → Current-user adapter: gets current user (evidence: `Application/Photos/Add.cs`)
- Photo workflows → Cloud photo adapter: uploads photo (evidence: `Application/Photos/Add.cs`)
- Cloud photo adapter → Cloudinary service: stores image
- Current-user adapter → User and activity entities: resolves username
- Entity Framework context → User and activity entities: persists (evidence: `Persistence/DataContext.cs`)
- Entity Framework context → Activity entity: persists (evidence: `Persistence/DataContext.cs`)
- Entity Framework context → Attendance relation: persists (evidence: `Persistence/DataContext.cs`)
- Entity Framework context → Comment entity: persists (evidence: `Persistence/DataContext.cs`)
- Entity Framework context → Photo entity: persists (evidence: `Persistence/DataContext.cs`)
- DTO mapping → Activity entity: maps (evidence: `Application/Core/MappingProfiles.cs`)
- DTO mapping → User and activity entities: maps (evidence: `Application/Core/MappingProfiles.cs`)
- DTO mapping → Comment entity: maps (evidence: `Application/Core/MappingProfiles.cs`)
- Activity comments → Entity Framework context: reads and writes (evidence: `Application/Comments/Create.cs`)
- Profiles and follows → Entity Framework context: reads and writes (evidence: `Application/Profiles/Edit.cs`)
- Activity entity → Attendance relation: has attendees (evidence: `Domain/Activity.cs`)
- Activity entity → Comment entity: has comments (evidence: `Domain/Activity.cs`)
- User and activity entities → Photo entity: has photos (evidence: `Domain/AppUser.cs`)
