Implementing a fetch to retrieve username information from the cookie, and then sending a fetch to retrieve the id from the username
Debugged the endpoint that allows you to get the id (was overriden by someone)
General debugging:
Fixing backend PUT requests to Swifties endpoint
Fixing Nginx issues with backend going down
Time: 30 minutes
Personalize landing message on homepage with, "Welcome (username)!" (need to check if user is logged in based on existence of cookie, and obtain the username from the cookie)
Time : 2 hour
Settings page:
Update password includes password checking and obtains username from cookies using async/await
Delete user, also incorporated a popup to confirm if user wants to delete account
Added password validation on create account page
Time: 2 hours
Learned how to create popup windows from this video
Made it so that when an album is clicked, a popup window appears which displays the name of the album
Logout user if cookie expired
Time: 4 hours
Backend:
Placed Taylor Swift album info into a file and used Python's readline function to obtain the info (results in cleaner code)
Learned the existence of ast.literal_eval and json.load to convert string data type into json
Frontend:
Learned how to make responsive web design page so that the album pictures change size depending on the size of the window
Implemented sort by oldest and newest dates, alphabetical, reverse alphabetical (also refined code to make it cleaner and simpler)
Time: 3 hours
Learned async/await so that multiple fetch requests can be sent in order
Worked on the matching game by implementing a feature to send money to the backend when the user finishes the game.
Time: 2 hours
Created a settings page. Made navbar dynamically update to show/hide settings, create account link.
Settings page includes: Username
Backend: Added update and delete user endpoint
Frontend: Change password on settings page
CSS edits: Changed link color in navbar when hover over it
Time: 2 hours
Created a logout page. Made navbar update dynamically so that it shows Log In/Log Out depending on if a cookie is present.
Learned how to incorporate a JavaScript file into an HTML file (see CookieCheck.js)
Time: 1 hour
Learned regex to filter cookies on frontend. Send cookie information to backend so that username can be obtained.
Time: 1 hour
Created login endpoint that gives an error message if invalid username or password. On frontend, I implemented a login feature that obtains a cookie form the backend once the user logs in successfully.
Time: 4 hours
2 hours on implementing sorting
Tried to find APIs for Taylor Swift songs, found a Spotify API on RapidAPI. Used an endpoint to filter through all of the artists and located Taylor Swift's albums.
The API includes information about Taylor Swift's albums and the date that they were released. Using this API, I fetched the data and added it to our backend framework (because RapidAPI limited the amount of times that data could be accessed from that API)
I fetched the data from the frontend and used selection sort to sort the albums based on date.
2 hours on fixing JWT
Issues encountered:
Originally I was using JWT. However, while I was learning about the tokens, I incorporated both JWT and PyJWT in my code. This created some conflict errors which I had to fix.
After deploying, I found that I couldn't use JWT because it was outdated. I had to switch to another, recent library called flask-jwt-extended
Time: 6 hours
Learned how to add JWT using flask, encountered multiple issues, see tangibles below for detailed information.
Total time: 29.5 hours
Time: 2 hours
Time: 30 minutes
Time : 2 hour
Time: 2 hours
Time: 4 hours
ast.literal_eval
andjson.load
to convert string data type into jsonTime: 3 hours
Time: 2 hours
Time: 2 hours
CookieCheck.js
)Time: 1 hour Learned regex to filter cookies on frontend. Send cookie information to backend so that username can be obtained.
Time: 1 hour Created login endpoint that gives an error message if invalid username or password. On frontend, I implemented a login feature that obtains a cookie form the backend once the user logs in successfully.
Time: 4 hours 2 hours on implementing sorting
2 hours on fixing JWT Issues encountered:
Time: 6 hours Learned how to add JWT using flask, encountered multiple issues, see tangibles below for detailed information.
Tangibles located here