From d4020c452dc68aafedc0015ea931f464b1e86a3f Mon Sep 17 00:00:00 2001 From: Joanna May Date: Thu, 29 Aug 2024 15:07:05 -0500 Subject: [PATCH] fix: misc fixes (#62) * fix: file tree for backend architecture * fix: file tree in barrel files * fix: file tree for testing * fix: formatting * fix: file tree in architecture * fix: update landing page link * fix: url's and layout --- .../vgv_hero/vgv-hero-breakout.astro | 53 ++++++++---- src/content/docs/architecture/index.mdx | 85 ++++++++++--------- src/pages/index.astro | 28 +++--- 3 files changed, 95 insertions(+), 71 deletions(-) diff --git a/src/components/vgv_hero/vgv-hero-breakout.astro b/src/components/vgv_hero/vgv-hero-breakout.astro index aaee7a6..4319f5e 100644 --- a/src/components/vgv_hero/vgv-hero-breakout.astro +++ b/src/components/vgv_hero/vgv-hero-breakout.astro @@ -1,9 +1,10 @@ --- interface Props { - // featureImage: ImageMetadata; + firstUrl?: string; + secondUrl?: string; } -// const props = Astro.props; +const props = Astro.props; ---
-
-
- -
+ +
+
+ +
-
-
- +
+
+ +
-
+
-
-
- -
- + + diff --git a/src/content/docs/architecture/index.mdx b/src/content/docs/architecture/index.mdx index 9ff2414..c742bd9 100644 --- a/src/content/docs/architecture/index.mdx +++ b/src/content/docs/architecture/index.mdx @@ -3,6 +3,7 @@ title: Architecture description: Architecture best practices. --- +import { FileTree, TabItem, Tabs } from "@astrojs/starlight/components"; import Diagram from "~/components/diagram.astro"; import architectureDark from "./diagrams/layered_architecture_dark.png"; import architectureLight from "./diagrams/layered_architecture_light.png"; @@ -55,48 +56,48 @@ The presentation layer is the layer that includes the Flutter UI dependencies. I The presentation layer and state management live in the project's `lib` folder. The data and repository layers will live as separate packages within the project's `packages` folder. -Good ✅ - -```txt -my_app/ - |- lib/ - | |- login/ - | | |- bloc/ - | | | - login_bloc.dart - | | | - login_event.dart - | | | - login_state.dart - | | |- view/ - | | | - login_page.dart - | | | - view.dart - |- packages/ - | |- user_repository/ - | | |- lib/ - | | | |- src/ - | | | | |- models/ - | | | | | - models.dart - | | | | | - user.dart - | | | | |- user_repository.dart - | | | - user_repository.dart - | | |- test/ - | | | |- models/ - | | | | - user_test.dart - | | | - user_repository_test.dart - | |- api_client/ - | | |- lib/ - | | | |- src/ - | | | | - api_client.dart - | | | - api_client.dart - | | |- test/ - | | | - api_client_test.dart - |- test/ - | |- login/ - | | |- bloc/ - | | | - login_bloc_test.dart - | | | - login_event_test.dart - | | | - login_state_test.dart - | | |- view/ - | | | - login_page_test.test -``` + + +- my_app/ + - lib/ + - login/ + - bloc/ + - login_bloc.dart + - login_event.dart + - login_state.dart + - view/ + - login_page.dart + - view.dart + - packages/ + - user_repository/ + - lib/ + - src/ + - models/ + - models.dart + - user.dart + - user_repository.dart + - user_repository.dart + - test/ + - models/ + - user_test.dart + - user_repository_test.dart + - api_client/ + - lib/ + - src/ + - api_client.dart + - api_client.dart + - test/ + - api_client_test.dart + - test/ + - login/ + - bloc/ + - login_bloc_test.dart + - login_event_test.dart + - login_state_test.dart + - view/ + - login_page_test.test + + Each layer abstracts the underlying layers' implementation details. Avoid indirect dependencies between layers. For example, the repository layer shouldn't need to know how the data is fetched in the data layer, and the presentation layer shouldn't directly access values from Shared Preferences. In other words, the implementation details should not leak between the layers. Using layered architecture ensures flexibility, reusability, and testability as the codebase grows. diff --git a/src/pages/index.astro b/src/pages/index.astro index 2de0d6e..01b4890 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -40,7 +40,7 @@ const props = await generateStarlightPageRouteData({ actions: [ { text: "Read the Best Practices", - link: "/architecture", + link: "/very_good_engineering/philosophy/", icon: "right-arrow", variant: "primary", }, @@ -103,7 +103,10 @@ const actions = props.entry.data.hero?.actions ?? [];
- + SHIP FASTER @@ -133,20 +136,23 @@ const actions = props.entry.data.hero?.actions ?? []; 💻 The Command-Line Interface to generate scalable templates and use helpful commands. -

- Generate a + Generate a Flutter app, Flame game - , + ,  Flutter package - , - Dart package, + ,  + Dart package federated plugin - , or - Dart CLI + , or  + Dart CLI  with one command.

    @@ -192,7 +198,7 @@ const actions = props.entry.data.hero?.actions ?? []; Hot Reload -
  • +