# shoutem/school architecture

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

- Interactive diagram: https://gitdiagram.com/shoutem/school
- Repository: https://github.com/shoutem/school

## Overview

This repository is a portfolio of independent React Native tutorial apps, not one single product. Each top-level app folder is a self-contained mobile application with its own JS entrypoints, native Android/iOS shells, and app-specific state/data layer.

The common mobile-app shape is consistent across most folders: `index.android.js` and `index.ios.js` boot the React Native app, `src/` holds the UI/state logic, and `android/` + `ios/` contain the native wrappers, assets, and platform build files. Tests live in `__tests__/`, and most apps use Redux-style state management or similar unidirectional flows.

`ChatApp` is the clearest full-stack example. Its front end is split into UI components, containers, actions, reducers, and a `firebase.js` integration layer. The app reads/writes chat data through Firebase, and its iOS folder includes vendored Firebase frameworks plus `GoogleService-Info.plist`, showing that Firebase is a first-class external dependency.

`ChatAppFirebaseFunctions` is the backend companion for `ChatApp`. It contains Firebase Realtime Database rules and Cloud Functions, so the system boundary is client app ↔ Firebase backend ↔ serverless functions. That backend layer handles push/notification or database-side logic rather than running as a standalone server.

`Recipes_app` is the most architecturally complex subtree. It is a Shoutem-based app platform with a root app plus a large `extensions/` directory. The platform is extension-driven: each extension declares metadata in `extension.json` and typically has an `app/` part for the mobile runtime and a `server/` part for builder/admin UI and content configuration.

Inside `Recipes_app/extensions`, the mobile-side extensions provide feature screens and components such as navigation, auth, page rendering, photos, events, news, RSS, video, YouTube, Shopify, web view, loyalty, push notifications, and analytics. The server-side counterparts define configuration pages, reducers, CMS-style forms, and data schemas, so the architecture is split between runtime content consumption and authoring/configuration.

The `Recipes_app/server` folders are not generic backend APIs; they are extension-specific admin/build surfaces. Many contain `data-schemas/`, page components, reducers, and builder SDK helpers, which indicates a content-management and app-builder model rather than a traditional client-server CRUD backend.

`Recipes_app/scripts` provides the platform tooling that glues the system together. The scripts handle build, bundle, configuration, extension installation, platform updates, and environment-specific app assembly. This means the root app is dynamically composed from a selected set of extensions and platform settings.

A key architectural boundary in `Recipes_app` is content schema vs. presentation. Extensions such as `shoutem.cms`, `shoutem.events`, `shoutem.news`, `shoutem.menu`, `shoutem.products`, and `shoutem.places` define schemas and server-side configuration, while their `app/` folders render lists, details, maps, and media views from those content models.

Several extensions provide cross-cutting infrastructure rather than end-user features. Examples include navigation, theme, persistence, analytics, code push, push notifications, and auth. These modules wrap the app shell, inject reducers/middleware, and alter routing, theming, or device capabilities across many feature extensions.

The other standalone sample apps are each narrow vertical demos with their own local data flow. For example, `HackerNewsApp` centers on `HNApi`, store/state management, story/detail/comment actions, and voting; `MusicApp` ties player UI to SoundCloud/Flickr helpers; `TravelApp` uses a packing list and Flickr-backed images; `CryptoDataVizApp` is a data-visualization app with graph components and helper logic; `LiveInstagram` focuses on camera/filter rendering; and `LunchSpotApp` centers on recommendations and map/topic views.

`_ChatApp` is a near-duplicate/built variant of the chat sample, including vendored CocoaPods and Firebase artifacts. It shows the same architecture as `ChatApp`, but with checked-in native dependencies and generated iOS support files.

Overall, the repo’s diagram should show a monorepo of isolated tutorial apps, with `Recipes_app` as an extension-based platform and `ChatApp` + `ChatAppFirebaseFunctions` as the only obvious full-stack client/server pair. The dominant patterns are React Native UI, Redux-style state flow, native platform shells, and external integrations such as Firebase, SoundCloud, Flickr, Shopify, analytics SDKs, and push-notification services.

Main entry points: [`Recipes_app/extensions`](https://github.com/shoutem/school/tree/master/Recipes_app/extensions) (Extensions), [`ChatApp`](https://github.com/shoutem/school/tree/master/ChatApp) (ChatApp), [`Recipes_app`](https://github.com/shoutem/school/tree/master/Recipes_app) (Recipes app), [`HackerNewsApp`](https://github.com/shoutem/school/tree/master/HackerNewsApp) (HackerNewsApp)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_chat["Chat stack"]
  node_chatapp["ChatApp<br/>RN app"]
  node_chat_ui["Chat UI<br/>components"]
  node_chat_containers["Containers<br/>ui wiring"]
  node_chat_state["State flow<br/>redux"]
  node_chat_firebase["Firebase<br/>integration<br/>[firebase.js]"]
  node_chat_backend["Functions<br/>Firebase backend"]
end

subgraph group_group_recipes["Recipes platform"]
  node_recipes_app["Recipes app<br/>Shoutem platform"]
  node_recipes_shell["App shell<br/>RN entry<br/>[index.js]"]
  node_recipes_scripts["Build scripts<br/>tooling"]
  node_recipes_extensions["Extensions<br/>modules"]
  node_recipes_nav["Navigation<br/>extension<br/>[shoutem.navigation]"]
  node_recipes_cms["CMS<br/>extension<br/>[shoutem.cms]"]
  node_recipes_loyalty["Loyalty<br/>extension<br/>[shoutem.loyalty]"]
  node_recipes_shopify["Shopify<br/>extension<br/>[shoutem.shopify]"]
  node_recipes_news["News<br/>content ext<br/>[shoutem.news]"]
  node_recipes_media["Media feeds<br/>content ext<br/>[shoutem.rss]"]
  node_recipes_favorites["Favorites<br/>infrastructure<br/>[shoutem.favorites]"]
  node_recipes_push["Push<br/>infrastructure"]
  node_recipes_theme["Theme<br/>infrastructure<br/>[shoutem.theme]"]
end

subgraph group_group_samples["Sample apps"]
  node_hacknews["HackerNewsApp<br/>RN app"]
  node_hacknews_api["HN API<br/>network layer<br/>[HNApi.js]"]
  node_hacknews_store["Store<br/>state<br/>[Store.js]"]
  node_musicapp["MusicApp<br/>RN app"]
  node_music_player["Player<br/>media UI<br/>[Player.js]"]
  node_music_helpers["Helpers<br/>integrations"]
  node_travelapp["TravelApp<br/>RN app"]
  node_travel_state["Packing flow<br/>state<br/>[store.js]"]
  node_cryptoapp["CryptoDataVizApp<br/>RN app"]
  node_crypto_graphs["Graphs<br/>visualization<br/>[StreamGraph.js]"]
  node_liveinsta["LiveInstagram<br/>RN app"]
  node_lunchspot["LunchSpotApp<br/>RN app"]
  node_commitapp["CommitApp<br/>RN app"]
  node_colorpicker["ColorPicker<br/>RN app<br/>[App.js]"]
end

node_repo_root["school<br/>monorepo"]

node_repo_root -->|"hosts"| node_chatapp
node_repo_root -->|"hosts"| node_chat_backend
node_repo_root -->|"hosts"| node_recipes_app
node_repo_root -->|"hosts"| node_hacknews
node_repo_root -->|"hosts"| node_musicapp
node_repo_root -->|"hosts"| node_travelapp
node_repo_root -->|"hosts"| node_cryptoapp
node_repo_root -->|"hosts"| node_liveinsta
node_repo_root -->|"hosts"| node_lunchspot
node_repo_root -->|"hosts"| node_commitapp
node_repo_root -->|"hosts"| node_colorpicker
node_chatapp -->|"renders"| node_chat_ui
node_chatapp -->|"connects"| node_chat_containers
node_chatapp -->|"stores"| node_chat_state
node_chatapp -->|"uses"| node_chat_firebase
node_chatapp -->|"pairs with"| node_chat_backend
node_recipes_app -->|"boots"| node_recipes_shell
node_recipes_app -->|"builds with"| node_recipes_scripts
node_recipes_app -->|"composed of"| node_recipes_extensions
node_recipes_extensions -->|"includes"| node_recipes_nav
node_recipes_extensions -->|"includes"| node_recipes_cms
node_recipes_extensions -->|"includes"| node_recipes_loyalty
node_recipes_extensions -->|"includes"| node_recipes_shopify
node_recipes_extensions -->|"includes"| node_recipes_news
node_recipes_extensions -->|"includes"| node_recipes_media
node_recipes_extensions -->|"includes"| node_recipes_favorites
node_recipes_extensions -->|"includes"| node_recipes_push
node_recipes_extensions -->|"includes"| node_recipes_theme
node_hacknews -->|"fetches from"| node_hacknews_api
node_hacknews -->|"manages"| node_hacknews_store
node_musicapp -->|"plays"| node_music_player
node_musicapp -->|"integrates"| node_music_helpers
node_travelapp -->|"tracks"| node_travel_state
node_cryptoapp -->|"visualizes"| node_crypto_graphs

click node_chatapp "https://github.com/shoutem/school/tree/master/ChatApp"
click node_chat_ui "https://github.com/shoutem/school/tree/master/ChatApp/src/components"
click node_chat_containers "https://github.com/shoutem/school/tree/master/ChatApp/src/containers"
click node_chat_state "https://github.com/shoutem/school/tree/master/ChatApp/src/reducers"
click node_chat_firebase "https://github.com/shoutem/school/blob/master/ChatApp/src/firebase.js"
click node_chat_backend "https://github.com/shoutem/school/tree/master/ChatAppFirebaseFunctions"
click node_recipes_app "https://github.com/shoutem/school/tree/master/Recipes_app"
click node_recipes_shell "https://github.com/shoutem/school/blob/master/Recipes_app/index.js"
click node_recipes_scripts "https://github.com/shoutem/school/tree/master/Recipes_app/scripts"
click node_recipes_extensions "https://github.com/shoutem/school/tree/master/Recipes_app/extensions"
click node_recipes_nav "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.navigation"
click node_recipes_cms "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.cms"
click node_recipes_loyalty "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.loyalty"
click node_recipes_shopify "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.shopify"
click node_recipes_news "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.news"
click node_recipes_media "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.rss"
click node_recipes_favorites "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.favorites"
click node_recipes_push "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.push-notifications"
click node_recipes_theme "https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.theme"
click node_hacknews "https://github.com/shoutem/school/tree/master/HackerNewsApp"
click node_hacknews_api "https://github.com/shoutem/school/blob/master/HackerNewsApp/src/HNApi.js"
click node_hacknews_store "https://github.com/shoutem/school/blob/master/HackerNewsApp/src/Store.js"
click node_musicapp "https://github.com/shoutem/school/tree/master/MusicApp"
click node_music_player "https://github.com/shoutem/school/blob/master/MusicApp/src/Player.js"
click node_music_helpers "https://github.com/shoutem/school/blob/master/MusicApp/src/soundcloudHelper.js"
click node_travelapp "https://github.com/shoutem/school/tree/master/TravelApp"
click node_travel_state "https://github.com/shoutem/school/blob/master/TravelApp/src/store.js"
click node_cryptoapp "https://github.com/shoutem/school/tree/master/CryptoDataVizApp"
click node_crypto_graphs "https://github.com/shoutem/school/blob/master/CryptoDataVizApp/src/StreamGraph.js"
click node_liveinsta "https://github.com/shoutem/school/tree/master/LiveInstagram"
click node_lunchspot "https://github.com/shoutem/school/tree/master/LunchSpotApp"
click node_commitapp "https://github.com/shoutem/school/tree/master/CommitApp"
click node_colorpicker "https://github.com/shoutem/school/blob/master/ColorPicker/src/App.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_chatapp,node_chat_ui,node_chat_containers,node_chat_state,node_chat_firebase,node_chat_backend toneBlue
class node_recipes_app,node_recipes_shell,node_recipes_scripts,node_recipes_extensions,node_recipes_nav,node_recipes_cms,node_recipes_loyalty,node_recipes_shopify,node_recipes_news,node_recipes_media,node_recipes_favorites,node_recipes_push,node_recipes_theme toneAmber
class node_hacknews,node_hacknews_api,node_hacknews_store,node_musicapp,node_music_player,node_music_helpers,node_travelapp,node_travel_state,node_cryptoapp,node_crypto_graphs,node_liveinsta,node_lunchspot,node_commitapp,node_colorpicker toneMint
class node_repo_root toneNeutral
```

## Components

### Chat stack

React Native chat client and its Firebase functions backend.

- [ChatApp](https://github.com/shoutem/school/tree/master/ChatApp): RN app · Firebase-backed chat client with Redux-style UI/state flow. · `ChatApp`
- [Chat UI](https://github.com/shoutem/school/tree/master/ChatApp/src/components): components · Main chat and login presentation components. · `ChatApp/src/components`
- [Containers](https://github.com/shoutem/school/tree/master/ChatApp/src/containers): ui wiring · Input and message containers connecting UI to actions/state. · `ChatApp/src/containers`
- [State flow](https://github.com/shoutem/school/tree/master/ChatApp/src/reducers): redux · Actions and reducers for chatroom, messages, and user state. · `ChatApp/src/reducers`
- [Firebase](https://github.com/shoutem/school/blob/master/ChatApp/src/firebase.js): integration · Client-side Firebase access layer used by the chat app. · `ChatApp/src/firebase.js`
- [Functions](https://github.com/shoutem/school/tree/master/ChatAppFirebaseFunctions): Firebase backend · Realtime Database rules and Cloud Functions companion for ChatApp. · `ChatAppFirebaseFunctions`

### Recipes platform

Extension-driven Shoutem app platform with mobile runtime, server-side authoring surfaces, and build tooling.

- [Recipes app](https://github.com/shoutem/school/tree/master/Recipes_app): Shoutem platform · Extension-composed mobile app platform with native shells, scripts, and many feature modules. · `Recipes_app`
- [App shell](https://github.com/shoutem/school/blob/master/Recipes_app/index.js): RN entry · Root entrypoints that assemble the Shoutem mobile app. · `Recipes_app/index.js`
- [Build scripts](https://github.com/shoutem/school/tree/master/Recipes_app/scripts): tooling · Build, bundle, configure, and update platform assembly tooling. · `Recipes_app/scripts`
- [Extensions](https://github.com/shoutem/school/tree/master/Recipes_app/extensions): modules · Feature and infrastructure extensions composing the app. · `Recipes_app/extensions`
- [Navigation](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.navigation): extension · Cross-cutting routing and shell layout extension. · `Recipes_app/extensions/shoutem.navigation`
- [CMS](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.cms): extension · Content-schema and builder-side authoring extension. · `Recipes_app/extensions/shoutem.cms`
- [Loyalty](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.loyalty): extension · Reward, points, and merchant workflow extension. · `Recipes_app/extensions/shoutem.loyalty`
- [Shopify](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.shopify): extension · Commerce extension with cart and checkout flows. · `Recipes_app/extensions/shoutem.shopify`
- [News](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.news): content ext · Article-driven content extension with list and detail screens. · `Recipes_app/extensions/shoutem.news`
- [Media feeds](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.rss): content ext · RSS, YouTube, Vimeo, video, photo, and web-view extensions. · `Recipes_app/extensions/shoutem.rss`
- [Favorites](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.favorites): infrastructure · Shared favorites state and presentation support. · `Recipes_app/extensions/shoutem.favorites`
- [Push](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.push-notifications): infrastructure · Push-notification permissions and notification-center plumbing. · `Recipes_app/extensions/shoutem.push-notifications`
- [Theme](https://github.com/shoutem/school/blob/master/Recipes_app/extensions/shoutem.theme): infrastructure · App-wide theme and asset resolution support. · `Recipes_app/extensions/shoutem.theme`

### Sample apps

Independent tutorial apps and demos with their own local state and integrations.

- [HackerNewsApp](https://github.com/shoutem/school/tree/master/HackerNewsApp): RN app · Hacker News reader with API/store/story flows. · `HackerNewsApp`
- [HN API](https://github.com/shoutem/school/blob/master/HackerNewsApp/src/HNApi.js): network layer · Hacker News API helper and item/story retrieval. · `HackerNewsApp/src/HNApi.js`
- [Store](https://github.com/shoutem/school/blob/master/HackerNewsApp/src/Store.js): state · App store and story/comment/vote state handling. · `HackerNewsApp/src/Store.js`
- [MusicApp](https://github.com/shoutem/school/tree/master/MusicApp): RN app · Music player demo tied to SoundCloud and Flickr helpers. · `MusicApp`
- [Player](https://github.com/shoutem/school/blob/master/MusicApp/src/Player.js): media UI · Playback controls and audio UX. · `MusicApp/src/Player.js`
- [Helpers](https://github.com/shoutem/school/blob/master/MusicApp/src/soundcloudHelper.js): integrations · SoundCloud and Flickr helper modules for media and artwork. · `MusicApp/src/soundcloudHelper.js`
- [TravelApp](https://github.com/shoutem/school/tree/master/TravelApp): RN app · Packing-list travel demo with Flickr-backed images. · `TravelApp`
- [Packing flow](https://github.com/shoutem/school/blob/master/TravelApp/src/store.js): state · Packing list, item entry, and app store logic. · `TravelApp/src/store.js`
- [CryptoDataVizApp](https://github.com/shoutem/school/tree/master/CryptoDataVizApp): RN app · Crypto visualization demo centered on graphs and transaction data. · `CryptoDataVizApp`
- [Graphs](https://github.com/shoutem/school/blob/master/CryptoDataVizApp/src/StreamGraph.js): visualization · Stream and volume chart components plus current value display. · `CryptoDataVizApp/src/StreamGraph.js`
- [LiveInstagram](https://github.com/shoutem/school/tree/master/LiveInstagram): RN app · Camera and rendering demo focused on live image processing. · `LiveInstagram`
- [LunchSpotApp](https://github.com/shoutem/school/tree/master/LunchSpotApp): RN app · Recommendation and map/topic demo for lunch spot discovery. · `LunchSpotApp`
- [CommitApp](https://github.com/shoutem/school/tree/master/CommitApp): RN app · Commitment-tracking demo with editing and display flows. · `CommitApp`
- [ColorPicker](https://github.com/shoutem/school/blob/master/ColorPicker/src/App.js): RN app · Small color selection demo. · `ColorPicker/src/App.js`

### Other components

- **school**: monorepo · Portfolio of isolated React Native tutorial apps plus one extension-based platform.

## Connections

- school → ChatApp: hosts · Repository contains the ChatApp tutorial client.
- school → Functions: hosts · Repository contains the Firebase companion backend.
- school → Recipes app: hosts · Repository contains the Shoutem platform app.
- school → HackerNewsApp: hosts · Repository contains the HackerNews tutorial app.
- school → MusicApp: hosts · Repository contains the music tutorial app.
- school → TravelApp: hosts · Repository contains the travel tutorial app.
- school → CryptoDataVizApp: hosts · Repository contains the crypto visualization app.
- school → LiveInstagram: hosts · Repository contains the LiveInstagram demo.
- school → LunchSpotApp: hosts · Repository contains the lunch spot demo.
- school → CommitApp: hosts · Repository contains the commitment demo.
- school → ColorPicker: hosts · Repository contains the ColorPicker sample.
- ChatApp → Chat UI: renders · App UI is split into chat and login components.
- ChatApp → Containers: connects · Containers bridge UI events to app state.
- ChatApp → State flow: stores · Redux-style state manages chatroom, messages, and user data.
- ChatApp → Firebase: uses · Client reads and writes chat data through Firebase.
- ChatApp → Functions: pairs with · Client depends on Firebase Functions backend for server-side logic.
- Recipes app → App shell: boots · Root entrypoints assemble the mobile app.
- Recipes app → Build scripts: builds with · Scripts handle build, bundle, install, and platform updates.
- Recipes app → Extensions: composed of · App is dynamically assembled from extensions.
- Extensions → Navigation: includes · Navigation wraps routing and layout across the app.
- Extensions → CMS: includes · CMS defines schemas and builder-side authoring surfaces.
- Extensions → Loyalty: includes · Loyalty provides points and rewards flows.
- Extensions → Shopify: includes · Shopify provides commerce and checkout.
- Extensions → News: includes · News provides article content experiences.
- Extensions → Media feeds: includes · Media extensions cover RSS, video, photo, and web content.
- Extensions → Favorites: includes · Favorites is shared cross-cutting app state.
- Extensions → Push: includes · Push handles notification permissions and delivery plumbing.
- Extensions → Theme: includes · Theme configures global look and assets.
- HackerNewsApp → HN API: fetches from · Stories, comments, and votes are driven by the HN API helper.
- HackerNewsApp → Store: manages · Central store coordinates the HN reader state.
- MusicApp → Player: plays · Player UI drives the media experience.
- MusicApp → Helpers: integrates · SoundCloud and Flickr helpers support audio and artwork.
- TravelApp → Packing flow: tracks · Packing list state drives the travel workflow.
- CryptoDataVizApp → Graphs: visualizes · Charts and current value views present market data.
