As Jehovah's witnesses we want to track who we visit and when to make the return visits. People information is sensible data, so it shouldn't leave the device where it was saved at least in network events like cloud backups.
Filter and sort the information. Filter by some fields like, colony. See the nearest people with device location.
When she updates the information a new entry should be added, to let she know that something changed, it must be slightly different to common entries.
When there's another person who answers the door, we want to save as a new person record, but with the same location.
Write is not as common as reading, so the primary focus is on read the information, filtering it, sorting it, etc.
When the publisher visits someone, she wants to see previous information and add details if needed.
If something goes wrong she wants to remove some entry.
To migrate the information to another device or if something goes wrong, she wants to create a backup (preferably encrypted to prevent data stealing), and then able to import it in the same application but in different device.
We have selected Vue framework with vite-pwa to provide offline experience, and pwa capabilities like read location, and save to persistent db, (import and export data).
The design system is using tailwindcss, with 5 custom colors obtained from coolors.co, generated with uicolors.app.
We need to interact with some location API as google maps to provide better experience when sorting people by location.
We're going to use vue-query to make the syncronization between idb and the app.
IndexedDB is going to serve us as database. The structure of the objects in the database should have the following structure:
Person
{
id: number
name: string
location: GeolocationPosition
colony: string
description: string
}
ReturnVisit
{
personId: number
date: date
topic: string
returnDate: date
notes: string
}
keyPath: id, autoincrementing
returnDay is the day of the week where you should return to visit the person.
keyPath: [person_id, date]