Music Record Browser / Architecture
heardDownloads ↓7.103.0
HEARD KNOWLEDGE BASE

Architecture

Components, data flows, and deployment boundaries.

heard component architectureBrowser and Windows clients call the heard API. The API connects recognition, DynamoDB records, S3 assets, optional Cognito identity and location lookup. Location lookup has standalone and embedded S3 indexes.Browser clientWindows companionheard API · LambdaRecognitionPersistent recordsPlace lookupCapture · History · PhotosNative capture + WebViewTray · Dock · NotificationsDevice auth + optional Cognito identityPython + ShazamIO upstreamOnline identificationDynamoDB · History & metadataS3 · Photos, artwork & logsStandalone / embedded LambdaSeparate S3 geographic indexesPrincipal dependencies · deployed inventory may differ

This architecture describes packaged heard 7.77 and the standalone location service 2.0. It does not establish the currently deployed AWS resource inventory.

Arrows show principal dependencies, not every network exchange. The browser and embedded WebView load the shared website and call the app API. The Windows native listener also calls the API independently. Location providers and recognition upstreams are described below.

Client responsibilities#

Browser: permissions, capture loop, configuration, account/history UI and photos. Windows: WPF chrome, AppBar dock, tray, notifications, native microphone capture, local music screening, supervisor/watchdog and diagnostics. The WebView bridge passes configuration/session context and events; the native worker caches context so hidden-page throttling does not own its capture lifecycle.

App overview and functionality

Location service: design, usage and artifacts

Project architecture

Microphone settings and tuning

Runtime flows and service boundaries#

1. Identify a song#

  • An authorized device starts listening. Signed-in devices coordinate an active turn through /listener; device and optional account credentials accompany app calls.
  • The browser records a sample, or Windows records 44.1-kHz mono 16-bit PCM and applies local DSP screening. Rejected native samples remain diagnostics entries without a recognition call.
  • POST /identify invokes the Python recognition Lambda and ShazamIO upstream. Location enrichment calls configured place providers and preserves an address/coordinate fallback.
  • DynamoDB stores the identification under device/account ownership; artwork is cached for display/notifications. History refresh updates the UI, and Windows can notify independently of the hidden window.

2. Resolve or correct a place#

GET /places reaches heard PlacesFn, which combines configured external/embedded Lambda results and external map/address candidates. The standalone Lambda reads its own S3 cells. POST /places persists a selected business label on owned identification rows plus reusable normalized-address preferences in heard’s DynamoDB. It does not mutate the geographic dataset.

3. Attach or discover photos#

The photo handler combines owned uploads, eligible community photos and legacy library lookup. It uses S3 object storage and DynamoDB association/index metadata; the existing photo lookup Lambda/table/bucket are external dependencies. Signed URLs and compatible previews provide image access. Account sign-in is required for community publication, while device-scoped private attachments remain available without it.

4. Share, coordinate and diagnose#

/share stores token-hash metadata referencing owned records or bounded selections. /history validates shares and omits configured details. /listener manages shared listening intent/leases. /diagnostics merges device/account-scoped S3 records with Windows local diagnostics; service failures do not terminate native listening.

Identity and persistence#

BoundaryPersistence / identity
Browser / WebView profileDevice token, listener settings and account session; native settings/logs also live under %LOCALAPPDATA%\heard.
CognitoOptional account identity. Existing UserPool and WebClient construct identities must be preserved on infrastructure updates.
DynamoDBIdentification records plus authorization, share, preference, photo metadata and listening coordination records.
S3Website, artwork, diagnostic objects, attached photos and place cells in separate buckets/prefixes. Legacy photo resources are distinct integrations.

API map, deployment and operations#

App routeRole
POST /auth; POST /account/linkDevice authorization and linking device records into account history.
POST /identifyAudio recognition, location enrichment and history save.
GET /history; DELETE /historyOwned/shared history reads; owned deletion.
GET /places; POST /placesNearby choices; save owned location corrections/preferences.
GET /photo-lookup; GET/POST /photosLegacy lookup alias, photo matches and photo actions.
POST/DELETE /shareCreate a share or revoke the owner’s latest tracked link.
POST /listenerListening coordination and lease lifecycle.
GET/POST /diagnosticsRead/write private native-listening diagnostics.

Deployments#

NewDatelineMusicStack owns website delivery, app API, Lambda handlers, Cognito, history/metadata and application buckets including the embedded place index. The Windows app is built/installed separately. NewDatelinePlaceLookupStack owns its standalone REST API, Python Lambda and place-index bucket. Existing photo service resources are referenced rather than recreated by heard.

Web/backend updates: deploy web-aws-source from WSL2. Native updates: build/install on Windows with the bundled scripts, .NET SDK, WebView2 runtime and Inno Setup. Place updates: publish a new complete dataset, then verify a known address. Source changes, cloud deployment, dataset publication and desktop installation are four distinct operations.

Resilience and operational limits#

  • CloudFront serves website/artwork, while API calls target API Gateway. HTTPS and per-route app authorization protect user operations; Cognito account identity supplements device authorization.
  • Native capture retries microphone acquisition, uses a supervisor/watchdog and resumes after sleep. Actual sleep cannot capture audio; upstream recognition and network failures still affect results.
  • Ordinary Search/history do not follow the available history cursor beyond 2,000 records. Custom Share does. Cloud diagnostics expire after 15 days; local logs/records retain 14 days.
  • Standalone place reads are bounded. Fresh deployment avoids RDS, VPC and NAT resources; migration can retain an old database and associated costs.

Implementation artifacts#

Current source, infrastructure and build instructions

Infrastructure: web-aws-source/infra/lib/*stack.ts. API: infra/lambda/. UI: web-aws-source/web/. Native: src/Heard.Windows/, especially MainWindow.xaml.cs, NativeListeningService.cs, MusicPresenceDetector.cs, WindowDocking.cs and WindowsNotificationService.cs. Related technical guides are available in the navigation.

CONTINUE READINGMicrophone settings
heard · Project 7.103.0Guide source baseline 7.77 · October 15, 2026

Search documentation

Search across all guides.

Screenshot