# abed232822-stack/mini-api-client architecture

> Architecture diagram of the GitHub repository abed232822-stack/mini-api-client, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abed232822-stack/mini-api-client
- Repository: https://github.com/abed232822-stack/mini-api-client

## Overview

MiniApiClient is a Flutter REST client: users organize requests in nested collections, configure and validate a request, send it to an HTTP endpoint, and inspect the response. The README describes feature-separated presentation and data layers, BLoC state management, local Hive persistence, and an adaptive shell. The graph preserves those documented capabilities; Dart implementation excerpts were not provided, so the relationships below rely on README statements rather than sampled calls.

Main entry points: [`lib/features/Requests/presentation/bloc/Request/request_bloc.dart`](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/bloc/Request/request_bloc.dart) (Request state), [`lib/features/Requests/data/services/request_service.dart`](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/data/services/request_service.dart) (Request service), [`lib/features/Collections/presentation/widgets/collections_tree_view.dart`](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/presentation/widgets/collections_tree_view.dart) (Collection tree UI), [`lib/main.dart`](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/main.dart) (App startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App Shell"]
  node_app["App startup<br/>[main.dart]"]
  node_layout["Adaptive shell<br/>[layout.dart]"]
  node_welcome["Welcome page<br/>[welcome_page.dart]"]
end

subgraph group_collections["Collection Management"]
  node_collection_ui["Collection tree UI"]
  node_collection_mapper["Tree mapper"]
  node_collection_bloc["Collection state"]
  node_collection_repo["Collection repository"]
end

subgraph group_requests["Request Workflow"]
  node_request_ui["Request editor<br/>[request_page.dart]"]
  node_request_bloc["Request state<br/>[request_bloc.dart]"]
  node_request_service["Request service"]
  node_response_bloc["Response state<br/>[response_bloc.dart]"]
  node_response_ui["Response inspector"]
end

subgraph group_shared["Shared Services"]
  node_validator["Request validation"]
  node_error_handler["Error handler<br/>[error_handler.dart]"]
  node_snackbar["Error feedback<br/>[cool_snackbar.dart]"]
  node_hive[("Local Hive storage")]
end

node_user(("User"))
node_http_api{{"HTTP endpoint"}}

node_user -->|"opens"| node_app
node_app -->|"starts"| node_layout
node_layout -->|"shows when idle"| node_welcome
node_user -->|"manages collections"| node_collection_ui
node_collection_ui -->|"dispatches actions"| node_collection_bloc
node_collection_bloc -->|"accesses data"| node_collection_repo
node_collection_repo -->|"persists collections"| node_hive
node_collection_ui -->|"maps tree"| node_collection_mapper
node_user -->|"configures request"| node_request_ui
node_request_ui -->|"dispatches actions"| node_request_bloc
node_request_bloc -->|"validates request"| node_validator
node_request_bloc -->|"accesses service"| node_request_service
node_request_service -->|"sends HTTP request"| node_http_api
node_request_bloc -->|"saves request"| node_hive
node_request_service -.->|"provides response"| node_response_bloc
node_response_bloc -->|"updates display"| node_response_ui
node_request_service -->|"handles failures"| node_error_handler
node_error_handler -->|"shows feedback"| node_snackbar

click node_app "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/main.dart"
click node_layout "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/layout.dart"
click node_welcome "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/core/widgets/welcome_page.dart"
click node_collection_ui "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/presentation/widgets/collections_tree_view.dart"
click node_collection_mapper "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/presentation/utils/collection_tree_mapper.dart"
click node_collection_bloc "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/presentation/bloc/collection/collection_bloc.dart"
click node_collection_repo "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/data/repository/collection_repo.dart"
click node_request_ui "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/pages/request_page.dart"
click node_request_bloc "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/bloc/Request/request_bloc.dart"
click node_validator "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/core/utils/request_validator.dart"
click node_request_service "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/data/services/request_service.dart"
click node_response_bloc "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/bloc/Response/response_bloc.dart"
click node_response_ui "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/pages/response_section.dart"
click node_error_handler "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/core/error/error_handler.dart"
click node_snackbar "https://github.com/abed232822-stack/mini-api-client/blob/main/lib/core/widgets/cool_snackbar.dart"

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_layout,node_welcome,node_user toneBlue
class node_collection_ui,node_collection_mapper,node_collection_bloc,node_collection_repo toneAmber
class node_request_ui,node_request_bloc,node_request_service,node_response_bloc,node_response_ui toneMint
class node_validator,node_error_handler,node_snackbar,node_hive toneRose
class node_http_api toneIndigo
```

## Components

### App Shell

- [App startup](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/main.dart): `lib/main.dart`
- [Adaptive shell](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/layout.dart): `lib/layout.dart`
- [Welcome page](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/core/widgets/welcome_page.dart): `lib/core/widgets/welcome_page.dart`

### Collection Management

- [Collection tree UI](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/presentation/widgets/collections_tree_view.dart): `lib/features/Collections/presentation/widgets/collections_tree_view.dart`
- [Tree mapper](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/presentation/utils/collection_tree_mapper.dart): `lib/features/Collections/presentation/utils/collection_tree_mapper.dart`
- [Collection state](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/presentation/bloc/collection/collection_bloc.dart): `lib/features/Collections/presentation/bloc/collection/collection_bloc.dart`
- [Collection repository](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Collections/data/repository/collection_repo.dart): `lib/features/Collections/data/repository/collection_repo.dart`

### Request Workflow

- [Request editor](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/pages/request_page.dart): `lib/features/Requests/presentation/pages/request_page.dart`
- [Request state](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/bloc/Request/request_bloc.dart): `lib/features/Requests/presentation/bloc/Request/request_bloc.dart`
- [Request service](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/data/services/request_service.dart): `lib/features/Requests/data/services/request_service.dart`
- [Response state](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/bloc/Response/response_bloc.dart): `lib/features/Requests/presentation/bloc/Response/response_bloc.dart`
- [Response inspector](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/features/Requests/presentation/pages/response_section.dart): `lib/features/Requests/presentation/pages/response_section.dart`

### Shared Services

- [Request validation](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/core/utils/request_validator.dart): `lib/core/utils/request_validator.dart`
- [Error handler](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/core/error/error_handler.dart): `lib/core/error/error_handler.dart`
- [Error feedback](https://github.com/abed232822-stack/mini-api-client/blob/main/lib/core/widgets/cool_snackbar.dart): `lib/core/widgets/cool_snackbar.dart`
- **Local Hive storage**

### Other components

- **User**
- **HTTP endpoint**

## Connections

- User → App startup: opens (evidence: `README.md`)
- App startup → Adaptive shell: starts (evidence: `README.md`)
- Adaptive shell → Welcome page: shows when idle (evidence: `README.md`)
- User → Collection tree UI: manages collections (evidence: `README.md`)
- Collection tree UI → Collection state: dispatches actions (evidence: `README.md`)
- Collection state → Collection repository: accesses data (evidence: `README.md`)
- Collection repository → Local Hive storage: persists collections (evidence: `README.md`)
- Collection tree UI → Tree mapper: maps tree
- User → Request editor: configures request (evidence: `README.md`)
- Request editor → Request state: dispatches actions (evidence: `README.md`)
- Request state → Request validation: validates request (evidence: `README.md`)
- Request state → Request service: accesses service (evidence: `README.md`)
- Request service → HTTP endpoint: sends HTTP request (evidence: `README.md`)
- Request state → Local Hive storage: saves request (evidence: `README.md`)
- Request service → Response state: provides response
- Response state → Response inspector: updates display (evidence: `README.md`)
- Request service → Error handler: handles failures (evidence: `README.md`)
- Error handler → Error feedback: shows feedback (evidence: `README.md`)
