Skip to content

Commit 790f82b

Browse files
committed
docs(web-dashboard): refactor architecture page and add new content
- Refactor architecture overview page with CardGrid components - Add new features, developer guides, and user manuals pages - Update imports and content structure for better organization
1 parent 04b1ac3 commit 790f82b

File tree

4 files changed

+77
-23
lines changed

4 files changed

+77
-23
lines changed
Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
11
---
2-
title: Architecture Overview
2+
title: Architecture
33
description: An overview of the architectural patterns and structure of the Flutter web dashboard.
44
---
55

6-
import { Aside } from '@astrojs/starlight/components';
6+
import { Card, CardGrid } from '@astrojs/starlight/components';
77

88
The Flutter News App Web Dashboard is built upon a clean, scalable, and maintainable architecture that separates concerns into distinct layers. This approach, combined with the use of shared packages, ensures that the codebase is both robust and easy to extend.
99

10-
### Layered Architecture
11-
12-
The dashboard follows a classic layered architecture, ensuring a clear separation of responsibilities:
13-
14-
1. **Presentation Layer (UI):** This is the user-facing layer, built with Flutter widgets. It is responsible for displaying the UI and capturing user input. It is kept as "dumb" as possible, meaning it contains minimal logic and simply reflects the state provided by the Business Logic Layer.
15-
16-
2. **Business Logic Layer (BLoC):** This layer contains the application's state management and business rules. We use the **BLoC (Business Logic Component)** pattern to manage the flow of information from user events to UI states. Feature-specific BLoCs (e.g., `ContentManagementBloc`, `DashboardBloc`) orchestrate data from the Repository Layer and emit states for the UI to consume.
17-
18-
3. **Repository Layer:** This layer abstracts the origin of the data. It provides a clean, simple API for the Business Logic Layer to access data, without needing to know whether the data is coming from a remote API or a local in-memory source. This is a key part of our strategy for testability and environment flexibility.
19-
20-
4. **Data Layer (Clients):** This is the lowest layer, responsible for the actual data retrieval. It consists of `Client` implementations that communicate with external sources. For the dashboard, this means either an `HttpDataClient` that makes requests to the API server or an `InMemoryDataClient` used for the demo environment.
21-
22-
<Aside>
23-
The Repository and Data layers are not implemented directly within the dashboard. Instead, the dashboard consumes them as shared packages, which are used across the entire ecosystem (including the mobile app and API server).
24-
</Aside>
25-
26-
### Core Principles
27-
28-
- **Dependency Injection:** Repositories and other services are provided to the widget tree using `RepositoryProvider` and `BlocProvider`. This decouples our components and makes them highly testable.
29-
- **Immutability:** All data models and BLoC states are immutable, which leads to more predictable state management and reduces the risk of side effects.
30-
- **Shared Packages:** The dashboard leverages a suite of shared packages for core functionality (e.g., `core`, `data_repository`, `auth_repository`, `ui_kit`). This promotes code reuse and consistency across the entire project ecosystem.
10+
<CardGrid>
11+
<Card title="State Management (BLoC)" icon="bolt">
12+
An explanation of how the BLoC pattern is used for state management.
13+
[Read more &rarr;](/docs/web-dashboard/architecture/state-management/)
14+
</Card>
15+
<Card title="Routing (go_router)" icon="link">
16+
An explanation of how navigation and routing are handled using go_router.
17+
[Read more &rarr;](/docs/web-dashboard/architecture/routing/)
18+
</Card>
19+
</CardGrid>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Features
3+
description: Explore the key features and architecture of the Web Dashboard.
4+
---
5+
6+
import { Card, CardGrid } from '@astrojs/starlight/components';
7+
8+
The Web Dashboard is packed with features designed for administrators and content publishers. Explore the guides below to understand its core capabilities.
9+
10+
<CardGrid>
11+
<Card title="Dashboard Overview" icon="dashboard">
12+
An explanation of the main dashboard screen, its analytics, and quick actions.
13+
[Read more &rarr;](/docs/web-dashboard/features/dashboard-overview/)
14+
</Card>
15+
<Card title="Content Management" icon="pencil">
16+
How to create, read, update, and delete your application content.
17+
[Read more &rarr;](/docs/web-dashboard/features/content-management/)
18+
</Card>
19+
<Card title="App Configuration" icon="settings">
20+
How to remotely manage the behavior and settings of the mobile application.
21+
[Read more &rarr;](/docs/web-dashboard/features/app-configuration/)
22+
</Card>
23+
<Card title="Authentication" icon="shield">
24+
An overview of the secure sign-in process for the web dashboard.
25+
[Read more &rarr;](/docs/web-dashboard/features/authentication/)
26+
</Card>
27+
</CardGrid>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Developer Guides
3+
description: Practical guides for developers on theming, customization, and localization for the web dashboard.
4+
---
5+
6+
import { Card, CardGrid } from '@astrojs/starlight/components';
7+
8+
This section provides practical, step-by-step guides for developers working on the web dashboard.
9+
10+
<CardGrid>
11+
<Card title="Theming & Customization" icon="palette">
12+
A developer's guide to customizing the visual appearance of the web dashboard.
13+
[Read more &rarr;](/docs/web-dashboard/guides/theming-and-customization/)
14+
</Card>
15+
<Card title="Localization" icon="translate">
16+
A guide to adding new languages and translations to the web client.
17+
[Read more &rarr;](/docs/web-dashboard/guides/localization/)
18+
</Card>
19+
</CardGrid>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: User Manuals
3+
description: User-focused manuals for administrators and publishers using the web dashboard.
4+
---
5+
6+
import { Card, CardGrid } from '@astrojs/starlight/components';
7+
8+
This section provides user-focused manuals for administrators and publishers.
9+
10+
<CardGrid>
11+
<Card title="Managing Content" icon="pencil">
12+
A user manual for creating, editing, and deleting content in the web dashboard.
13+
[Read more &rarr;](/docs/web-dashboard/manuals/managing-content/)
14+
</Card>
15+
<Card title="Configuring the Mobile App" icon="settings">
16+
A user manual for remotely configuring the mobile app from the web dashboard.
17+
[Read more &rarr;](/docs/web-dashboard/manuals/configuring-the-app/)
18+
</Card>
19+
</CardGrid>

0 commit comments

Comments
 (0)