# habib-utsho/b13-m7-con-1-ph-play-store architecture

> Architecture diagram of the GitHub repository habib-utsho/b13-m7-con-1-ph-play-store, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/habib-utsho/b13-m7-con-1-ph-play-store
- Repository: https://github.com/habib-utsho/b13-m7-con-1-ph-play-store

## Overview

1. This is a single-page React application built with Vite. The repo is organized around client-side routing, reusable UI components, and local data/state management rather than any backend service code.

2. The entry path is the normal Vite React setup: `src/main.jsx` mounts the app, `src/index.css` holds global styling, and `src/router/Routes.jsx` centralizes route definitions. `src/layout/RootLayout.jsx` likely wraps all pages with shared chrome.

3. The routing structure is the main architectural spine. Pages are split into `homepage`, `apps`, `appDetails`, `dashboard`, `installApps`, and `NotFoundPage`, which suggests a multi-view product with a landing experience plus app catalog and user-specific management screens.

4. Shared layout components live in `src/components/shared` and provide the persistent shell: `Navbar`, `Footer`, and `MyNavLink`. These components form the outer boundary around route content and are likely used by `RootLayout`.

5. The homepage has its own component cluster under `src/components/homepage`: `Banner`, `Stats`, and `TrendingApps`. This indicates the landing page is composed from domain-specific sections rather than a single monolithic page component.

6. Reusable app presentation is centralized in `src/components/ui/AppCard.jsx`. That strongly suggests app lists, trending sections, catalog pages, and possibly dashboard views all render the same underlying app card pattern.

7. Application data appears to be local/static rather than fetched from a server. The presence of `public/data.json` and the custom hook `src/hooks/useApps.jsx` implies the app catalog is loaded from bundled JSON and then consumed across pages.

8. User-specific installed-app state is managed through React context in `src/context/InstallAppsContext.jsx` and `src/context/InstalledAppsProvider.jsx`. This is the main client-side state boundary in the repo and likely powers install/uninstall behavior across multiple routes.

9. The `Apps`, `AppDetails`, and `InstallApps` pages likely form the core product workflow: browse apps, view a specific app’s details, and manage installed apps. The shared context makes that state available without prop drilling across route boundaries.

10. `Dashboard` appears to be a separate top-level view, probably summarizing installed apps or usage stats. Combined with `Stats` on the homepage, the UI seems to distinguish between public discovery content and authenticated/owned app management, even though no auth code is visible in the tree.

11. `public/` and `src/assets/` hold static assets, including a design file (`Hero IO.fig`) and images. This implies the UI is heavily design-driven, with most visual content sourced from local assets rather than dynamic media services.

12. The deployment/runtime boundary is static hosting. `vercel.json` suggests the app is intended to be deployed as an SPA on Vercel, which matters for routing because client-side routes must be supported by host rewrites.

13. In diagram terms, the main data flow is: static JSON/app data and installed-app context feed hooks and page components, which render cards and sections inside the root layout, while the router swaps page bodies without a full reload.

14. The important architectural boundary is between global shell and route content. Shared layout/navigation lives outside the page modules, page-specific composition lives inside each route folder, and cross-page state is isolated in context plus the app-loading hook.

Main entry points: [`src/router/Routes.jsx`](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/router/Routes.jsx) (Routes), [`src/pages/homepage/Homepage.jsx`](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/homepage/Homepage.jsx) (Homepage), [`src/layout/RootLayout.jsx`](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/layout/RootLayout.jsx) (Root layout), [`src/main.jsx`](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/main.jsx) (main)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_shell["App shell"]
  node_main["main<br/>entrypoint<br/>[main.jsx]"]
  node_routes["Routes<br/>router<br/>[Routes.jsx]"]
  node_root_layout["Root layout<br/>[RootLayout.jsx]"]
  node_navbar["Navbar<br/>shared nav<br/>[Navbar.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
  node_navlink["Nav link<br/>link helper<br/>[MyNavLink.jsx]"]
  node_styles["Global styles<br/>stylesheet<br/>[index.css]"]
end

subgraph group_feature_views["Feature views"]
  node_homepage["Homepage<br/>[Homepage.jsx]"]
  node_banner["Banner<br/>hero section<br/>[Banner.jsx]"]
  node_stats["Stats<br/>summary section<br/>[Stats.jsx]"]
  node_trending["Trending apps<br/>feature section<br/>[TrendingApps.jsx]"]
  node_apps_page["Apps<br/>page<br/>[Apps.jsx]"]
  node_details_page["App details<br/>page<br/>[AppDetails.jsx]"]
  node_installs_page["Install apps<br/>page<br/>[InstallApps.jsx]"]
  node_dashboard["Dashboard<br/>page<br/>[Dashboard.jsx]"]
  node_not_found["Not found<br/>fallback page<br/>[NotFoundPage.jsx]"]
  node_app_card["App card<br/>ui card<br/>[AppCard.jsx]"]
end

subgraph group_state_data["State and data"]
  node_use_apps["useApps<br/>data hook<br/>[useApps.jsx]"]
  node_install_ctx["Install context<br/>state context"]
  node_install_provider["Installed provider<br/>state provider"]
  node_data_json[("App data<br/>static dataset<br/>[data.json]")]
end

node_main -->|"renders"| node_routes
node_main -->|"wraps"| node_install_provider
node_main -->|"loads"| node_styles
node_routes -->|"uses"| node_root_layout
node_routes -->|"route"| node_homepage
node_routes -->|"route"| node_apps_page
node_routes -->|"route"| node_details_page
node_routes -->|"route"| node_dashboard
node_routes -->|"route"| node_installs_page
node_routes -->|"fallback"| node_not_found
node_root_layout -->|"contains"| node_navbar
node_root_layout -->|"contains"| node_footer
node_navbar -->|"uses"| node_navlink
node_homepage -->|"composes"| node_banner
node_homepage -->|"composes"| node_stats
node_homepage -->|"composes"| node_trending
node_apps_page -->|"reads"| node_use_apps
node_details_page -->|"reads"| node_use_apps
node_trending -->|"renders"| node_app_card
node_apps_page -->|"renders"| node_app_card
node_details_page -->|"renders"| node_app_card
node_installs_page -->|"consumes"| node_install_ctx
node_dashboard -->|"consumes"| node_install_ctx
node_install_provider -->|"provides"| node_install_ctx
node_use_apps -->|"loads"| node_data_json
node_not_found -.->|"inherits shell"| node_root_layout

click node_main "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/main.jsx"
click node_routes "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/router/Routes.jsx"
click node_root_layout "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/layout/RootLayout.jsx"
click node_navbar "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/shared/Navbar.jsx"
click node_footer "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/shared/Footer.jsx"
click node_navlink "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/shared/MyNavLink.jsx"
click node_homepage "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/homepage/Homepage.jsx"
click node_banner "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/homepage/Banner.jsx"
click node_stats "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/homepage/Stats.jsx"
click node_trending "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/homepage/TrendingApps.jsx"
click node_apps_page "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/apps/Apps.jsx"
click node_details_page "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/appDetails/AppDetails.jsx"
click node_installs_page "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/installApps/InstallApps.jsx"
click node_dashboard "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/dashboard/Dashboard.jsx"
click node_not_found "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/NotFoundPage/NotFoundPage.jsx"
click node_app_card "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/ui/AppCard.jsx"
click node_use_apps "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/hooks/useApps.jsx"
click node_install_ctx "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/context/InstallAppsContext.jsx"
click node_install_provider "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/context/InstalledAppsProvider.jsx"
click node_data_json "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/public/data.json"
click node_styles "https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/index.css"

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_main,node_routes,node_root_layout,node_navbar,node_footer,node_navlink,node_styles toneBlue
class node_homepage,node_banner,node_stats,node_trending,node_apps_page,node_details_page,node_installs_page,node_dashboard,node_not_found,node_app_card toneAmber
class node_use_apps,node_install_ctx,node_install_provider,node_data_json toneMint
```

## Components

### App shell

Vite entry, global layout, and shared chrome

- [main](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/main.jsx): entrypoint · Bootstraps React and mounts the app · `src/main.jsx`
- [Routes](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/router/Routes.jsx): router · Central route map for all pages · `src/router/Routes.jsx`
- [Root layout](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/layout/RootLayout.jsx): layout · Wraps routed content with shared shell · `src/layout/RootLayout.jsx`
- [Navbar](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/shared/Navbar.jsx): shared nav · Top-level navigation chrome · `src/components/shared/Navbar.jsx`
- [Footer](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/shared/Footer.jsx): shared footer · Bottom chrome shared across pages · `src/components/shared/Footer.jsx`
- [Nav link](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/shared/MyNavLink.jsx): link helper · Navigation link wrapper used by the shell · `src/components/shared/MyNavLink.jsx`
- [Global styles](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/index.css): stylesheet · Global CSS baseline for the app · `src/index.css`

### Feature views

Route pages and homepage composition

- [Homepage](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/homepage/Homepage.jsx): page · Landing page route · `src/pages/homepage/Homepage.jsx`
- [Banner](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/homepage/Banner.jsx): hero section · Landing hero content · `src/components/homepage/Banner.jsx`
- [Stats](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/homepage/Stats.jsx): summary section · Homepage metrics and highlights · `src/components/homepage/Stats.jsx`
- [Trending apps](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/homepage/TrendingApps.jsx): feature section · Homepage app spotlight section · `src/components/homepage/TrendingApps.jsx`
- [Apps](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/apps/Apps.jsx): page · App catalog browsing route · `src/pages/apps/Apps.jsx`
- [App details](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/appDetails/AppDetails.jsx): page · Single app detail route · `src/pages/appDetails/AppDetails.jsx`
- [Install apps](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/installApps/InstallApps.jsx): page · Installed apps management route · `src/pages/installApps/InstallApps.jsx`
- [Dashboard](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/dashboard/Dashboard.jsx): page · User-facing overview route · `src/pages/dashboard/Dashboard.jsx`
- [Not found](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/pages/NotFoundPage/NotFoundPage.jsx): fallback page · Catch-all route for unmatched paths · `src/pages/NotFoundPage/NotFoundPage.jsx`
- [App card](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/components/ui/AppCard.jsx): ui card · Reusable app presentation used across views · `src/components/ui/AppCard.jsx`

### State and data

Local catalog data, hooks, and install-state context

- [useApps](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/hooks/useApps.jsx): data hook · Loads and shapes catalog app data · `src/hooks/useApps.jsx`
- [Install context](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/context/InstallAppsContext.jsx): state context · Context boundary for installed-app state · `src/context/InstallAppsContext.jsx`
- [Installed provider](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/src/context/InstalledAppsProvider.jsx): state provider · Provides install/uninstall state to the tree · `src/context/InstalledAppsProvider.jsx`
- [App data](https://github.com/habib-utsho/b13-m7-con-1-ph-play-store/blob/main/public/data.json): static dataset · Bundled catalog data source · `public/data.json`

## Connections

- main → Routes: renders · Entry mounts the route system
- main → Installed provider: wraps · Application tree is wrapped with install state
- main → Global styles: loads · Global stylesheet is applied at startup
- Routes → Root layout: uses · Shared shell hosts routed content
- Routes → Homepage: route · Landing page path
- Routes → Apps: route · Catalog path
- Routes → App details: route · App details path
- Routes → Dashboard: route · Dashboard path
- Routes → Install apps: route · Installed apps path
- Routes → Not found: fallback · Catch-all route
- Root layout → Navbar: contains · Persistent top navigation
- Root layout → Footer: contains · Persistent bottom chrome
- Navbar → Nav link: uses · Navigation items are built from the shared link helper
- Homepage → Banner: composes · Landing hero section
- Homepage → Stats: composes · Landing metrics section
- Homepage → Trending apps: composes · Landing app spotlight section
- Apps → useApps: reads · Catalog page consumes local app data
- App details → useApps: reads · Details view looks up app records
- Trending apps → App card: renders · Featured apps use the reusable card
- Apps → App card: renders · Catalog items use the reusable card
- App details → App card: renders · Related or selected app presentation uses the same card
- Install apps → Install context: consumes · Installed apps view reads shared state
- Dashboard → Install context: consumes · Dashboard reflects installed-app state
- Installed provider → Install context: provides · Provider supplies the shared context value
- useApps → App data: loads · Hook sources the catalog from bundled JSON
- Not found → Root layout: inherits shell · Fallback page still sits inside the shared layout
