From 351d866d1663cce526e85f757f64ab822d5ad642 Mon Sep 17 00:00:00 2001 From: Elias Schaut Date: Mon, 21 Nov 2022 01:09:33 +0100 Subject: [PATCH] Release v1.0.0-alpha.3 (#10) * update package * update gitignore * add prisma * add user service * add auth service * add password encryption * implement login route * add auth guard * remove test files * add dotenv package * add jwt generation * add jwt guard with profile controller * add profile site * improve code style with prettier * remove hello worlds * add helmet * add vue framework * connect vue to nest * add css * add login route * add logger middleware + loggin route * update package * add catch for duplicate user registration * implement submit method * make login and registerView more dynamic * hotfix * update prisma schema * update structure * generate Movie db service * add env tmp * update movie relation and service * create movie route and add imdb package * hotfix * implement GET movie:id * fix auth bugs * add info * implement POST movie * add try catch * implement GET movie/all * implement movie table * add client profile * client: add movie add button * prisma: add vote table * backend: edit structure * backend: add vote boilerplate * edit structure * backend: implement POST vote * db: improve naming * backend: add DELETE Vote * backend: add GET vote * update vote output * update proposer output * update package * Client: implement client-side state management to react on loading and logged_in * client: add history view * client: improve movie component table * backend: update route GET movie/all * client: display movie votes * client: implement vote * client: implement router logout * BD: add "name" attribute to userDB * backend: remove middleware from auth * backend: implement email confirm * common: update env tmp * client: add privacy * client: hot fix * client: hot fix * client: add AlertComponent.vue * backend: update movie information * backend: implement movie delete * client: implement delete own movie * client: implement form validation * common: add port configuration * client: add vertical scrolling in movie table * client: rename page title * client: add regex to imdb upload * client: outsource api call * client: hotfix * backend: fix initial interest (now server handled instead of client handled) * backend: restrict unvoting for own proposed movie * client: implement triggerable alert components * common: implemented client warnings on auth * common: implemented better version of client warnings on auth * client: style hotfix * common: update README.md * client: add GitHub Link * client: update login regex + add password confirm * client: create e-mail verified page * client: edit plugin structure * client: hot fix * client: hot fix * client: implement profile page style * client: divide form inputs into separate components * client: text improve * client: hotfix * client: hotfix * client: change route api/profile to api/user * backend: update auth (outsource password service + reduce payload to user_id) * backend: implemented user routes for self-management of own account * client: add profile options + implement get all user data * backend: add gravatar generation * client: add api logic to profile * backend: allow gravatar in helmet * backend: implement md5 hash algorithm * client: add logic to delete account * backend: outsource gravatar in a service + update gravatar url on email change * update README.md * prisma: Update database model to support history and watchlist * backend: add event service * backend: add job schedule structure * backend: add db infrastructure for history and watchlist model * backend: implement get_most_voted in vote db * backend: add event module * backend: implement watchlist job * backend: implement history job * backend: add routes GET movie/watchlist & movie/history * client: movie ts folder in components folder to util folder in src + add CardComponent * backend: add start_time to watchlist * backend: restrict deleting watchlist movies * client: hotfix * client: update favicon * backend: hotfix * backend: update GET watchlist information * common: improve packages * client: create TableComponent to outsource tables * client: add watchlist * client: implement history view * backend: implement GET public user information * backend: hotfix * client: implement watchlist interested feature * client: replace bad emojis with cool svg * client: add trash icon * backend: replace node-schedule with @nest/schedule * client: hotfix * backend: restrict user deletion, when proposed video is in watchlist + restrict already watched movies * client: alerts now shown when adding a movie * client: alerts now shown when deleting a movie --- .env.tmp | 6 + client/package.json | 1 - client/public/favicon.ico | Bin 4286 -> 10462 bytes client/src/assets/svg/heart-fill.svg | 3 + client/src/assets/svg/heartbreak-fill.svg | 3 + client/src/assets/svg/person-hearts.svg | 3 + client/src/assets/svg/trash-fill.svg | 3 + client/src/components/HistroyComponent.vue | 41 ++++++ client/src/components/LoginComponent.vue | 2 +- client/src/components/MovieComponent.vue | 29 ++++- client/src/components/NavbarComponent.vue | 2 +- client/src/components/ProfileComponent.vue | 21 ++- client/src/components/WatchlistComponent.vue | 86 +++++++++++++ .../src/components/alert/AlertComponent.vue | 2 +- .../components/alert/AlertDangerComponent.vue | 2 +- .../components/alert/AlertInfoComponent.vue | 2 +- .../alert/AlertSuccessComponent.vue | 2 +- .../alert/AlertWarningComponent.vue | 2 +- client/src/components/util/CardComponent.vue | 38 ++++++ client/src/components/util/TableComponent.vue | 29 +++++ .../components/util/form/SubmitComponent.vue | 2 +- client/src/plugins/bootstrap.ts | 2 +- client/src/plugins/jquery.ts | 6 +- client/src/router/index.ts | 2 +- client/src/router/router.ts | 2 +- client/src/{components/ts => util}/api.ts | 0 client/src/{components/ts => util}/store.ts | 0 client/src/views/HistoryView.vue | 4 +- client/tsconfig.json | 1 + package-lock.json | 121 ++++++++++++++++++ package.json | 3 + prisma/schema.prisma | 23 +++- src/app.module.ts | 9 +- .../db_services/histroy/historyDB.module.ts | 9 ++ .../db_services/histroy/historyDB.service.ts | 21 +++ .../db_services/movies/movieDB.service.ts | 4 +- .../db_services/users/userDB.service.ts | 4 + .../db_services/votes/voteDB.service.ts | 22 ++++ .../watchlist/watchListDB.module.ts | 9 ++ .../watchlist/watchListDB.service.ts | 25 ++++ src/common/event_service/event.module.ts | 13 ++ src/common/event_service/jobs/history.job.ts | 35 +++++ .../event_service/jobs/watchlist.job.ts | 37 ++++++ src/main.ts | 1 + src/movie/movie.controller.ts | 10 ++ src/movie/movie.module.ts | 4 +- src/movie/movie.service.ts | 44 ++++++- src/profile/profile.controller.ts | 18 --- src/profile/profile.module.ts | 7 - src/user/user.controller.ts | 7 +- src/user/user.module.ts | 3 +- src/user/user.service.ts | 19 ++- 52 files changed, 664 insertions(+), 80 deletions(-) create mode 100644 client/src/assets/svg/heart-fill.svg create mode 100644 client/src/assets/svg/heartbreak-fill.svg create mode 100644 client/src/assets/svg/person-hearts.svg create mode 100644 client/src/assets/svg/trash-fill.svg create mode 100644 client/src/components/HistroyComponent.vue create mode 100644 client/src/components/WatchlistComponent.vue create mode 100644 client/src/components/util/CardComponent.vue create mode 100644 client/src/components/util/TableComponent.vue rename client/src/{components/ts => util}/api.ts (100%) rename client/src/{components/ts => util}/store.ts (100%) create mode 100644 src/common/db_services/histroy/historyDB.module.ts create mode 100644 src/common/db_services/histroy/historyDB.service.ts create mode 100644 src/common/db_services/watchlist/watchListDB.module.ts create mode 100644 src/common/db_services/watchlist/watchListDB.service.ts create mode 100644 src/common/event_service/event.module.ts create mode 100644 src/common/event_service/jobs/history.job.ts create mode 100644 src/common/event_service/jobs/watchlist.job.ts delete mode 100644 src/profile/profile.controller.ts delete mode 100644 src/profile/profile.module.ts diff --git a/.env.tmp b/.env.tmp index 864b2ab..9564acb 100644 --- a/.env.tmp +++ b/.env.tmp @@ -2,6 +2,12 @@ PROJECT_NAME="Movie-Monday-Manager" FRONTEND_URL="http://localhost:3000/" PORT="3000" +SCHEDULE_WATCHLIST="0 15 * * 1" +SCHEDULE_START="0 19 * * 1" +SCHEDULE_HISTORY="45 23 * * 1" +PAUSE_TIME_MIN="15" +NUM_OF_MOVIES="2" + DATABASE_URL="file:./dev.db" JWT_SECRET="secret" JWT_EXPIRATION="2h" diff --git a/client/package.json b/client/package.json index b9af526..a4c5a19 100644 --- a/client/package.json +++ b/client/package.json @@ -18,7 +18,6 @@ "devDependencies": { "@types/jquery": "^3.5.14", "@types/bootstrap": "^5.2.6", - "@types/bootstrap-table": "^1.12.0", "@types/node": "^16.11.47", "@vitejs/plugin-vue": "^3.0.1", "@vue/tsconfig": "^0.1.3", diff --git a/client/public/favicon.ico b/client/public/favicon.ico index df36fcfb72584e00488330b560ebcf34a41c64c2..550a2bca54b18ec314ad118cc6b1363ab093781a 100644 GIT binary patch literal 10462 zcmeHNy;8$43>Mdcu}sW97+_-P12FLxth@uiLpE5MI3{mQyZ~>&z{JJ?g;!u=3!maM zr~2e1M_OOpvpD%jmZDEm?6f6B8~B^e2(6*#eWGn5LPrqM37F+fTYE&i2aX#7n!2th z;4|vBt=dLQuBC zAaxw&IT+NW)FVhp&nfa&o`Y^9AEP@`_{l9dZR&l_zBNpYbqJ-7V+htZ+Z^KfLIC_7 zG30L%SnBVC>^sE6bH*AYLkdCJ#tah3SM?lB0DZwli6gkTkR7{_p|q1ykNoSgF6VBa zJHHCbwe%@K$j^y=F#Sg-hd9>dbE4615){pf!lkaqs?OaKhgNJwhT6-0Ug{C#D8v16 z2h9BYR>-fAc}l%M*msDB=Ztj-rH*3=);8N5;#ime8yHdu#j&D5sq0bB-Jm9=9zjBS zPLa3rJa-#8=l3$&ewP!+)ToF2{?g^B5%vRj4mJM{*1Vs|sI(X}zdttVIzpz`b^UWi t)Ya1_^!Q?tzRTXP$Lu}MX@wEv>Dha`*mb?%u0Ce(LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S diff --git a/client/src/assets/svg/heart-fill.svg b/client/src/assets/svg/heart-fill.svg new file mode 100644 index 0000000..c240700 --- /dev/null +++ b/client/src/assets/svg/heart-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/client/src/assets/svg/heartbreak-fill.svg b/client/src/assets/svg/heartbreak-fill.svg new file mode 100644 index 0000000..5f3bbcb --- /dev/null +++ b/client/src/assets/svg/heartbreak-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/client/src/assets/svg/person-hearts.svg b/client/src/assets/svg/person-hearts.svg new file mode 100644 index 0000000..beee1d5 --- /dev/null +++ b/client/src/assets/svg/person-hearts.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/client/src/assets/svg/trash-fill.svg b/client/src/assets/svg/trash-fill.svg new file mode 100644 index 0000000..3061dca --- /dev/null +++ b/client/src/assets/svg/trash-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/client/src/components/HistroyComponent.vue b/client/src/components/HistroyComponent.vue new file mode 100644 index 0000000..07c4edb --- /dev/null +++ b/client/src/components/HistroyComponent.vue @@ -0,0 +1,41 @@ + + + + + \ No newline at end of file diff --git a/client/src/components/LoginComponent.vue b/client/src/components/LoginComponent.vue index 0149f33..78b3181 100644 --- a/client/src/components/LoginComponent.vue +++ b/client/src/components/LoginComponent.vue @@ -15,7 +15,7 @@ + + \ No newline at end of file diff --git a/client/src/components/alert/AlertComponent.vue b/client/src/components/alert/AlertComponent.vue index f100a6f..a1500b3 100644 --- a/client/src/components/alert/AlertComponent.vue +++ b/client/src/components/alert/AlertComponent.vue @@ -5,7 +5,7 @@ diff --git a/client/src/components/alert/AlertInfoComponent.vue b/client/src/components/alert/AlertInfoComponent.vue index 35d298a..af37c48 100644 --- a/client/src/components/alert/AlertInfoComponent.vue +++ b/client/src/components/alert/AlertInfoComponent.vue @@ -10,7 +10,7 @@ diff --git a/client/src/components/alert/AlertSuccessComponent.vue b/client/src/components/alert/AlertSuccessComponent.vue index 84c8d37..8f537bd 100644 --- a/client/src/components/alert/AlertSuccessComponent.vue +++ b/client/src/components/alert/AlertSuccessComponent.vue @@ -10,7 +10,7 @@ diff --git a/client/src/components/alert/AlertWarningComponent.vue b/client/src/components/alert/AlertWarningComponent.vue index b112d24..0d60747 100644 --- a/client/src/components/alert/AlertWarningComponent.vue +++ b/client/src/components/alert/AlertWarningComponent.vue @@ -10,7 +10,7 @@ diff --git a/client/src/components/util/CardComponent.vue b/client/src/components/util/CardComponent.vue new file mode 100644 index 0000000..3d7f2e3 --- /dev/null +++ b/client/src/components/util/CardComponent.vue @@ -0,0 +1,38 @@ + + + + + \ No newline at end of file diff --git a/client/src/components/util/TableComponent.vue b/client/src/components/util/TableComponent.vue new file mode 100644 index 0000000..4e13be1 --- /dev/null +++ b/client/src/components/util/TableComponent.vue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/client/src/components/util/form/SubmitComponent.vue b/client/src/components/util/form/SubmitComponent.vue index 62296cc..3e3d3c1 100644 --- a/client/src/components/util/form/SubmitComponent.vue +++ b/client/src/components/util/form/SubmitComponent.vue @@ -10,7 +10,7 @@