How abnerbgs/langgam-app works
Langgam is a cross-platform app for reading and editing gamelan song notation, with optional Android USB serial support for Arduino Piezo Shield boards. Users browse the song collection, open a song’s chord sheet, or add/edit lyrics and chord positions; changes are persisted through a platform-specific store. The catalog also supports validated JSON import/export, while a separate connection tab provides the documented board workflow. Edges reflect excerpted calls and README statements; unsampled screen and integration internals are not asserted.
Main entry points: songs-context.tsx Song state · song-file-format.ts Song JSON format · add-song-form.tsx Song editor form · [id].tsx Song reader
Components 30
Song experience
- Home activity
src/app/(tabs)/index.tsx - Song catalog
src/app/(tabs)/explore.tsx - Song reader
src/app/song/[id].tsx - Song editor form
src/components/add-song-form.tsx - Lyrics and chords
src/components/manual-song-lyrics-editor.tsx - Chord sheet
src/components/song-chord-sheet.tsx - Entry methods
src/components/song-entry-methods.tsx - JSON file actions
src/components/song-file-actions.tsx
Song data
- Song state
src/context/songs-context.tsx - Song persistence
src/services/song-storage.ts - Private file store
src/services/song-storage.native.ts - Browser local store
src/services/song-storage.web.ts - Platform file transfer
src/services/song-file-transfer.ts - Native file transfer
src/services/song-file-transfer.native.ts - Web file transfer
src/services/song-file-transfer.web.ts - Song JSON format
src/services/song-file-format.ts
Board connection
- Connect screen
src/app/(tabs)/connect.tsx - Serial interface
src/services/usb-serial.ts - Android USB serial
src/services/usb-serial.android.ts
App presentation
- App layout
src/app/_layout.tsx - Tab navigation
src/components/app-tabs.tsx - Theme tokens
src/constants/theme.ts - Themed text
src/components/themed-text.tsx - Themed view
src/components/themed-view.tsx - Theme hook
src/hooks/use-theme.ts - Collapsible panel
src/components/ui/collapsible.tsx - Web badge
src/components/web-badge.tsx - Animated icon
src/components/animated-icon.tsx
Other components
- App user
- Arduino board
Connections 36
- App user → Home activity: opens
README.md - Home activity → Song state: reads activity
src/app/(tabs)/index.tsx - App user → Song catalog: browses
README.md - Song catalog → Song state: reads and mutates
src/app/(tabs)/explore.tsx - App user → Song reader: opens song
src/app/song/[id].tsx - Song reader → Song state: reads and marks
src/app/song/[id].tsx - Song reader → Chord sheet: renders
src/app/song/[id].tsx - Song editor form → Lyrics and chords: renders
src/components/add-song-form.tsx - Song editor form → Entry methods: renders
src/components/add-song-form.tsx - Song editor form → Song state: adds or updates
src/components/add-song-form.tsx - App user → JSON file actions: imports or exports
README.md - JSON file actions → Platform file transfer: requests transfer
src/components/song-file-actions.tsx - JSON file actions → Song state: replaces songs
src/components/song-file-actions.tsx - Song state → Song persistence: reads and writes
src/context/songs-context.tsx - Song persistence → Private file store: platform selects
README.md - Song persistence → Browser local store: platform selects
README.md - Private file store → Song JSON format: parses and serializes
src/services/song-storage.native.ts - Browser local store → Song JSON format: parses and serializes
src/services/song-storage.web.ts - Platform file transfer → Native file transfer: platform selects
README.md - Platform file transfer → Web file transfer: platform selects
README.md - Native file transfer → Song JSON format: parses and serializes
src/services/song-file-transfer.native.ts - Web file transfer → Song JSON format: parses and serializes
src/services/song-file-transfer.web.ts - App user → Connect screen: connects board
README.md - Connect screen → Serial interface: uses serial interface
src/app/(tabs)/connect.tsx - Serial interface → Android USB serial: Android implementation
src/services/usb-serial.android.ts - Android USB serial → Arduino board: USB serial
README.md - App layout → Song state: provides state
src/app/_layout.tsx - App layout → Animated icon: renders
src/app/_layout.tsx - Tab navigation → Theme tokens: uses tokens
src/components/app-tabs.tsx - Themed text → Theme hook: gets colors
src/components/themed-text.tsx - Themed view → Theme hook: gets colors
src/components/themed-view.tsx - Theme hook → Theme tokens: selects palette
src/hooks/use-theme.ts - Collapsible panel → Themed text: renders
src/components/ui/collapsible.tsx - Collapsible panel → Themed view: renders
src/components/ui/collapsible.tsx - Web badge → Themed text: renders
src/components/web-badge.tsx - Web badge → Themed view: renders
src/components/web-badge.tsx