# mit-cml/appinventor-sources architecture

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

- Interactive diagram: https://gitdiagram.com/mit-cml/appinventor-sources
- Repository: https://github.com/mit-cml/appinventor-sources

## Overview

MIT App Inventor lets users create projects in a visual programming environment, manage project files, build applications, and run them in companion apps. The tree and README show the major server, editor, component-runtime, and iOS surfaces; excerpts additionally show project-file operations, map rendering, and the iOS REPL/WebRTC path. Several important subsystems are represented by their exact tree paths but were not sampled, so their internal connections are left unverified rather than inferred.

Main entry points: [`appinventor/appengine/src/com/google/appinventor/server/project/CommonProjectService.java`](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/appengine/src/com/google/appinventor/server/project/CommonProjectService.java) (Project Service), [`appinventor/components-ios/src/ReplForm.swift`](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components-ios/src/ReplForm.swift) (REPL Form), [`appinventor/blocklyeditor/src`](https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/blocklyeditor/src) (Visual Editor), [`appinventor/components-ios/src/WebRTCNativeManager.swift`](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components-ios/src/WebRTCNativeManager.swift) (WebRTC Link)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["App Authoring"]
  node_designer["Visual Editor"]
  node_toolbox["Block Toolbox"]
end

subgraph group_server["App Inventor Server"]
  node_projectservice["Project Service"]
  node_projectstorage[("Project Storage")]
  node_appengine["App Engine Services"]
  node_buildserver["Build Server"]
end

subgraph group_runtime["App Runtime"]
  node_components["Component Runtime"]
  node_mapcomponent["Map Component<br/>[Map.java]"]
  node_maprenderer["OSM Map Renderer"]
  node_filecomponent["File Component<br/>[File.java]"]
end

subgraph group_ios["iOS Companion"]
  node_ioscomponents["iOS Components"]
  node_form["iOS Form Runtime<br/>[Form.swift]"]
  node_replform["REPL Form<br/>[ReplForm.swift]"]
  node_companion["iOS Companion"]
  node_player["Player App"]
  node_webrtc["WebRTC Link"]
end

node_creator(("App Creator"))
node_artifact["Built App"]
node_rendezvous{{"Rendezvous Service"}}

node_creator -.->|"authors in"| node_designer
node_designer -.->|"uses blocks"| node_toolbox
node_designer -.->|"saves projects"| node_projectservice
node_projectservice -->|"reads and writes"| node_projectstorage
node_appengine -.->|"serves projects"| node_projectservice
node_projectservice -.->|"requests builds"| node_buildserver
node_buildserver -.->|"produces app"| node_artifact
node_artifact -.->|"runs with"| node_components
node_components -.->|"provides map"| node_mapcomponent
node_mapcomponent -->|"creates renderer"| node_maprenderer
node_creator -.->|"uses file APIs"| node_filecomponent
node_companion -.->|"runs REPL"| node_replform
node_replform -.->|"extends form"| node_form
node_player -->|"loads REPL"| node_replform
node_player -->|"loads form"| node_form
node_companion -->|"starts connection"| node_webrtc
node_webrtc -->|"signals peer"| node_rendezvous
node_replform -->|"sends runtime data"| node_webrtc

click node_designer "https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/blocklyeditor/src"
click node_toolbox "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/blocklyeditor/src/toolboxController.js"
click node_projectservice "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/appengine/src/com/google/appinventor/server/project/CommonProjectService.java"
click node_projectstorage "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/appengine/src/com/google/appinventor/server/storage/ObjectifyStorageIo.java"
click node_appengine "https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/appengine/src"
click node_buildserver "https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/buildserver/src"
click node_components "https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/components/src/com/google/appinventor/components/runtime"
click node_mapcomponent "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components/src/com/google/appinventor/components/runtime/Map.java"
click node_maprenderer "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components/src/com/google/appinventor/components/runtime/util/NativeOpenStreetMapController.java"
click node_filecomponent "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components/src/com/google/appinventor/components/runtime/File.java"
click node_ioscomponents "https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/components-ios/src"
click node_form "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components-ios/src/Form.swift"
click node_replform "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components-ios/src/ReplForm.swift"
click node_companion "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/aicompanionapp/src/ViewController.swift"
click node_player "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/PlayerApp/RootViewController.swift"
click node_webrtc "https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components-ios/src/WebRTCNativeManager.swift"

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_designer,node_toolbox toneBlue
class node_projectservice,node_projectstorage,node_appengine,node_buildserver toneAmber
class node_components,node_mapcomponent,node_maprenderer,node_filecomponent toneMint
class node_ioscomponents,node_form,node_replform,node_companion,node_player,node_webrtc toneRose
class node_creator,node_artifact,node_rendezvous toneIndigo
```

## Components

### App Authoring

- [Visual Editor](https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/blocklyeditor/src): `appinventor/blocklyeditor/src`
- [Block Toolbox](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/blocklyeditor/src/toolboxController.js): `appinventor/blocklyeditor/src/toolboxController.js`

### App Inventor Server

- [Project Service](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/appengine/src/com/google/appinventor/server/project/CommonProjectService.java): `appinventor/appengine/src/com/google/appinventor/server/project/CommonProjectService.java`
- [Project Storage](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/appengine/src/com/google/appinventor/server/storage/ObjectifyStorageIo.java): `appinventor/appengine/src/com/google/appinventor/server/storage/ObjectifyStorageIo.java`
- [App Engine Services](https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/appengine/src): `appinventor/appengine/src`
- [Build Server](https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/buildserver/src): `appinventor/buildserver/src`

### App Runtime

- [Component Runtime](https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/components/src/com/google/appinventor/components/runtime): `appinventor/components/src/com/google/appinventor/components/runtime`
- [Map Component](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components/src/com/google/appinventor/components/runtime/Map.java): `appinventor/components/src/com/google/appinventor/components/runtime/Map.java`
- [OSM Map Renderer](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components/src/com/google/appinventor/components/runtime/util/NativeOpenStreetMapController.java): `appinventor/components/src/com/google/appinventor/components/runtime/util/NativeOpenStreetMapController.java`
- [File Component](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components/src/com/google/appinventor/components/runtime/File.java): `appinventor/components/src/com/google/appinventor/components/runtime/File.java`

### iOS Companion

- [iOS Components](https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/components-ios/src): `appinventor/components-ios/src`
- [iOS Form Runtime](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components-ios/src/Form.swift): `appinventor/components-ios/src/Form.swift`
- [REPL Form](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components-ios/src/ReplForm.swift): `appinventor/components-ios/src/ReplForm.swift`
- [iOS Companion](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/aicompanionapp/src/ViewController.swift): `appinventor/aicompanionapp/src/ViewController.swift`
- [Player App](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/PlayerApp/RootViewController.swift): `appinventor/PlayerApp/RootViewController.swift`
- [WebRTC Link](https://github.com/mit-cml/appinventor-sources/blob/master/appinventor/components-ios/src/WebRTCNativeManager.swift): `appinventor/components-ios/src/WebRTCNativeManager.swift`

### Other components

- **App Creator**
- **Built App**
- **Rendezvous Service**

## Connections

- App Creator → Visual Editor: authors in
- Visual Editor → Block Toolbox: uses blocks
- Visual Editor → Project Service: saves projects
- Project Service → Project Storage: reads and writes (evidence: `appinventor/appengine/src/com/google/appinventor/server/project/CommonProjectService.java`)
- App Engine Services → Project Service: serves projects (evidence: `appinventor/appengine/src/com/google/appinventor/server/project/youngandroid/YoungAndroidProjectService.java`)
- Project Service → Build Server: requests builds
- Build Server → Built App: produces app
- Built App → Component Runtime: runs with
- Component Runtime → Map Component: provides map (evidence: `appinventor/components/src/com/google/appinventor/components/runtime/util/NativeOpenStreetMapController.java`)
- Map Component → OSM Map Renderer: creates renderer (evidence: `appinventor/components/src/com/google/appinventor/components/runtime/Map.java`)
- App Creator → File Component: uses file APIs
- iOS Companion → REPL Form: runs REPL (evidence: `appinventor/aicompanionapp/src/ViewController.swift`)
- REPL Form → iOS Form Runtime: extends form (evidence: `appinventor/components-ios/src/ReplForm.swift`)
- Player App → REPL Form: loads REPL (evidence: `appinventor/PlayerApp/RootViewController.swift`)
- Player App → iOS Form Runtime: loads form (evidence: `appinventor/PlayerApp/RootViewController.swift`)
- iOS Companion → WebRTC Link: starts connection (evidence: `appinventor/aicompanionapp/src/ViewController.swift`)
- WebRTC Link → Rendezvous Service: signals peer (evidence: `appinventor/components-ios/src/WebRTCNativeManager.swift`)
- REPL Form → WebRTC Link: sends runtime data (evidence: `appinventor/components-ios/src/ReplForm.swift`)
