Instead of a typical 'Todo' app, which doesn't show how Stores interact with one another, this is a simple time tracking application.
Still a work in progress, but it gives you a good idea of how to use Storefront.
See it live here:
Projects
Maintains the list of projects you can log time to. See the schema...
Entries
Individual time entries, related to projects via a projectId field. See the schema...
Timer
State for global timer object.
- UI starts a timer, sending the
Timerstore aprojectId - UI stops the the timer:
Entriesstore listens for theTimer_stopaction and creates an entry with the appropriate data.Projectsstore listens for theEntries_addaction and updates thetimeattribute on the appropriate project.
- Full crud
- Persist to localStorage
- Add LessCss support