Closed actuallymentor closed 4 years ago
Some form of validation before scheduled Nutshell release is smart. If you haven't finished a Nutshell and it is released on schedule, you'll cry.
Let's assume you still need to press the 'post' button manually? Like it's less like a "schedule" and more like a "draft"?
Ties a bit into the question whether you get 1 post a week (e.g. reset monday) or you get a post every 7 days (e.g. reset 7 days after posting). What do you think?
In order for this to work I think the best is to have a collection
called 'nutshells' which each have a key that is a user uid
and a prop content
so we can query like this:
db.collection( 'nutshells' ).where( 'user', '==', user.uid ).sortBy( 'timestamp ).limit( 1 )
See firestore docs for details on how this querying works.
Regarding the post reset: the 7-day reset is prone to drift, and would likely only work well with scheduling. The weekly reset is VERY simple to implement for the MVP, and gives users the freedom to post more to their own liking. Disadvantage of weekly reset is that you have a risk of post spamming on the reset date.
Regarding the collection
thing you mentioned, I assume it's about how you want to implement the editing functionality in the database? As I have limited experience with that, I will follow your lead.
The implementations are equally simple in the current framework so don't worry about that. That said there is something charming about a weekly reset and a 'post spam' in the sense of a 'weekly newspaper'. Bit harder with timezones maybe but I'll look into it.
For the database structure I'd recommend watching these 2-4 min videos:
You could avoid the time zones by setting the mail send date a day late, right? An option for the user to set the day on which they'd like to receive it would also work, but could cause some issues when set to the spam day. Workaround: i.e. Monday is spam day, and user sets Monday as receive day --> user receives last Monday's Nutshells, thereby avoiding missing any spammings.
Days structure note. Create collection that had entries with ownership id's at well as status and content including timestamp for filtering