# seasonstar/bibi-ionic architecture

> Architecture diagram of the GitHub repository seasonstar/bibi-ionic, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/seasonstar/bibi-ionic
- Repository: https://github.com/seasonstar/bibi-ionic

## Overview

bibi-ionic is a Chinese-language Ionic shopping and social-commerce mobile app paired with the bibi server and a separate WeChat frontend. Users browse banners, categories, products and community posts; manage accounts, carts and orders; and proceed through checkout. The sampled controllers show product, board and order API access, while the README documents native mobile capabilities. Several feature implementations and runtime integrations were not sampled, so uncertain connections are omitted or marked optional.

Main entry points: [`www/js/controllers.js`](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js) (Screen controllers), [`www/lib/ionic-platform-web-client/src/core/core.js`](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/core.js) (Platform core), [`www/js/app.js`](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/app.js) (App and routing), [`www/lib/ionic-platform-web-client/src/analytics/storage.js`](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/analytics/storage.js) (Analytics storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Mobile app"]
  node_routing["App and routing<br/>[app.js]"]
  node_controllers["Screen controllers<br/>[controllers.js]"]
  node_templates["Screen templates<br/>[templates.js]"]
  node_services["App services<br/>[services.js]"]
end

subgraph group_commerce["Shopping and orders"]
  node_catalog["Catalog and boards<br/>[controllers.js]"]
  node_cart["Cart and checkout<br/>[controllers.js]"]
  node_orders["Orders and coupons<br/>[controllers.js]"]
  node_accounts["Account and auth<br/>[controllers.js]"]
end

subgraph group_social["Community and media"]
  node_photogram["Photogram community<br/>[photogram.js]"]
  node_photo["Photo capture<br/>[photo.js]"]
  node_geo["Geolocation<br/>[geo.js]"]
end

subgraph group_platform["Ionic platform services"]
  node_platformcore["Platform core<br/>[core.js]"]
  node_events["Core events<br/>[events.js]"]
  node_logger["Core logger<br/>[logger.js]"]
  node_storage[("Core storage<br/>[storage.js]")]
  node_promise["Deferred promises<br/>[promise.js]"]
  node_settings["Platform settings<br/>[settings.js]"]
  node_analyticsstorage["Analytics storage<br/>[storage.js]"]
  node_deploy["Over-the-air deploy<br/>[deploy.js]"]
  node_push["Push messaging<br/>[push.js]"]
end

node_shopper(("Shopper"))
node_backend{{"Bibi server"}}
node_native{{"Cordova plugins"}}

node_shopper -->|"opens"| node_routing
node_routing -->|"routes to"| node_controllers
node_routing -->|"restores cart"| node_services
node_controllers -.->|"renders"| node_templates
node_controllers -->|"calls"| node_services
node_catalog -->|"requests catalog"| node_backend
node_cart -->|"requests cart"| node_backend
node_orders -->|"requests orders"| node_backend
node_accounts -.->|"requests account"| node_backend
node_controllers -->|"posts content"| node_photogram
node_controllers -->|"opens camera"| node_photo
node_controllers -.->|"uses location"| node_geo
node_routing -->|"loads core"| node_platformcore
node_platformcore -->|"creates emitter"| node_events
node_platformcore -->|"creates storage"| node_storage
node_platformcore -->|"creates logger"| node_logger
node_storage -->|"uses deferred"| node_promise
node_analyticsstorage -->|"scopes keys"| node_settings
node_analyticsstorage -->|"gets storage"| node_platformcore
node_platformcore -->|"waits for plugins"| node_native
node_deploy -.->|"syncs updates"| node_backend
node_push -.->|"uses push plugin"| node_native

click node_routing "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/app.js"
click node_controllers "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js"
click node_templates "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/templates.js"
click node_services "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/services.js"
click node_catalog "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js"
click node_cart "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js"
click node_orders "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js"
click node_accounts "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js"
click node_photogram "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/photogram.js"
click node_photo "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/photo.js"
click node_geo "https://github.com/seasonstar/bibi-ionic/blob/master/www/js/geo.js"
click node_platformcore "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/core.js"
click node_events "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/events.js"
click node_logger "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/logger.js"
click node_storage "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/storage.js"
click node_promise "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/promise.js"
click node_settings "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/settings.js"
click node_analyticsstorage "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/analytics/storage.js"
click node_deploy "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/deploy/deploy.js"
click node_push "https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/push/push.js"

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_routing,node_controllers,node_templates,node_services toneBlue
class node_catalog,node_cart,node_orders,node_accounts toneAmber
class node_photogram,node_photo,node_geo,node_backend toneMint
class node_platformcore,node_events,node_logger,node_storage,node_promise,node_settings,node_analyticsstorage,node_deploy,node_push toneRose
class node_shopper,node_native toneIndigo
```

## Components

### Mobile app

- [App and routing](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/app.js): `www/js/app.js`
- [Screen controllers](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js): `www/js/controllers.js`
- [Screen templates](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/templates.js): `www/js/templates.js`
- [App services](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/services.js): `www/js/services.js`

### Shopping and orders

- [Catalog and boards](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js): `www/js/controllers.js`
- [Cart and checkout](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js): `www/js/controllers.js`
- [Orders and coupons](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js): `www/js/controllers.js`
- [Account and auth](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/controllers.js): `www/js/controllers.js`

### Community and media

- [Photogram community](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/photogram.js): `www/js/photogram.js`
- [Photo capture](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/photo.js): `www/js/photo.js`
- [Geolocation](https://github.com/seasonstar/bibi-ionic/blob/master/www/js/geo.js): `www/js/geo.js`

### Ionic platform services

- [Platform core](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/core.js): `www/lib/ionic-platform-web-client/src/core/core.js`
- [Core events](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/events.js): `www/lib/ionic-platform-web-client/src/core/events.js`
- [Core logger](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/logger.js): `www/lib/ionic-platform-web-client/src/core/logger.js`
- [Core storage](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/storage.js): `www/lib/ionic-platform-web-client/src/core/storage.js`
- [Deferred promises](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/promise.js): `www/lib/ionic-platform-web-client/src/core/promise.js`
- [Platform settings](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/core/settings.js): `www/lib/ionic-platform-web-client/src/core/settings.js`
- [Analytics storage](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/analytics/storage.js): `www/lib/ionic-platform-web-client/src/analytics/storage.js`
- [Over-the-air deploy](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/deploy/deploy.js): `www/lib/ionic-platform-web-client/src/deploy/deploy.js`
- [Push messaging](https://github.com/seasonstar/bibi-ionic/blob/master/www/lib/ionic-platform-web-client/src/push/push.js): `www/lib/ionic-platform-web-client/src/push/push.js`

### Other components

- **Shopper**
- **Bibi server**
- **Cordova plugins**

## Connections

- Shopper → App and routing: opens (evidence: `www/js/app.js`)
- App and routing → Screen controllers: routes to (evidence: `www/js/app.js`)
- App and routing → App services: restores cart (evidence: `www/js/app.js`)
- Screen controllers → Screen templates: renders
- Screen controllers → App services: calls (evidence: `www/js/controllers.js`)
- Catalog and boards → Bibi server: requests catalog (evidence: `www/js/controllers.js`)
- Cart and checkout → Bibi server: requests cart
- Orders and coupons → Bibi server: requests orders (evidence: `www/js/controllers.js`)
- Account and auth → Bibi server: requests account
- Screen controllers → Photogram community: posts content (evidence: `www/js/controllers.js`)
- Screen controllers → Photo capture: opens camera (evidence: `www/js/controllers.js`)
- Screen controllers → Geolocation: uses location
- App and routing → Platform core: loads core (evidence: `www/js/app.js`)
- Platform core → Core events: creates emitter (evidence: `www/lib/ionic-platform-web-client/src/core/core.js`)
- Platform core → Core storage: creates storage (evidence: `www/lib/ionic-platform-web-client/src/core/core.js`)
- Platform core → Core logger: creates logger (evidence: `www/lib/ionic-platform-web-client/src/core/core.js`)
- Core storage → Deferred promises: uses deferred (evidence: `www/lib/ionic-platform-web-client/src/core/storage.js`)
- Analytics storage → Platform settings: scopes keys (evidence: `www/lib/ionic-platform-web-client/src/analytics/storage.js`)
- Analytics storage → Platform core: gets storage (evidence: `www/lib/ionic-platform-web-client/src/analytics/storage.js`)
- Platform core → Cordova plugins: waits for plugins (evidence: `www/lib/ionic-platform-web-client/src/core/core.js`)
- Over-the-air deploy → Bibi server: syncs updates
- Push messaging → Cordova plugins: uses push plugin
