Skip to content

Adopt MVVM structure for voice-to-text feature #11

@fbraza

Description

@fbraza

Summary

Adopt the MVVM architecture for the voice-to-text feature and organize the project structure accordingly.

Requirements

  • Restructure the lib/ tree to follow a feature-first layout with MVVM layers.
    • core/ for shared models, services, utilities.
    • features/voice_to_text/ containing view/, viewmodel/, models/, widgets/, and optional feature services.
  • Introduce a VoiceToTextViewModel that exposes observable state (transcript, active word index, timer, waveform data, recording state) and command methods (start/pause/stop recording, update transcript/waveform).
  • Ensure view widgets depend only on ViewModel outputs and forward user interactions to ViewModel commands.
  • Inject dependencies (audio capture, speech recognition, storage) via constructors using a DI mechanism (Provider, get_it, or equivalent).
  • Add unit tests for the ViewModel covering state transitions and service interactions.

Acceptance Criteria

  • Project folders reflect the MVVM structure and feature-first organization.
  • VoiceToTextViewModel exists with defined state and command API, decoupled from UI widgets.
  • Voice-to-text widgets consume ViewModel state via dependency injection without direct service calls.
  • ViewModel tests validate core logic paths with mocked services.
  • Documentation (README or architecture doc) outlines the MVVM pattern for contributors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions