Skip to content

Commit

Permalink
Update prod (#233)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* 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 <[email protected]>

* Password Reset API Route (#152)

* created database action and api endpoint

* Add TODO for using tokens instead

---------

Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Fix confirmation text

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>

---------

Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Helen <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>

* initial commit (#189)

Co-authored-by: Hayden Carpenter <[email protected]>

* Migrated email to juno (#192)

Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Update readme (#201)

* Update readme

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Helen Chen <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>

* oopsies

* update package.json

* update package.json

* update package.json

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Helen Chen <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Password Reset API Route (#152)

* created database action and api endpoint

* Add TODO for using tokens instead

---------

Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Fix confirmation text

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>

---------

Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Helen <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>

* initial commit (#189)

Co-authored-by: Hayden Carpenter <[email protected]>

* Migrated email to juno (#192)

Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Update readme (#201)

* Update readme

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Helen Chen <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>

* oopsies

* update package.json

* update package.json

* update package.json

* bad ankith

* bad ankith

* bad ankith

* bad ankith

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Helen Chen <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Password Reset API Route (#152)

* created database action and api endpoint

* Add TODO for using tokens instead

---------

Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Fix confirmation text

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>

---------

Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Helen <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>

* initial commit (#189)

Co-authored-by: Hayden Carpenter <[email protected]>

* Migrated email to juno (#192)

Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Update readme (#201)

* Update readme

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Helen Chen <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>

* 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 <[email protected]>
Co-authored-by: Helen Chen <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Password Reset API Route (#152)

* created database action and api endpoint

* Add TODO for using tokens instead

---------

Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Fix confirmation text

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>

---------

Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Helen <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hayden Carpenter <[email protected]>

* initial commit (#189)

Co-authored-by: Hayden Carpenter <[email protected]>

* Migrated email to juno (#192)

Co-authored-by: Hayden Carpenter <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Update readme (#201)

* Update readme

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Helen Chen <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>

* oopsies

* update package.json

* update package.json

* update package.json

* console bug fixes

* update next to 15

* please fix

---------

Co-authored-by: Hayden Carpenter <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>

* 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 <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>

* Responsiveness (#231)

* Added priv policy content, component and page; added socmed links (#232)

Co-authored-by: minimatime <[email protected]>

* Update README.md

* filter out local urls from cms dashboard

---------

Co-authored-by: Helen <[email protected]>
Co-authored-by: Helen Chen <[email protected]>
Co-authored-by: Samrat Sahoo <[email protected]>
Co-authored-by: Ankith T <[email protected]>
Co-authored-by: Aakash Gupta <[email protected]>
Co-authored-by: Yolanda Li <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: Samarth Chandna <[email protected]>
Co-authored-by: yolanda-y-li <[email protected]>
Co-authored-by: minimatime <[email protected]>
Co-authored-by: minimatime <[email protected]>
  • Loading branch information
12 people authored Dec 20, 2024
1 parent 5adf1e5 commit 5a4eb45
Show file tree
Hide file tree
Showing 38 changed files with 1,303 additions and 625 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/game-popularity-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ jobs:
- uses: actions/checkout@v4
- uses: gautamkrishnar/[email protected]

run-dev-game-popularity-updater:
name: Update Game Popularity for Development Environment
uses: ./.github/workflows/reusable-game-popularity-updater.yml
with:
environment: "Development"
secrets: inherit

run-prod-game-popularity-updater:
name: Update Game Popularity for Production Environment
uses: ./.github/workflows/reusable-game-popularity-updater.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-game-popularity-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
node-version: "18"
cache: "npm"

- name: Install dependencies
run: npm ci
Expand Down
8 changes: 4 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"plugins": ["prettier-plugin-tailwindcss"],
"endOfLine": "lf"
}
{
"plugins": ["prettier-plugin-tailwindcss"],
"endOfLine": "lf"
}
Empty file added NUL
Empty file.
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Jennifer Ann's Group is a nonprofit organization dedicated to preventing teen da
If you are unable to use the commands to retrieve the `.env` file, you can download or visit [Bitwarden](https://bitwarden.com/) and login using `[email protected]` and the master password. The `.env` file will be available within the vault.

- To setup the db with example data, run:

```sh
npm run add-initial-data
```
Expand Down Expand Up @@ -66,21 +67,7 @@ The Dockerized application will have live-reloading of changes made on the host
npm run add-initial-data
```

Note: You cannot have another mongo instance running at `mongodb://localhost:27017`, Docker will spin up the db inside of
I would fight atlas for you
5:36
Natasha Valluri
email: [email protected]
5:36
Natasha Valluri
password: Password123!
5:37
Natasha Valluri
I’m pretty sure
Hayden Carpenter
Hayden Carpenter 5:47 PMstions/40452508/docker-error-on-an-entrypoint-script-no-such-file-or-directory) to fix it.
Note: You cannot have another mongo instance running at `mongodb://localhost:27017`, Docker will spin up the db, interally and expose it, instead.

## Major Technologies

Expand All @@ -89,11 +76,14 @@ Hayden Carpenter 5:47 PMstions/40452508/docker-error-on-an-entrypoint-script-no
- [Tailwind CSS](https://tailwindcss.com)

## Documentation

### Secrets

- Production secrets: `.env` in Bitwarden.
- Local secrets: `.env.local` in Bitwarden. Used when setting up local container with the Bitwarden CLI.
- Local secrets: `.env.local` in Bitwarden. Used when setting up local container with the Bitwarden CLI.

### Databases

Production Database: We're planning to spin up Mongo in Azure, but we've had issues with Azure giving us permission to. The NP is aware of this problem and we're trying to sort it out, but we have been unable to do so before DRB. We have temporarily spinned up a cluster on Atlas using the DRB test email.

Local Database: MongoDB on Atlas on the Jennifer Ann's Mongo Account (Sign in with our Gmail located in Bitwarden).
Expand All @@ -103,11 +93,13 @@ Local Database: MongoDB on Atlas on the Jennifer Ann's Mongo Account (Sign in wi
We use mongoose for our schemas. Updating database objects requires updating those schemas in `server/db/models` and altering the actions in the `server/db/actions` directory accordingly. The connection strings are in the environment files store in Bitwarden. There should be no problem creating a new Mongo database, updating the connection string, and running `npm run add-initial-data` if you want to re-create the database.

### File Storage

For accessing both `application-files` (images, pdfs, etc) and `webgl-builds`, we use Backblaze B2 for hosting and Cloudflare as a bridge to connect to it. Cloudflare allows us to reduce the costs on data transfer.

There is only __one__ Cloudflare account and only __one__ Backblaze account. The same Cloudflare worker is used for both production and development, as all it really does is mitigate our costs and isn't responsible for any data storage. There are __two__ versions of the buckets on the Backblaze account. One is for dev and one is for prod, and those buckets are selected at runtime based on the `NODE_ENV` variable. The `B2_BUCKET_ID_BUILD` and `B2_BUCKET_ID_APPLICATION` env variables have to be updated accordingly as well, corresponding to the production/development bucket they are using. Each set of buckets are only used for their respective environments.
There is only **one** Cloudflare account and only **one** Backblaze account. The same Cloudflare worker is used for both production and development, as all it really does is mitigate our costs and isn't responsible for any data storage. There are **two** versions of the buckets on the Backblaze account. One is for dev and one is for prod, and those buckets are selected at runtime based on the `NODE_ENV` variable. The `B2_BUCKET_ID_BUILD` and `B2_BUCKET_ID_APPLICATION` env variables have to be updated accordingly as well, corresponding to the production/development bucket they are using. Each set of buckets are only used for their respective environments.

#### Reconfiguring

Any data can be put in the Backblaze buckets. The `cloudflare-b2` package inside of this repository can be used to update the configuration of the Cloudflare worker. Simply update the `src/index.js` file and run `npm run deploy`. To update the CORS policy for Backblaze, you have to use the [B2 CLI tool](https://www.backblaze.com/docs/cloud-storage-command-line-tools). Our CORS policy is kept traack of in the `b2-cors.json` file and then we update the actual policy with `b2-tools`.

### Juno
Expand All @@ -116,12 +108,13 @@ We use [Juno](https://github.com/GTBitsOfGood/juno) for email services. Juno cur

### Analytics

We use [bog-analytics](https://github.com/GTBitsOfGood/bog-analytics) for analytics. This will always be hosted on BoG infrastructure and we have no plans to move it. The actual data API is only used from the server, and we use internal `api/events/log` and `api/events/view` routes to access it. There is an useAnalytics hook that calls this API with the same syntax as the npm package.
We use [bog-analytics](https://github.com/GTBitsOfGood/bog-analytics) for analytics. This will always be hosted on BoG infrastructure and we have no plans to move it. The actual data API is only used from the server, and we use internal `api/events/log` and `api/events/view` routes to access it. There is an useAnalytics hook that calls this API with the same syntax as the npm package.

### Cron Jobs

We have a few cron jobs that run periodically for updating data.

- Every day, we check if data should be deleted following GDPR (user data should be deleted 30 days after deleting an account).
- Every day, we recalculate 'popularity' values for games to decide rankings.

These jobs have verification keys as specified in the .env and can be run from wherever. We're using Github Actions to run them.
These jobs have verification keys as specified in the .env and can be run from wherever. We're using Github Actions to run them.
6 changes: 5 additions & 1 deletion cloudflare-b2/b2-cors.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[
{
"allowedHeaders": ["*"],
"allowedOperations": ["b2_upload_file", "b2_download_file_by_id", "b2_download_file_by_name"],
"allowedOperations": [
"b2_upload_file",
"b2_download_file_by_id",
"b2_download_file_by_name"
],
"allowedOrigins": [
"http://localhost:3000",
"https://jennifer-anns.netlify.app",
Expand Down
2 changes: 1 addition & 1 deletion components.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"components": "@/components",
"utils": "@/lib/utils"
}
}
}
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.8'
version: "3.8"

services:
app:
Expand Down Expand Up @@ -46,4 +46,4 @@ networks:

volumes:
mongodb-data:
node_modules:
node_modules:
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ const nextConfig = {
images: {
domains: ["cloudflare-b2.bogjenniferanns.workers.dev"],
},
productionBrowserSourceMaps: process.env.NEXT_PUBLIC_ENV !== "production"
productionBrowserSourceMaps: process.env.NEXT_PUBLIC_ENV !== "production",
experimental: {
middlewarePrefetch: "strict",
},
};

module.exports = nextConfig;
Loading

0 comments on commit 5a4eb45

Please sign in to comment.