From e035a1e551bb94a28561c8bc40f4c61ea1b2b4e5 Mon Sep 17 00:00:00 2001 From: Hayden Carpenter Date: Mon, 23 Dec 2024 12:08:33 -0500 Subject: [PATCH] Hotfixes (#234) * Production (#203) * Update Prod (#202) * Create LICENSE * clean up * Cleanup * update header w condensed version * Small typing changes, add warning for pathname * Docker Rewrite (#156) * add docker rewrite * Update docker to log entrypoint --------- Co-authored-by: Hayden Carpenter * Contact Redesign (#149) * Changed contact modal to only take in a message, and access user information from the userId. Currently due to expired domain mailersend doesn't work, in order to test you can make a new account and switch out the api key and MAIL_SEND_DOMAIN with a trial domain * Renaming unclear variables * Mailing const set to gatech.lol --------- Co-authored-by: Hayden Carpenter * Password Reset API Route (#152) * created database action and api endpoint * Add TODO for using tokens instead --------- Co-authored-by: Hayden Carpenter * Bog-analytics example, page visit tracking (#157) * add example page view logger for development environment with bog-analytics * change client api key name * merge, need to switch to context provider * change client api key name * merge, need to switch to context provider * switch to using provider for analytics logger * delete accidental import * yay --------- Co-authored-by: Hayden Carpenter * Ankith/custom visit (#162) * Custom visit implemented without user_group, working on that now * Removed a bunch of api calls unecessarily accessing the database for info available in the token * Removed mistaken log * Added game statistics * Finished game statistics * Fixed type issues * Correct middleware pattern --------- Co-authored-by: Hayden Carpenter * Refferer should not be undefined, display none * Hayden/mongo replicaset (#163) * Modify docker-compose to use a replicaset with mongo/fix docker to properly run mongo internally/fixes theme and tags bug * Fix order of setup hosts * cms dashboard layout and tables (#168) * cms dashboard layout and tables * change displayed game when changing pages * remove comment * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard --------- Co-authored-by: Hayden Carpenter * cms dashboard user traffic (#169) * add user traffic dashboard (major sources and user groups) * Merging pie chrats onto cms dashboard --------- Co-authored-by: Hayden Carpenter * Prevent CLS (#167) * initial implementation * fixed game gallery filtering * fixed error mistake * ssr on game page * fixed video trailer bug + styling changes * added ssr to game edit page * fixed pagination bug * fix build --------- Co-authored-by: Hayden Carpenter * Added Verification Log Model and Actions (#153) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts --------- Co-authored-by: Hayden Carpenter * Samarth/email verification endpoints (#171) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts * Added email verification template * Added password reset endpoints nits * Integrated password reset function * Added password reset constants * Added basic password reset page frames * Completed password reset request page * Updated props * nits * Completed password reset verify page * Completed password reset update page * Remove cookie after password reset * Completed password reset confirmation page * nit * Refactored components * Added email verification endpoints * Added email templates to repo * Updated var names * Added Email Verification Screen (#166) * Added email verification page + nits * cms dashboard layout and tables (#168) * cms dashboard layout and tables * change displayed game when changing pages * remove comment * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard --------- Co-authored-by: Hayden Carpenter * cms dashboard user traffic (#169) * add user traffic dashboard (major sources and user groups) * Merging pie chrats onto cms dashboard --------- Co-authored-by: Hayden Carpenter * Prevent CLS (#167) * initial implementation * fixed game gallery filtering * fixed error mistake * ssr on game page * fixed video trailer bug + styling changes * added ssr to game edit page * fixed pagination bug * fix build --------- Co-authored-by: Hayden Carpenter * Added Verification Log Model and Actions (#153) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts --------- Co-authored-by: Hayden Carpenter * Fix confirmation text --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Hayden Carpenter Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> --------- Co-authored-by: Samarth Chandna Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> * Fix referer * Ankith/data expiration (#176) * Fully implemented gdpr user deletion, for notes as well * Accounted for edge case where user switches email to that of a deleted user, and edge case when user redeletes an account * Removed uncessary console logs * Changed back domain name * looks good, no checking for if notes should be rendered if marked to delete * add logic not to return deleted notes --------- Co-authored-by: Hayden Carpenter * Added Game Popularity and CRON Job (#177) * Added popularity field for games * Added Netlify CRON job * Reset popularity after updates * Change loading for analytics to prevent CLS and ensure analytics have user data --------- Co-authored-by: Hayden Carpenter * GDPR tracking compliance (#180) * add tracked property on users that is checked before logging analytics on them for gdpr tracking compliance * Fix session updating when edit user tracked * remove session stuff from analytics --------- Co-authored-by: Hayden Carpenter * Data Population and Game-specific User Groups Chart (#179) * inital dashboard integration with analytics done * separated leaderboard data, queried database for game/user names, styling changes * delete console logs * add table for links --------- Co-authored-by: Hayden Carpenter * Helen/sort filtering (#178) * Added popularity field for games * Added Netlify CRON job * Reset popularity after updates * initial commit * incorporate backend --------- Co-authored-by: Samarth Chandna Co-authored-by: Hayden Carpenter * Fix build * Added log and error checking in popularity updater * Fix create game bug * fix create dir bug * Aakash/dashboard export (#191) * restructure data fetching and add day/week/month swticher * example exports working * finished data processing and export functionality * Changed label of xlsx page to referrer breakdown --------- Co-authored-by: yolanda-y-li Co-authored-by: Hayden Carpenter * initial commit (#189) Co-authored-by: Hayden Carpenter * Migrated email to juno (#192) Co-authored-by: Hayden Carpenter * Prod bucket urls * filter modal and tags design (#194) * minor image preview updates (#193) * Yolanda Sprint Day Home Page Design Discrepancies (#197) * fix design things for general user home page * Fix page data reload on edit * nit * Updated gameboys section' * Updated gameboy image and styling --------- Co-authored-by: yolanda-y-li * Aakash Sprint Day Dashboard Design Discrepancies (#196) * implemented all design discrepancies * linting * Support remote urls in game create (#198) * Support remote urls in game create * Fix editing * Helen/game gallery design (#195) * filter modal and tags design * game gallery design fixes * Helen/game screen design (#199) * game screen without admin * game screen design updates * disable logger when tracking is off (#190) * disable logger when tracking is off * test * I think it's as simple as making this use client instead of SSR * Rework logging to hide env keys, all real logging is on server. --------- Co-authored-by: Hayden Carpenter * Ankith/route verification (#187) * Temporary change * More api authentication * Added cookie to authenticate email verification process has gone through * Added authentication to user endpoints as well, basically only if its the same user or admin * Added email authentication to changing your email * Added message when sending code, now I just need to revamp the UI of the profile and so some more testing * Finished Admin account design updates, need to do email verification stuff * Finished ui changes for email authentication * Change edit profile design to match Figma closer * Made Profile modifier handle changing labels properly --------- Co-authored-by: Hayden Carpenter * Update readme (#201) * Update readme --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Helen Chen Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li * oopsies * update package.json * update package.json * update package.json --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Helen Chen Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li * Fix issues (#205) * Update Prod (#202) * Create LICENSE * clean up * Cleanup * update header w condensed version * Small typing changes, add warning for pathname * Docker Rewrite (#156) * add docker rewrite * Update docker to log entrypoint --------- Co-authored-by: Hayden Carpenter * Contact Redesign (#149) * Changed contact modal to only take in a message, and access user information from the userId. Currently due to expired domain mailersend doesn't work, in order to test you can make a new account and switch out the api key and MAIL_SEND_DOMAIN with a trial domain * Renaming unclear variables * Mailing const set to gatech.lol --------- Co-authored-by: Hayden Carpenter * Password Reset API Route (#152) * created database action and api endpoint * Add TODO for using tokens instead --------- Co-authored-by: Hayden Carpenter * Bog-analytics example, page visit tracking (#157) * add example page view logger for development environment with bog-analytics * change client api key name * merge, need to switch to context provider * change client api key name * merge, need to switch to context provider * switch to using provider for analytics logger * delete accidental import * yay --------- Co-authored-by: Hayden Carpenter * Ankith/custom visit (#162) * Custom visit implemented without user_group, working on that now * Removed a bunch of api calls unecessarily accessing the database for info available in the token * Removed mistaken log * Added game statistics * Finished game statistics * Fixed type issues * Correct middleware pattern --------- Co-authored-by: Hayden Carpenter * Refferer should not be undefined, display none * Hayden/mongo replicaset (#163) * Modify docker-compose to use a replicaset with mongo/fix docker to properly run mongo internally/fixes theme and tags bug * Fix order of setup hosts * cms dashboard layout and tables (#168) * cms dashboard layout and tables * change displayed game when changing pages * remove comment * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard --------- Co-authored-by: Hayden Carpenter * cms dashboard user traffic (#169) * add user traffic dashboard (major sources and user groups) * Merging pie chrats onto cms dashboard --------- Co-authored-by: Hayden Carpenter * Prevent CLS (#167) * initial implementation * fixed game gallery filtering * fixed error mistake * ssr on game page * fixed video trailer bug + styling changes * added ssr to game edit page * fixed pagination bug * fix build --------- Co-authored-by: Hayden Carpenter * Added Verification Log Model and Actions (#153) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts --------- Co-authored-by: Hayden Carpenter * Samarth/email verification endpoints (#171) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts * Added email verification template * Added password reset endpoints nits * Integrated password reset function * Added password reset constants * Added basic password reset page frames * Completed password reset request page * Updated props * nits * Completed password reset verify page * Completed password reset update page * Remove cookie after password reset * Completed password reset confirmation page * nit * Refactored components * Added email verification endpoints * Added email templates to repo * Updated var names * Added Email Verification Screen (#166) * Added email verification page + nits * cms dashboard layout and tables (#168) * cms dashboard layout and tables * change displayed game when changing pages * remove comment * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard --------- Co-authored-by: Hayden Carpenter * cms dashboard user traffic (#169) * add user traffic dashboard (major sources and user groups) * Merging pie chrats onto cms dashboard --------- Co-authored-by: Hayden Carpenter * Prevent CLS (#167) * initial implementation * fixed game gallery filtering * fixed error mistake * ssr on game page * fixed video trailer bug + styling changes * added ssr to game edit page * fixed pagination bug * fix build --------- Co-authored-by: Hayden Carpenter * Added Verification Log Model and Actions (#153) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts --------- Co-authored-by: Hayden Carpenter * Fix confirmation text --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Hayden Carpenter Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> --------- Co-authored-by: Samarth Chandna Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> * Fix referer * Ankith/data expiration (#176) * Fully implemented gdpr user deletion, for notes as well * Accounted for edge case where user switches email to that of a deleted user, and edge case when user redeletes an account * Removed uncessary console logs * Changed back domain name * looks good, no checking for if notes should be rendered if marked to delete * add logic not to return deleted notes --------- Co-authored-by: Hayden Carpenter * Added Game Popularity and CRON Job (#177) * Added popularity field for games * Added Netlify CRON job * Reset popularity after updates * Change loading for analytics to prevent CLS and ensure analytics have user data --------- Co-authored-by: Hayden Carpenter * GDPR tracking compliance (#180) * add tracked property on users that is checked before logging analytics on them for gdpr tracking compliance * Fix session updating when edit user tracked * remove session stuff from analytics --------- Co-authored-by: Hayden Carpenter * Data Population and Game-specific User Groups Chart (#179) * inital dashboard integration with analytics done * separated leaderboard data, queried database for game/user names, styling changes * delete console logs * add table for links --------- Co-authored-by: Hayden Carpenter * Helen/sort filtering (#178) * Added popularity field for games * Added Netlify CRON job * Reset popularity after updates * initial commit * incorporate backend --------- Co-authored-by: Samarth Chandna Co-authored-by: Hayden Carpenter * Fix build * Added log and error checking in popularity updater * Fix create game bug * fix create dir bug * Aakash/dashboard export (#191) * restructure data fetching and add day/week/month swticher * example exports working * finished data processing and export functionality * Changed label of xlsx page to referrer breakdown --------- Co-authored-by: yolanda-y-li Co-authored-by: Hayden Carpenter * initial commit (#189) Co-authored-by: Hayden Carpenter * Migrated email to juno (#192) Co-authored-by: Hayden Carpenter * Prod bucket urls * filter modal and tags design (#194) * minor image preview updates (#193) * Yolanda Sprint Day Home Page Design Discrepancies (#197) * fix design things for general user home page * Fix page data reload on edit * nit * Updated gameboys section' * Updated gameboy image and styling --------- Co-authored-by: yolanda-y-li * Aakash Sprint Day Dashboard Design Discrepancies (#196) * implemented all design discrepancies * linting * Support remote urls in game create (#198) * Support remote urls in game create * Fix editing * Helen/game gallery design (#195) * filter modal and tags design * game gallery design fixes * Helen/game screen design (#199) * game screen without admin * game screen design updates * disable logger when tracking is off (#190) * disable logger when tracking is off * test * I think it's as simple as making this use client instead of SSR * Rework logging to hide env keys, all real logging is on server. --------- Co-authored-by: Hayden Carpenter * Ankith/route verification (#187) * Temporary change * More api authentication * Added cookie to authenticate email verification process has gone through * Added authentication to user endpoints as well, basically only if its the same user or admin * Added email authentication to changing your email * Added message when sending code, now I just need to revamp the UI of the profile and so some more testing * Finished Admin account design updates, need to do email verification stuff * Finished ui changes for email authentication * Change edit profile design to match Figma closer * Made Profile modifier handle changing labels properly --------- Co-authored-by: Hayden Carpenter * Update readme (#201) * Update readme --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Helen Chen Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li * oopsies * update package.json * update package.json * update package.json * bad ankith * bad ankith * bad ankith * bad ankith --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Helen Chen Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li * Fix issues (#206) * Update Prod (#202) * Create LICENSE * clean up * Cleanup * update header w condensed version * Small typing changes, add warning for pathname * Docker Rewrite (#156) * add docker rewrite * Update docker to log entrypoint --------- Co-authored-by: Hayden Carpenter * Contact Redesign (#149) * Changed contact modal to only take in a message, and access user information from the userId. Currently due to expired domain mailersend doesn't work, in order to test you can make a new account and switch out the api key and MAIL_SEND_DOMAIN with a trial domain * Renaming unclear variables * Mailing const set to gatech.lol --------- Co-authored-by: Hayden Carpenter * Password Reset API Route (#152) * created database action and api endpoint * Add TODO for using tokens instead --------- Co-authored-by: Hayden Carpenter * Bog-analytics example, page visit tracking (#157) * add example page view logger for development environment with bog-analytics * change client api key name * merge, need to switch to context provider * change client api key name * merge, need to switch to context provider * switch to using provider for analytics logger * delete accidental import * yay --------- Co-authored-by: Hayden Carpenter * Ankith/custom visit (#162) * Custom visit implemented without user_group, working on that now * Removed a bunch of api calls unecessarily accessing the database for info available in the token * Removed mistaken log * Added game statistics * Finished game statistics * Fixed type issues * Correct middleware pattern --------- Co-authored-by: Hayden Carpenter * Refferer should not be undefined, display none * Hayden/mongo replicaset (#163) * Modify docker-compose to use a replicaset with mongo/fix docker to properly run mongo internally/fixes theme and tags bug * Fix order of setup hosts * cms dashboard layout and tables (#168) * cms dashboard layout and tables * change displayed game when changing pages * remove comment * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard --------- Co-authored-by: Hayden Carpenter * cms dashboard user traffic (#169) * add user traffic dashboard (major sources and user groups) * Merging pie chrats onto cms dashboard --------- Co-authored-by: Hayden Carpenter * Prevent CLS (#167) * initial implementation * fixed game gallery filtering * fixed error mistake * ssr on game page * fixed video trailer bug + styling changes * added ssr to game edit page * fixed pagination bug * fix build --------- Co-authored-by: Hayden Carpenter * Added Verification Log Model and Actions (#153) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts --------- Co-authored-by: Hayden Carpenter * Samarth/email verification endpoints (#171) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts * Added email verification template * Added password reset endpoints nits * Integrated password reset function * Added password reset constants * Added basic password reset page frames * Completed password reset request page * Updated props * nits * Completed password reset verify page * Completed password reset update page * Remove cookie after password reset * Completed password reset confirmation page * nit * Refactored components * Added email verification endpoints * Added email templates to repo * Updated var names * Added Email Verification Screen (#166) * Added email verification page + nits * cms dashboard layout and tables (#168) * cms dashboard layout and tables * change displayed game when changing pages * remove comment * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard --------- Co-authored-by: Hayden Carpenter * cms dashboard user traffic (#169) * add user traffic dashboard (major sources and user groups) * Merging pie chrats onto cms dashboard --------- Co-authored-by: Hayden Carpenter * Prevent CLS (#167) * initial implementation * fixed game gallery filtering * fixed error mistake * ssr on game page * fixed video trailer bug + styling changes * added ssr to game edit page * fixed pagination bug * fix build --------- Co-authored-by: Hayden Carpenter * Added Verification Log Model and Actions (#153) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts --------- Co-authored-by: Hayden Carpenter * Fix confirmation text --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Hayden Carpenter Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> --------- Co-authored-by: Samarth Chandna Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> * Fix referer * Ankith/data expiration (#176) * Fully implemented gdpr user deletion, for notes as well * Accounted for edge case where user switches email to that of a deleted user, and edge case when user redeletes an account * Removed uncessary console logs * Changed back domain name * looks good, no checking for if notes should be rendered if marked to delete * add logic not to return deleted notes --------- Co-authored-by: Hayden Carpenter * Added Game Popularity and CRON Job (#177) * Added popularity field for games * Added Netlify CRON job * Reset popularity after updates * Change loading for analytics to prevent CLS and ensure analytics have user data --------- Co-authored-by: Hayden Carpenter * GDPR tracking compliance (#180) * add tracked property on users that is checked before logging analytics on them for gdpr tracking compliance * Fix session updating when edit user tracked * remove session stuff from analytics --------- Co-authored-by: Hayden Carpenter * Data Population and Game-specific User Groups Chart (#179) * inital dashboard integration with analytics done * separated leaderboard data, queried database for game/user names, styling changes * delete console logs * add table for links --------- Co-authored-by: Hayden Carpenter * Helen/sort filtering (#178) * Added popularity field for games * Added Netlify CRON job * Reset popularity after updates * initial commit * incorporate backend --------- Co-authored-by: Samarth Chandna Co-authored-by: Hayden Carpenter * Fix build * Added log and error checking in popularity updater * Fix create game bug * fix create dir bug * Aakash/dashboard export (#191) * restructure data fetching and add day/week/month swticher * example exports working * finished data processing and export functionality * Changed label of xlsx page to referrer breakdown --------- Co-authored-by: yolanda-y-li Co-authored-by: Hayden Carpenter * initial commit (#189) Co-authored-by: Hayden Carpenter * Migrated email to juno (#192) Co-authored-by: Hayden Carpenter * Prod bucket urls * filter modal and tags design (#194) * minor image preview updates (#193) * Yolanda Sprint Day Home Page Design Discrepancies (#197) * fix design things for general user home page * Fix page data reload on edit * nit * Updated gameboys section' * Updated gameboy image and styling --------- Co-authored-by: yolanda-y-li * Aakash Sprint Day Dashboard Design Discrepancies (#196) * implemented all design discrepancies * linting * Support remote urls in game create (#198) * Support remote urls in game create * Fix editing * Helen/game gallery design (#195) * filter modal and tags design * game gallery design fixes * Helen/game screen design (#199) * game screen without admin * game screen design updates * disable logger when tracking is off (#190) * disable logger when tracking is off * test * I think it's as simple as making this use client instead of SSR * Rework logging to hide env keys, all real logging is on server. --------- Co-authored-by: Hayden Carpenter * Ankith/route verification (#187) * Temporary change * More api authentication * Added cookie to authenticate email verification process has gone through * Added authentication to user endpoints as well, basically only if its the same user or admin * Added email authentication to changing your email * Added message when sending code, now I just need to revamp the UI of the profile and so some more testing * Finished Admin account design updates, need to do email verification stuff * Finished ui changes for email authentication * Change edit profile design to match Figma closer * Made Profile modifier handle changing labels properly --------- Co-authored-by: Hayden Carpenter * Update readme (#201) * Update readme --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Helen Chen Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li * oopsies * update package.json * update package.json * update package.json * bad ankith * bad ankith * bad ankith * bad ankith * production env fixes --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Helen Chen Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li * test route * fix test debug * temporary logging of env * Remove insecure route * Added game updater GitHub actions * nit * nit2 * nit3 * nit4 * nit5 * nit6 * nit7 * nit8 * nit9 * Fixed notes bug (#218) * fixed bug by changing lessonPlan to lesson (#219) * remove unallowed chars from xlsx sheet titles (#220) * handle tag overflow in game gallery (#224) * Aakash/hits to page change (#225) * add pageurl attribute to visit event logged in middleware * use pageurl middleware visit for hits to page in dashboard * add option to edit role for admins (#223) * fix create game rerouting (#226) * test * oops wrong one * Fix CRON Job (#227) * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * nit * use current environment when fetching from analytics (#229) * Helen/console errors (#222) * Update Prod (#202) * Create LICENSE * clean up * Cleanup * update header w condensed version * Small typing changes, add warning for pathname * Docker Rewrite (#156) * add docker rewrite * Update docker to log entrypoint --------- Co-authored-by: Hayden Carpenter * Contact Redesign (#149) * Changed contact modal to only take in a message, and access user information from the userId. Currently due to expired domain mailersend doesn't work, in order to test you can make a new account and switch out the api key and MAIL_SEND_DOMAIN with a trial domain * Renaming unclear variables * Mailing const set to gatech.lol --------- Co-authored-by: Hayden Carpenter * Password Reset API Route (#152) * created database action and api endpoint * Add TODO for using tokens instead --------- Co-authored-by: Hayden Carpenter * Bog-analytics example, page visit tracking (#157) * add example page view logger for development environment with bog-analytics * change client api key name * merge, need to switch to context provider * change client api key name * merge, need to switch to context provider * switch to using provider for analytics logger * delete accidental import * yay --------- Co-authored-by: Hayden Carpenter * Ankith/custom visit (#162) * Custom visit implemented without user_group, working on that now * Removed a bunch of api calls unecessarily accessing the database for info available in the token * Removed mistaken log * Added game statistics * Finished game statistics * Fixed type issues * Correct middleware pattern --------- Co-authored-by: Hayden Carpenter * Refferer should not be undefined, display none * Hayden/mongo replicaset (#163) * Modify docker-compose to use a replicaset with mongo/fix docker to properly run mongo internally/fixes theme and tags bug * Fix order of setup hosts * cms dashboard layout and tables (#168) * cms dashboard layout and tables * change displayed game when changing pages * remove comment * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard --------- Co-authored-by: Hayden Carpenter * cms dashboard user traffic (#169) * add user traffic dashboard (major sources and user groups) * Merging pie chrats onto cms dashboard --------- Co-authored-by: Hayden Carpenter * Prevent CLS (#167) * initial implementation * fixed game gallery filtering * fixed error mistake * ssr on game page * fixed video trailer bug + styling changes * added ssr to game edit page * fixed pagination bug * fix build --------- Co-authored-by: Hayden Carpenter * Added Verification Log Model and Actions (#153) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts --------- Co-authored-by: Hayden Carpenter * Samarth/email verification endpoints (#171) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts * Added email verification template * Added password reset endpoints nits * Integrated password reset function * Added password reset constants * Added basic password reset page frames * Completed password reset request page * Updated props * nits * Completed password reset verify page * Completed password reset update page * Remove cookie after password reset * Completed password reset confirmation page * nit * Refactored components * Added email verification endpoints * Added email templates to repo * Updated var names * Added Email Verification Screen (#166) * Added email verification page + nits * cms dashboard layout and tables (#168) * cms dashboard layout and tables * change displayed game when changing pages * remove comment * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard * Apply styling on clicking of table items in paginated cms views and responsive flex for cms dashboard --------- Co-authored-by: Hayden Carpenter * cms dashboard user traffic (#169) * add user traffic dashboard (major sources and user groups) * Merging pie chrats onto cms dashboard --------- Co-authored-by: Hayden Carpenter * Prevent CLS (#167) * initial implementation * fixed game gallery filtering * fixed error mistake * ssr on game page * fixed video trailer bug + styling changes * added ssr to game edit page * fixed pagination bug * fix build --------- Co-authored-by: Hayden Carpenter * Added Verification Log Model and Actions (#153) * Added verification log model and actions * updated docs * renamed variable * add should to increase verbosity on flags * change email token to otp with 20 attempts --------- Co-authored-by: Hayden Carpenter * Fix confirmation text --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Hayden Carpenter Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> --------- Co-authored-by: Samarth Chandna Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> * Fix referer * Ankith/data expiration (#176) * Fully implemented gdpr user deletion, for notes as well * Accounted for edge case where user switches email to that of a deleted user, and edge case when user redeletes an account * Removed uncessary console logs * Changed back domain name * looks good, no checking for if notes should be rendered if marked to delete * add logic not to return deleted notes --------- Co-authored-by: Hayden Carpenter * Added Game Popularity and CRON Job (#177) * Added popularity field for games * Added Netlify CRON job * Reset popularity after updates * Change loading for analytics to prevent CLS and ensure analytics have user data --------- Co-authored-by: Hayden Carpenter * GDPR tracking compliance (#180) * add tracked property on users that is checked before logging analytics on them for gdpr tracking compliance * Fix session updating when edit user tracked * remove session stuff from analytics --------- Co-authored-by: Hayden Carpenter * Data Population and Game-specific User Groups Chart (#179) * inital dashboard integration with analytics done * separated leaderboard data, queried database for game/user names, styling changes * delete console logs * add table for links --------- Co-authored-by: Hayden Carpenter * Helen/sort filtering (#178) * Added popularity field for games * Added Netlify CRON job * Reset popularity after updates * initial commit * incorporate backend --------- Co-authored-by: Samarth Chandna Co-authored-by: Hayden Carpenter * Fix build * Added log and error checking in popularity updater * Fix create game bug * fix create dir bug * Aakash/dashboard export (#191) * restructure data fetching and add day/week/month swticher * example exports working * finished data processing and export functionality * Changed label of xlsx page to referrer breakdown --------- Co-authored-by: yolanda-y-li Co-authored-by: Hayden Carpenter * initial commit (#189) Co-authored-by: Hayden Carpenter * Migrated email to juno (#192) Co-authored-by: Hayden Carpenter * Prod bucket urls * filter modal and tags design (#194) * minor image preview updates (#193) * Yolanda Sprint Day Home Page Design Discrepancies (#197) * fix design things for general user home page * Fix page data reload on edit * nit * Updated gameboys section' * Updated gameboy image and styling --------- Co-authored-by: yolanda-y-li * Aakash Sprint Day Dashboard Design Discrepancies (#196) * implemented all design discrepancies * linting * Support remote urls in game create (#198) * Support remote urls in game create * Fix editing * Helen/game gallery design (#195) * filter modal and tags design * game gallery design fixes * Helen/game screen design (#199) * game screen without admin * game screen design updates * disable logger when tracking is off (#190) * disable logger when tracking is off * test * I think it's as simple as making this use client instead of SSR * Rework logging to hide env keys, all real logging is on server. --------- Co-authored-by: Hayden Carpenter * Ankith/route verification (#187) * Temporary change * More api authentication * Added cookie to authenticate email verification process has gone through * Added authentication to user endpoints as well, basically only if its the same user or admin * Added email authentication to changing your email * Added message when sending code, now I just need to revamp the UI of the profile and so some more testing * Finished Admin account design updates, need to do email verification stuff * Finished ui changes for email authentication * Change edit profile design to match Figma closer * Made Profile modifier handle changing labels properly --------- Co-authored-by: Hayden Carpenter * Update readme (#201) * Update readme --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Helen Chen Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li * oopsies * update package.json * update package.json * update package.json * console bug fixes * update next to 15 * please fix --------- Co-authored-by: Hayden Carpenter Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li * Yolanda/home general design (#200) * fix design things for general user home page * Fix page data reload on edit * nit * Updated gameboys section' * Updated gameboy image and styling * Home match figma * Initial pass for mobile homepage * fix responsiveness on mobile discrepencies --------- Co-authored-by: yolanda-y-li Co-authored-by: Samarth Chandna * Responsiveness (#231) * Added priv policy content, component and page; added socmed links (#232) Co-authored-by: minimatime * Update README.md * filter out local urls from cms dashboard * CMS Hotfix/logging filters --------- Co-authored-by: Helen <72580357+03hchen@users.noreply.github.com> Co-authored-by: Helen Chen Co-authored-by: Samrat Sahoo <44482993+SamratSahoo@users.noreply.github.com> Co-authored-by: Ankith T <119064696+Duckierstone42@users.noreply.github.com> Co-authored-by: Aakash Gupta <77900695+aakashg00@users.noreply.github.com> Co-authored-by: Yolanda Li <142852630+yolanda-y-li@users.noreply.github.com> Co-authored-by: Samarth Chandna <57265280+samarth52@users.noreply.github.com> Co-authored-by: Samarth Chandna Co-authored-by: yolanda-y-li Co-authored-by: minimatime <153239144+minimatime@users.noreply.github.com> Co-authored-by: minimatime --- src/pages/admin/cms-dashboard.tsx | 23 +++++++++++++++++++---- src/server/db/actions/GameAction.ts | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/pages/admin/cms-dashboard.tsx b/src/pages/admin/cms-dashboard.tsx index 9d8f58a..75c829b 100644 --- a/src/pages/admin/cms-dashboard.tsx +++ b/src/pages/admin/cms-dashboard.tsx @@ -325,6 +325,17 @@ const CMSDashboardPage = () => { visitEvents ? visitEvents.events : [], ); + const viewQueryParams = { + projectName: "Jennifer Ann's", + environment: + process.env.NEXT_PUBLIC_ENV === "production" + ? EventEnvironment.PRODUCTION + : EventEnvironment.DEVELOPMENT, + category: "Visit", + subcategory: "game", + limit: 2000, + afterId: undefined, + }; const downloadQueryParams = { projectName: "Jennifer Ann's", environment: @@ -336,7 +347,12 @@ const CMSDashboardPage = () => { limit: 2000, afterId: undefined, }; - const gameEvents = await getCustomEventsPaginated(downloadQueryParams); + const downloadGameEvents = + await getCustomEventsPaginated(downloadQueryParams); + const viewGameEvents = await getCustomEventsPaginated(viewQueryParams); + const gameEvents = { + events: [...downloadGameEvents?.events, ...viewGameEvents?.events], + }; const pdfQueryParams = { projectName: "Jennifer Ann's", @@ -356,13 +372,14 @@ const CMSDashboardPage = () => { pdfEvents?.events, visitEvents?.events, ); - setTrafficSourceData(sourceData); setTrafficGroupsData(groupsData); setAllGameData(gameData); setUserLeaderboard(leaderboardData); } catch (e) { console.error("Error fetching data:", e); + } finally { + setLoading(false); } }; @@ -399,7 +416,6 @@ const CMSDashboardPage = () => { headers: { "Content-Type": "application/json" }, body: JSON.stringify({ userIds: allUserIds }), }); - if (!response.ok) return; const data = await response.json(); @@ -420,7 +436,6 @@ const CMSDashboardPage = () => { setLoading(false); } }; - fetchAllUserNames(); }, [userLeaderboard]); diff --git a/src/server/db/actions/GameAction.ts b/src/server/db/actions/GameAction.ts index ca8875e..32c2f6b 100644 --- a/src/server/db/actions/GameAction.ts +++ b/src/server/db/actions/GameAction.ts @@ -347,6 +347,8 @@ const QUERY_FIELD_HANDLER_MAP: QueryFieldHandlers = { "i", ); filterFieldsAnd.name = { $regex: reg_string }; + console.log("Filter Fields:", filterFieldsAnd); + console.log("Regex Used:", reg_string); } return { filterFieldsAnd: filterFieldsAnd, filterFieldsOr: filterFieldsOr }; },