An application for displaying multiple-choice questions in a TicTok style interface.
(A take home test).
Made with ♥ in VIM.
- clean architecture as a foundation, separation of application layers
- feature based modules (forYou)
- data flows in one direction from data layer, to domain, to application, to presentation
- redux actions dispatch data flow through the layers
- dependency injection and immutables but left out for now
- use case hooks
design:
The app maintains an internal cache of prefetched items.
The prefetching is building the internal cache for swiping.
API calls will prefetch using an exponential backoff algorithm.
process:
- use cases makes current request for data
- maps the data to the domain layer and preloads the image
- prefetches the next
- keeps a counter in redux store
- sets a timer for every minute
- calculates difference
- dispatch redux action to update UI
- backend returns a single random result, not idempotent
- left out, not using CI, my code is perfect,
