In order to learn something about the mongoose library for mongodb i decided to create a shopping list application.
A user opens a page (like a paper) and just write articles to the list. He may remove or edit existing articles. The user can sent the list to someone else. Every user can do everything at any time with the list.
- Usage of mongoose and mongodb
- Build as web application based on JavaScript/TypeScript with node.js and React
{
"_id": "5e0c0a0b7b1c2b0001c0b1c2",
"lastModified": "2020-01-01T00:00:00.000Z",
"articles": [
{
"text": "Milk"
},
]
}
- Landing page with just one button "New shopping list" (SL)
- Initial SL: One longe input field for new article
- Keyboard support, for instance save on enter key press
- SL: Touch on article activates the input field
- SL: Only one article can be edited at the same time
- Autosave, if article text is changed
- Leverage fre tier of MongoDB Atlas
- GitHub Actions in context of free tier of github
- Testing of vercel.com hosting
- How to make a list only available to users it has been sent to?
- URI to resource with global unique id, which is not (really) guessable
- How to avoid flooding of the database with shopping lists?
- long term: delete shopping lists after a certain time
- short term: limit the number of shopping lists per IP address.
- Use of IP address is a privacy concern.
- Other options:
- Use of captcha or compuation effort to create a new list
- Global ratelimit: only a certain number of lists per time period