Skip to content

Commit 4c9b030

Browse files
authored
Merge pull request #10 from flutter-news-app-full-source-code/reactor_docs_for_smoother_experience
Reactor docs for smoother experience
2 parents 1301bdd + 9b0f89c commit 4c9b030

File tree

20 files changed

+93
-88
lines changed

20 files changed

+93
-88
lines changed

astro.config.mjs

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,27 @@ export default defineConfig({
1717
},
1818
],
1919
sidebar: [
20-
{ label: 'Core Philosophy', link: '/core-philosophy' },
21-
{ label: 'Local Setup', link: '/local-setup' },
22-
{ label: 'Deployment', link: '/deployment' },
2320
{
24-
label: 'Architecture & Customization',
25-
collapsed: true,
21+
label: 'Getting Started',
2622
items: [
23+
{ label: 'Overview', link: '/getting-started/' },
24+
{ label: 'Core Philosophy', link: '/getting-started/core-philosophy' },
25+
{ label: 'Toolkit Architecture', link: '/getting-started/toolkit-architecture' },
26+
{ label: 'Local Setup', link: '/getting-started/local-setup' },
27+
{ label: 'Deployment', link: '/getting-started/deployment' },
28+
],
29+
},
30+
{
31+
label: 'Customization Guides',
32+
items: [
33+
{ label: 'Overview', link: '/customization/' },
2734
{
28-
label: 'Overview',
29-
link: '/architecture/index',
30-
},
31-
32-
{
33-
label: 'Understanding the Toolkit Architecture',
34-
link: '/architecture/toolkit-architecture',
35-
},
36-
{
37-
label: 'Taking Ownership of Packages',
38-
link: '/architecture/taking-ownership-of-packages',
35+
label: 'Hosting Packages for Customization',
36+
link: '/customization/hosting-packages-for-customization',
3937
},
4038
{
4139
label: 'Guide: Customizing the UI Theme',
42-
link: '/architecture/guide-customizing-the-ui',
40+
link: '/customization/guide-customizing-the-ui',
4341
},
4442
],
4543
},
@@ -81,7 +79,7 @@ export default defineConfig({
8179
{ label: 'Middleware', link: '/api-server/architecture/middleware' },
8280
{ label: 'Data Seeding & Fixtures', link: '/api-server/architecture/data-seeding-and-fixtures' },
8381
{ label: 'Generic Data Endpoint', link: '/api-server/architecture/generic-data-endpoint' },
84-
{ label: 'Error Handling', link: '/api-server/features/error-handling' },
82+
{ label: 'Error Handling', link: '/api-server/architecture/error-handling' },
8583
],
8684
},
8785
{
@@ -97,7 +95,7 @@ export default defineConfig({
9795
{ label: 'Deployment', link: '/api-server/deployment' },
9896
],
9997
},
100-
{
98+
{
10199
label: 'Web Dashboard',
102100
collapsed: true,
103101
items: [
@@ -117,7 +115,7 @@ export default defineConfig({
117115
label: 'Architecture',
118116
collapsed: true,
119117
items: [
120-
{ label: 'Overview', link: '/web-dashboard/architecture/index' },
118+
{ label: 'Overview', link: '/web-dashboard/architecture/' },
121119
{ label: 'State Management (BLoC)', link: '/web-dashboard/architecture/state-management' },
122120
{ label: 'Routing (go_router)', link: '/web-dashboard/architecture/routing' },
123121
],

src/content/docs/api-server/architecture/index.mdx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,3 @@ description: Dive deeper into the architectural patterns and advanced concepts o
66
import { Card, CardGrid } from '@astrojs/starlight/components';
77

88
This section explores the core architectural patterns and advanced concepts that underpin the API server, providing a deeper understanding of its design.
9-
10-
<CardGrid>
11-
<Card title="Dependency Injection" icon="tree-structure">
12-
Learn how the server manages and provides dependencies throughout the application.
13-
[Read more &rarr;](/docs/api-server/advanced/dependency-injection)
14-
</Card>
15-
<Card title="Middleware" icon="layers">
16-
Understand how middleware is used for cross-cutting concerns like authentication and logging.
17-
[Read more &rarr;](/docs/api-server/advanced/middleware)
18-
</Card>
19-
</CardGrid>

src/content/docs/api-server/features/index.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,4 @@ The API server is packed with features designed for a modern, scalable news appl
2424
Explore the granular permission system that secures the API.
2525
[Read more &rarr;](/docs/api-server/features/rbac)
2626
</Card>
27-
<Card title="Remote Configuration" icon="settings">
28-
Learn how you can dynamically control app behavior from the server.
29-
[Read more &rarr;](/docs/api-server/features/remote-config)
30-
</Card>
3127
</CardGrid>

src/content/docs/api-server/guides/index.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,4 @@ This section provides practical, step-by-step guides for specific configuration
2424
See how to swap out the default email service with your own implementation.
2525
[Read more &rarr;](/docs/api-server/guides/implement-alternative-email-client/)
2626
</Card>
27-
<Card title="Understand Database Seeding" icon="seed">
28-
Learn how the server automatically populates the database with initial data.
29-
[Read more &rarr;](/docs/api-server/guides/understand-database-seeding/)
30-
</Card>
3127
</CardGrid>

src/content/docs/api-server/local-setup.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ This guide will walk you through setting up the API server in a local developmen
6161

6262
On its first startup, the server automatically connects to your MongoDB database and seeds it with initial data (countries, topics, users, etc.). This process is idempotent, meaning you can safely restart the server multiple times without creating duplicate data.
6363

64-
For more details on how this works, see the [Understand Database Seeding](/docs/api-server/guides/understand-database-seeding) guide.
64+
For more details on how this works, see the [Understand Database Seeding](/docs/api-server/architecture/data-seeding-and-fixtures) guide.
6565
</Steps>

src/content/docs/architecture/index.mdx

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/content/docs/architecture/guide-customizing-the-ui.mdx renamed to src/content/docs/customization/guide-customizing-the-ui.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
title: 'Guide: Customizing the UI Theme'
3-
description: A practical, step-by-step guide to customizing the UI theme by taking ownership of the ui_kit package.
3+
description: A practical, step-by-step guide to customizing the UI theme by creating a private copy of the ui_kit package.
44
---
55
import { Steps, Aside } from '@astrojs/starlight/components';
66

77
This guide provides a hands-on, practical walkthrough of the most common and impactful customization task: changing the application's visual theme.
88

9-
By following this guide, you will learn the complete, end-to-end workflow for modifying a shared package and seeing that change reflected in both the Mobile Client and the Web Dashboard. This process is the key to unlocking the full customization potential of the toolkit.
9+
By following this guide, you will learn the complete, end-to-end workflow for modifying a shared package and seeing that change reflected in both the Mobile Client and the Web Dashboard.
1010

1111
### The Goal
1212

13-
Our goal is to change the default blue accent color of the application to a new color, for example, deep purple. To do this, we will take ownership of the `ui_kit` package, modify its theme file, and then instruct both of our Flutter applications to use our modified version.
13+
Our goal is to change the default blue accent color of the application to a new color, for example, deep purple. To do this, we will create a private copy of the `ui_kit` package, modify its theme file, and then instruct both of our Flutter applications to use our modified version.
1414

1515
<Steps>
16-
1. **Take Ownership of the `ui_kit` Package**
16+
1. **Host a Private Copy of the `ui_kit` Package**
1717

1818
Before you can change any code, you must have your own version of the `ui_kit` package hosted in a private repository.
1919

20-
- Follow the [**Taking Ownership of Packages**](/docs/architecture/02-taking-ownership-of-packages/) guide from start to finish, but for the `ui_kit` repository.
20+
- Follow the [**Hosting Packages for Customization**](/docs/customization/hosting-packages-for-customization/) guide from start to finish, but for the `ui_kit` repository.
2121
- **Clone URL:** `https://github.com/flutter-news-app-full-source-code/ui-kit.git`
2222

2323
Once you have successfully pushed the `ui_kit` code to your own private GitHub repository, you are ready to proceed.
@@ -30,7 +30,7 @@ Our goal is to change the default blue accent color of the application to a new
3030
- Locate the `_commonSubThemesData` constant. This is where you can make global changes to widget styles.
3131
- Let's change the `appBarBackgroundSchemeColor` to `primary` to make the app bar more prominent.
3232

33-
```dart title="packages/ui-kit/lib/src/theme/app_theme.dart"
33+
```dart title="ui_kit/lib/src/theme/app_theme.dart"
3434
const FlexSubThemesData _commonSubThemesData = FlexSubThemesData(
3535
// ...
3636
// Change the app bar background color
@@ -90,4 +90,4 @@ Our goal is to change the default blue accent color of the application to a new
9090

9191
### Conclusion
9292

93-
You have successfully completed the core customization workflow. You now have a privately owned and modified `ui_kit` package that is consumed by both of your client applications. You can use this exact same process to customize any other shared package in the toolkit.
93+
You have successfully completed the core customization workflow. You now have a privately hosted and modified `ui_kit` package that is consumed by both of your client applications. You can use this exact same process to customize any other shared package in the toolkit.

src/content/docs/architecture/taking-ownership-of-packages.mdx renamed to src/content/docs/customization/hosting-packages-for-customization.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: Taking Ownership of Packages
3-
description: A step-by-step guide to cloning, hosting, and managing the shared packages for customization.
2+
title: 'Hosting Packages for Customization'
3+
description: A step-by-step guide to creating your own version of the shared packages to enable modification.
44
---
55
import { Steps, Aside } from '@astrojs/starlight/components';
66

7-
To unlock the full power of the Flutter News App Toolkit and make it truly your own, you must take ownership of the shared packages. The applications (Mobile Client, Web Dashboard) are designed to be customized, but the deepest and most impactful changes—like altering data models or redesigning the UI theme—happen within the shared packages.
7+
To enable customization of the Flutter News App Toolkit, you must host your own version of the shared packages. The applications (Mobile Client, Web Dashboard) are designed to be customized, but the deepest and most impactful changes—like altering data models or redesigning the UI theme—happen within the shared packages.
88

9-
This guide will walk you through the essential, one-time process of moving a shared package from the original public repository into your own private repository.
9+
This guide will walk you through the essential process of creating a private copy of a shared package from the original public repository.
1010

1111
<Aside type="caution" title="Critical Step">
1212
This is the most important guide for customizing the toolkit. You must follow this process for **any shared package** you intend to modify.
1313
</Aside>
1414

15-
### Why You Must Host the Packages Yourself
15+
### Why You Must Host a Private Copy
1616

17-
- **To Enable Customization:** You cannot push changes to the original public repositories. To modify a package, you need your own version that you control.
17+
- **To Enable Modification:** You cannot push changes to the original public repositories. To modify a package, you need your own version that you control.
1818
- **For Privacy and Control:** Hosting the packages in your own private repositories ensures that your proprietary changes, business logic, and customizations remain confidential.
1919
- **To Manage Updates:** It gives you full control over when and how you pull in future updates from the original toolkit.
2020

@@ -69,6 +69,6 @@ Let's walk through the process using the `core` package as an example. You will
6969

7070
</Steps>
7171

72-
**Congratulations!** You have now successfully taken ownership of the `core` package. It is now hosted in your private repository, and you are free to make any modifications you need.
72+
You have now successfully created a private copy of the `core` package. It is now hosted in your private repository, ready for any modifications you need to make.
7373

74-
The next step is to tell your applications (Mobile Client, Web Dashboard) to use *your* version of the package instead of the original one. The next guide, [**Guide: Customizing the UI Theme**](/docs/architecture/03-guide-customizing-the-ui/), will walk you through this process in a practical, hands-on example.
74+
The next step is to tell your applications (Mobile Client, Web Dashboard) to use *your* version of the package instead of the original one. The next guide, [**Guide: Customizing the UI Theme**](/docs/customization/guide-customizing-the-ui/), will walk you through this process in a practical, hands-on example.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: 'Customization Guides'
3+
description: Learn how to modify the shared packages to customize your applications.
4+
---
5+
import { Card, CardGrid } from '@astrojs/starlight/components';
6+
7+
This section provides practical, hands-on guides for customizing the toolkit by modifying the shared packages. Following these guides is the key to unlocking the full potential of the source code.
8+
9+
<CardGrid>
10+
<Card title="Hosting Packages for Customization" icon="key">
11+
This is the most critical guide. Learn how to create your own private version of a shared package to enable modification.
12+
[Read more &rarr;](/docs/customization/hosting-packages-for-customization/)
13+
</Card>
14+
<Card title="Guide: Customizing the UI Theme" icon="palette">
15+
Put theory into practice with a hands-on tutorial for customizing the UI theme by modifying the `ui_kit` package.
16+
[Read more &rarr;](/docs/customization/guide-customizing-the-ui/)
17+
</Card>
18+
</CardGrid>
File renamed without changes.

0 commit comments

Comments
 (0)