# mhmmdziyadd14/pengembangan-r.i.m.a architecture

> Architecture diagram of the GitHub repository mhmmdziyadd14/pengembangan-r.i.m.a, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mhmmdziyadd14/pengembangan-r.i.m.a
- Repository: https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a

## Overview

R.I.M.A. is a browser-based Indonesian music and angklung application backed by a Python API. Its visible user workflow is interacting with musical controls and song features in the web app, which can send requests to the backend for song and Arduino operations; the backend also exposes microphone-based CRNN classification. The README describes a regional-greeting-to-song workflow, but the sampled implementation instead shows a broader music app. Several backend capabilities are represented from the sampled API excerpt; unsampled routes are not inferred.

Main entry points: [`src/api.py`](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/api.py) (FastAPI service), [`public/app.js`](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js) (Web controller), [`public/index.html`](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/index.html) (Web page), [`src/audio_processing.py`](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/audio_processing.py) (Audio processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser experience"]
  node_shell["Web page<br/>[index.html]"]
  node_controller["Web controller<br/>[app.js]"]
  node_offline["Offline cache<br/>[sw.js]"]
end

subgraph group_music["Music features"]
  node_angklung["Angklung controls<br/>[app.js]"]
  node_song_ui["Song library<br/>[app.js]"]
  node_melody["Vocal melody tools<br/>[app.js]"]
  node_notangka["Not Angka game<br/>[app.js]"]
  node_midi["Browser MIDI<br/>[app.js]"]
end

subgraph group_backend["Python services"]
  node_api["FastAPI service<br/>[api.py]"]
  node_audio["Audio processing"]
  node_crnn["Greeting CRNN"]
  node_config["Runtime configuration<br/>[config.py]"]
end

subgraph group_resources["Runtime resources"]
  node_songs[("Song collection")]
  node_weights["Saved model weights"]
end

node_user(("App user"))
node_arduino["Arduino boards"]
node_midi_device["MIDI device"]

node_user -->|"opens"| node_shell
node_shell -->|"loads"| node_controller
node_controller -->|"handles input"| node_angklung
node_controller -->|"handles input"| node_song_ui
node_controller -->|"handles input"| node_melody
node_controller -->|"handles input"| node_notangka
node_angklung -->|"sends notes"| node_midi
node_midi -->|"plays notes"| node_midi_device
node_song_ui -->|"requests playback"| node_api
node_api -->|"lists and reads"| node_songs
node_api -->|"sends commands"| node_arduino
node_api -->|"uses classifier"| node_crnn
node_api -.->|"processes audio"| node_audio
node_api -->|"reads settings"| node_config
node_audio -->|"reads settings"| node_config
node_api -.->|"loads model"| node_weights
node_shell -.->|"registers cache"| node_offline

click node_shell "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/index.html"
click node_controller "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js"
click node_offline "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/sw.js"
click node_angklung "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js"
click node_song_ui "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js"
click node_melody "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js"
click node_notangka "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js"
click node_midi "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js"
click node_api "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/api.py"
click node_audio "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/audio_processing.py"
click node_crnn "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/ai_architectures.py"
click node_config "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/config.py"
click node_songs "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/tree/main/Songs"
click node_weights "https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/models_saved/best_model_CRNN.pth"

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_shell,node_controller,node_offline,node_user toneBlue
class node_angklung,node_song_ui,node_melody,node_notangka,node_midi toneAmber
class node_api,node_audio,node_crnn,node_config toneMint
class node_songs,node_weights toneRose
class node_arduino,node_midi_device toneIndigo
```

## Components

### Browser experience

- [Web page](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/index.html): `public/index.html`
- [Web controller](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js): `public/app.js`
- [Offline cache](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/sw.js): `public/sw.js`

### Music features

- [Angklung controls](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js): `public/app.js`
- [Song library](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js): `public/app.js`
- [Vocal melody tools](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js): `public/app.js`
- [Not Angka game](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js): `public/app.js`
- [Browser MIDI](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/public/app.js): `public/app.js`

### Python services

- [FastAPI service](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/api.py): `src/api.py`
- [Audio processing](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/audio_processing.py): `src/audio_processing.py`
- [Greeting CRNN](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/ai_architectures.py): `src/ai_architectures.py`
- [Runtime configuration](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/src/config.py): `src/config.py`

### Runtime resources

- [Song collection](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/tree/main/Songs): `Songs`
- [Saved model weights](https://github.com/mhmmdziyadd14/pengembangan-r.i.m.a/blob/main/models_saved/best_model_CRNN.pth): `models_saved/best_model_CRNN.pth`

### Other components

- **App user**
- **Arduino boards**
- **MIDI device**

## Connections

- App user → Web page: opens
- Web page → Web controller: loads
- Web controller → Angklung controls: handles input (evidence: `public/app.js`)
- Web controller → Song library: handles input (evidence: `public/app.js`)
- Web controller → Vocal melody tools: handles input (evidence: `public/app.js`)
- Web controller → Not Angka game: handles input (evidence: `public/app.js`)
- Angklung controls → Browser MIDI: sends notes (evidence: `public/app.js`)
- Browser MIDI → MIDI device: plays notes (evidence: `public/app.js`)
- Song library → FastAPI service: requests playback (evidence: `public/app.js`)
- FastAPI service → Song collection: lists and reads (evidence: `src/api.py`)
- FastAPI service → Arduino boards: sends commands (evidence: `src/api.py`)
- FastAPI service → Greeting CRNN: uses classifier (evidence: `src/api.py`)
- FastAPI service → Audio processing: processes audio (evidence: `src/api.py`)
- FastAPI service → Runtime configuration: reads settings (evidence: `src/api.py`)
- Audio processing → Runtime configuration: reads settings (evidence: `src/audio_processing.py`)
- FastAPI service → Saved model weights: loads model
- Web page → Offline cache: registers cache
