Mobile App Spec

From floodzilla-wiki
Revision as of 22:37, 22 March 2023 by DaveSanderman (talk | contribs) (→‎Caching)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Floodzilla Mobile App

This is (the beginning of) a spec for the Floodzilla mobile app.

Requirements

This is an unordered list of requirements for the app. Some are technical, some are UX-related.

Localization

We want to support multiple languages. Expectations:

  • Each Region will have a primary language.
  • All data for that region (e.g. Gage Names, Road Names, etc) will naturally be in that region's language.
  • We will eventually add a language code to the Region object, and use that to localize all app-generated text (e.g. button names, status labels, etc).

API Wrappers

There will be a class that will wrap all calls to the various back-end APIs. It will do the following:

  • Console logging of requests/responses in debug mode
  • JSON management
  • JWT management (once we do login etc)

Caching

There will be a caching system (probably not React Query?). Different types of data will need different caching behavior:

  • Region configuration (cache basically forever)
  • Gage lists, etc (long life cache -- an hour? more?)
  • Forecasts (check for new forecasts every five? minutes. Always fetch full forecast; all of the numbers will typically change when new forecasts are published)
  • Gage data and status (check for new data once per minute. Only request "new" readings and append to existing data).

Charting

We want to support the same level of detail that is currently available on floodzilla.com, including the ability to touch a reading and see a callout with the exact date/time.

All dates/times will be in region time (see next item). We will need to be able to show multiple horizontal label lines (e.g. road level, historical flood levels, etc).

Time zones

Every Region has a time zone. All data to/from the API is sent in UTC. Any date/time shown by the app will be shown in the Region's time zone (regardless of the client device's time zone).

Navigation/Linking

We will need to support the same kind of navigation that floodzilla.com has. Examples:

  • Show a specific gage's readings, with its own flood level lines
  • Show a specific gage's forecast, with its own flood level lines.

We will support whatever "deep linking" is required so that notifications can take the user to a particular forecast or reading view.

Notifications

We will support whatever technologies are necessary to provide push notifications (if this is not the right terminology, please fix) on both iOS and Android.