We want to build a dummy restaurant dashboard that has the following features.
Take username and password as input.
Check whether username and password are valid by calling an API and comparing against this airtable - link
curl "<https://api.airtable.com/v0/appjWdL7YgpxIxCKA/credenitals?maxRecords=3&view=Grid%20view>" \\
-H "Authorization: Bearer keyfXgn8PL6pB3x32"
Output:
{"records":[{"id":"rec7UWjmvv9oDIY2j","createdTime":"2022-06-27T16:20:56.000Z","fields":{"username":"user1","password":"password1"}},{"id":"recupBOdoQu6lDycP","createdTime":"2022-06-27T16:20:56.000Z","fields":{"username":"user2","password":"password2"}},{"id":"recriHz91fVbQlP9o","createdTime":"2022-06-27T16:20:56.000Z","fields":{"username":"user3","password":"password3"}}]}
It opens with a home page, where you will have an auto complete with restaurant name. Once you click on add on the restaurant name, the map needs to get added to the page in the end.
Below the map of each restaurant you need to have two buttons - bookmark and remove.
The bookmark, and home page maps need to be stateful across sessions on the same browser. You need to store the state and retrieve using cookies in the browser.
List of restaurants can be found in this airtable.
You can use a curl like the following to fetch the list
curl "<https://api.airtable.com/v0/appjWdL7YgpxIxCKA/restaurants?maxRecords=3&view=Grid%20view>" \\
-H "Authorization: Bearer keyfXgn8PL6pB3x32"
Output
{"records":[{"id":"recVG5yzp8koxiZ3Z","createdTime":"2022-06-27T16:22:09.000Z","fields":{"Name":"Subway"}},{"id":"recjSYT8fRx52mL6H","createdTime":"2022-06-27T16:22:09.000Z","fields":{"Name":"McDonalds"}},{"id":"recDz8MtN5lrE00bA","createdTime":"2022-06-27T16:22:09.000Z","fields":{"Name":"Taco Bell"}}]}