hello everyone this is presentation video number two database and API what data in the application is persistent and stored in your database okay so here's my database model we have name email password if the user is admin balance and an array with all the transactions that start with 100 all accounts start with 100. we also have another collection called activity that stores email action and the date how did you use the dial in the context of your application I created a Dell file just as we did in one of the exercises it has some functions
to perform various operations in the database this is the list of the functions or methods that I used which are of course connect find insert one and they express server Imports these functions to be able to call them when required and now I will discuss any new features um that I developed for the database or dial um I used chalk to display the logs clearly or or neatly all transactions are stored in the database and all login and logout activity is also stored in the database and the design decisions so I designed designed it this
way so I can know when my app was or will be graded next question is did I use a restful or graphql API yes I did use Swagger but just briefly because I found it to be easier just document things by hand and now I will describe the API endpoints and explain the role of each one um here's my endpoints all all of my methods use get and I know I should have used posts instead but this just worked fine for me the first endpoint is to know if the user is already logged in these
drones on the first render using use effect then we have sign up is the route to create a new user in Firebase and then we have login and log out and well they are self-explanatory and then with the extra that as I mentioned they save information into the database so every login and logout is stored we have transaction which will store a deposit or withdraw from the user's balance into the database and finally we have all data which will retrieve all information from the database and the user has access to depending if they are admin
or regular user and next we I have to Showcase my API documentation it's brief because it's just meant for me I I didn't found any needs to store any more information here it lists all of the routes with description parameters if they have and what's the model of the object or string that it returns additionally a note or two if it's necessary so here is my endpoint test already login sign up login transaction and all data in the old data we can see all the information which has an object with three objects objects user or
users and transactions some of these include a race um what else um that's all for video number two so I will see you in video number three