The basic idea behind this app design is to keep it as simple as possible. Eliminating all additional dependencies except the ones required by the task.
The app architecture follows the MVVM pattern. App consists of:
- View. Borderless Window with single ToggleButton
- ViewModel. ToggleButton binds its IsChecked property to ViewModel's IsListening property. ViewModel interacts with the app model depending on the property value received.
- Model consuming services and implementing buiseness logic required by the task.
- Services, that interact with different APIs: Speech recognition, Location By User IP and Notepad automated manipulation.
Is done by applying Composition Root pattern in it's basic variation inside the MainWindow class.
This is a bare to the metal design to fulfill all the requirements in the task and not to exceed the time limit provided. The further improvements for this app, not included:
- Make single instance app with tray icon, by utilizing Mutex.
- Add DI container.
- Test coverage. And remove static dependencies from the code.
- Implement Reactive pipeline for the data flow: Speech recognition -> Location -> Notepad Modification