# ellinorelisabeth/dream architecture

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

- Interactive diagram: https://gitdiagram.com/ellinorelisabeth/dream
- Repository: https://github.com/ellinorelisabeth/dream

## Overview

Dreams is a React/TypeScript application for recording and managing dreams, backed by an ASP.NET Core REST API and SQLite. Users enter through the routed frontend; the frontend service communicates with the API, whose controller uses the EF Core context to read and persist thoughts. Search and delete are visible in sampled frontend code, while the README and API document add, update, and delete capabilities. Image upload is present as a separate capability, but its frontend service targets a different local port; its runtime connection to the backend is therefore uncertain.

Main entry points: [`FrontEnd/src/routing/AppRouting.tsx`](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/routing/AppRouting.tsx) (App routing), [`FrontEnd/src/components/SearchThought.tsx`](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/components/SearchThought.tsx) (Search controls), [`BackEnd/Controllers/ThoughtController.cs`](https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Controllers/ThoughtController.cs) (Thought controller), [`FrontEnd/src/services/Service.ts`](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/services/Service.ts) (Thought service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Dreams frontend"]
  node_app["App shell<br/>[App.tsx]"]
  node_routing["App routing<br/>[AppRouting.tsx]"]
  node_home["Home page<br/>[HomePage.tsx]"]
  node_add_page["Add page<br/>[AddThoughtPage.tsx]"]
  node_search_page["Search page<br/>[SearchPage.tsx]"]
  node_search_ui["Search controls<br/>[SearchThought.tsx]"]
  node_thought_state["Thought state<br/>[Context.tsx]"]
  node_thought_service["Thought service<br/>[Service.ts]"]
end

subgraph group_thought_api["Thought API"]
  node_thought_api["Thought controller"]
  node_thought_model["Thought model<br/>[Thought.cs]"]
end

subgraph group_persistence["Persistence"]
  node_db_context["EF context<br/>[DreamDbContext.cs]"]
  node_sqlite[("SQLite store<br/>[appsettings.json]")]
end

subgraph group_image_upload["Image upload"]
  node_image_page["Image page<br/>[ImagePage.tsx]"]
  node_image_ui["Image controls<br/>[UploadImage.tsx]"]
  node_image_service["Image service"]
  node_image_api["Image controller"]
  node_image_files[("Web image files")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_routing
node_routing -->|"routes"| node_home
node_routing -->|"routes"| node_add_page
node_routing -->|"routes"| node_search_page
node_routing -->|"routes"| node_image_page
node_search_page -->|"renders"| node_search_ui
node_search_ui -->|"searches via"| node_thought_service
node_search_ui -->|"deletes via"| node_thought_state
node_thought_state -->|"calls"| node_thought_service
node_thought_service -->|"HTTP requests"| node_thought_api
node_thought_api -->|"queries and updates"| node_db_context
node_db_context -->|"reads and writes"| node_sqlite
node_thought_api -->|"uses"| node_thought_model
node_image_page -->|"renders"| node_image_ui
node_image_ui -->|"uploads via"| node_image_service
node_image_api -->|"writes files"| node_image_files

click node_app "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/App.tsx"
click node_routing "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/routing/AppRouting.tsx"
click node_home "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/pages/HomePage.tsx"
click node_add_page "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/pages/AddThoughtPage.tsx"
click node_search_page "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/pages/SearchPage.tsx"
click node_search_ui "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/components/SearchThought.tsx"
click node_thought_state "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/context/Context.tsx"
click node_thought_service "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/services/Service.ts"
click node_thought_api "https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Controllers/ThoughtController.cs"
click node_thought_model "https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Models/Thought.cs"
click node_db_context "https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Data/DreamDbContext.cs"
click node_sqlite "https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/appsettings.json"
click node_image_page "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/pages/ImagePage.tsx"
click node_image_ui "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/components/UploadImage.tsx"
click node_image_service "https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/services/UploadImageService.ts"
click node_image_api "https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Controllers/UploadImageController.cs"
click node_image_files "https://github.com/ellinorelisabeth/dream/tree/main/BackEnd/wwwroot/images"

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_routing,node_home,node_add_page,node_search_page,node_search_ui,node_thought_state,node_thought_service,node_user toneBlue
class node_thought_api,node_thought_model toneAmber
class node_db_context,node_sqlite toneMint
class node_image_page,node_image_ui,node_image_service,node_image_api,node_image_files toneRose
```

## Components

### Dreams frontend

- [App shell](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/App.tsx): `FrontEnd/src/App.tsx`
- [App routing](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/routing/AppRouting.tsx): `FrontEnd/src/routing/AppRouting.tsx`
- [Home page](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/pages/HomePage.tsx): `FrontEnd/src/pages/HomePage.tsx`
- [Add page](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/pages/AddThoughtPage.tsx): `FrontEnd/src/pages/AddThoughtPage.tsx`
- [Search page](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/pages/SearchPage.tsx): `FrontEnd/src/pages/SearchPage.tsx`
- [Search controls](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/components/SearchThought.tsx): `FrontEnd/src/components/SearchThought.tsx`
- [Thought state](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/context/Context.tsx): `FrontEnd/src/context/Context.tsx`
- [Thought service](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/services/Service.ts): `FrontEnd/src/services/Service.ts`

### Thought API

- [Thought controller](https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Controllers/ThoughtController.cs): `BackEnd/Controllers/ThoughtController.cs`
- [Thought model](https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Models/Thought.cs): `BackEnd/Models/Thought.cs`

### Persistence

- [EF context](https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Data/DreamDbContext.cs): `BackEnd/Data/DreamDbContext.cs`
- [SQLite store](https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/appsettings.json): `BackEnd/appsettings.json`

### Image upload

- [Image page](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/pages/ImagePage.tsx): `FrontEnd/src/pages/ImagePage.tsx`
- [Image controls](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/components/UploadImage.tsx): `FrontEnd/src/components/UploadImage.tsx`
- [Image service](https://github.com/ellinorelisabeth/dream/blob/main/FrontEnd/src/services/UploadImageService.ts): `FrontEnd/src/services/UploadImageService.ts`
- [Image controller](https://github.com/ellinorelisabeth/dream/blob/main/BackEnd/Controllers/UploadImageController.cs): `BackEnd/Controllers/UploadImageController.cs`
- [Web image files](https://github.com/ellinorelisabeth/dream/tree/main/BackEnd/wwwroot/images): `BackEnd/wwwroot/images`

### Other components

- **User**

## Connections

- User → App shell: uses
- App shell → App routing: renders
- App routing → Home page: routes
- App routing → Add page: routes
- App routing → Search page: routes
- App routing → Image page: routes
- Search page → Search controls: renders
- Search controls → Thought service: searches via
- Search controls → Thought state: deletes via
- Thought state → Thought service: calls
- Thought service → Thought controller: HTTP requests
- Thought controller → EF context: queries and updates
- EF context → SQLite store: reads and writes
- Thought controller → Thought model: uses
- Image page → Image controls: renders
- Image controls → Image service: uploads via
- Image controller → Web image files: writes files
