Refactor/Project structure #67

Merged
KevinMidboe merged 56 commits from refactor/project-structure into master 2020-12-10 22:20:38 +00:00
KevinMidboe commented 2020-12-04 20:03:38 +00:00 (Migrated from github.com)

Housekeeping 🧹

Updated all npm packages and removed all unused packages or packages easily replaced be local code. The project tree has also been simplified and renamed to better reflect it's contents.

Noteworthy changes:

  • Removed all un-used packages and files.
  • Updated all packages.
  • Updated webpack to version 5 and migrated configs to support it.
  • Redis uses sorted lists to allow pagination w/ page & count params.
  • Replaced helmet, cors & policy packages w/ local middleware implementations.
  • Frontend is now compiled to spilt in chunks to decrease initial load size.
  • Assets and compiled frontend moved to /public folder.
  • Renamed /src folder to /frontend.
  • Manually include and setup google analytics.
  • Updated chat to better handle username validation & scroll handling on new messages or loading more pages.

Commits:

  • Moved assets to src folder. 73d15d
  • Updated references to new assets location. 72ba0f
  • Moving the assets to root level. 526be3
  • Removed unused PM2 config. abf673
  • Separated router and user authentication. Renamed login.js to user.js and now it only exports functions for the router to use. d5f3a7
  • Updated webpack so dist folder now lives at project root. 794a2b
  • Output index file should be in root of dist folder. bce28c
  • Replaced helmet, cors & policy w/ local implem. efbad6
  • Repalced body-parser for native express.json(). d2242d
  • Replace babel/polyfill w/ core-js v3. d49303
  • Where we import module.exports don't work. 5cbb3c
  • New command start-dev runs with node_env flag set to development. b6e2bd
  • Better redis logging. f1d500
  • Chathistory only returns funcs and used by router. ee5f81
  • Exclude moment from chart.js from webpack. e12e5c
  • Frontend updated: Login and register moved to /api/ path. 2504dc
  • Moved to api router. 50c79a
  • Assets and dist static paths. c85e6c
  • Cleaned redirects and disabled sw when localhost. 7eb69a
  • Define socketIo as io on app. 054ff6
  • Better url handling when connecting to socketio. 7096fb
  • Updated font url w/ updated assets path. 1f1742
  • Pulled feature branch up-to-date w/ master. 30fdbb
  • Moved assets into public folder. 0e8f73
  • Manually include local google analytics file. a2a81e
  • Preprended /public to all /assets references. 594c4c
  • Single template & analytics.js script reference. cc0bef
  • Webpack conf now outputs to public/dist. d36aad
  • Frontend checks if localhost before req sw.js. 51e11d
  • Upgraded html-webpack-plugin. 036f6e
  • Moved middleware/ & schemas/ into api/. 236c07
  • Require statements now use path.join correctly. ad27ba
  • All style imports use @ webpack alias for root. 7bebe0
  • Replaced uglifyjs w/ webpack 5 TerserPlugin. 81ce46
  • 'Use' for babel-loader and removed unused deps. cf0614
  • Urlloader uses options not query params. 7c0d7c
  • Updated and remove unused dependencies. ea1237
  • Removed vue-analytics and update all code refs. edd09c
  • Removed sentry tracing and before events are sent we console.error log them and in dev disable all events. d58f6d
  • Added download location and date. 055d13
  • Moved entry and HtmlWebpackPlugin from Vinlottis.config to webpack.common and webpack.prod. Removed Vinlottis.config. ccc729
  • Updated yarn.lock 8f844d
  • Now saves messages as redis sorted list. da8251
  • Chat history pages w/ page & limit params. 6503b3
  • Better username validation for chat registration. 539386
  • Refined chat scroll handling & styling. ced7eb
  • Invalid username validation prompt. c4c74c
  • Build bundle analyzer and no-auth start commands. 2fa0c1
  • Misc updates and better logging. 9e7be8
  • Send ga event for pageview when visiting virtualLotteryPage. 466e21
  • Enabled codesplitting by chuck for frontend pages. a1a14b
  • Updated outdates packages. 37f41f
  • Only setup sentry when not in development. 913268
  • Renamed /src to /frontend. ce7e05
  • Updated dev webpack config. 926557
  • Dev-server proxies /api and WS request to backend. 183981
# Housekeeping 🧹 Updated all npm packages and removed all unused packages or packages easily replaced be local code. The project tree has also been simplified and renamed to better reflect it's contents. Noteworthy changes: - Removed all un-used packages and files. - Updated all packages. - Updated webpack to version 5 and migrated configs to support it. - Redis uses sorted lists to allow pagination w/ page & count params. - Replaced helmet, cors & policy packages w/ local middleware implementations. - Frontend is now compiled to spilt in chunks to decrease initial load size. - Assets and compiled frontend moved to `/public` folder. - Renamed `/src` folder to `/frontend`. - Manually include and setup google analytics. - Updated chat to better handle username validation & scroll handling on new messages or loading more pages. # Commits: - Moved assets to src folder. [73d15d](https://github.com/KevinMidboe/vinlottis/commit/73d15dcdffe2a301e0267c84150875bbdb0c7d54) - Updated references to new assets location. [72ba0f](https://github.com/KevinMidboe/vinlottis/commit/72ba0fb39846d6e793439497207f988e22f8d4fa) - Moving the assets to root level. [526be3](https://github.com/KevinMidboe/vinlottis/commit/526be378d3b9bb3576bb4af439e73b0bc822c993) - Removed unused PM2 config. [abf673](https://github.com/KevinMidboe/vinlottis/commit/abf673faebc0a1b8d3532d6df750c986c27b0141) - Separated router and user authentication. Renamed login.js to user.js and now it only exports functions for the router to use. [d5f3a7](https://github.com/KevinMidboe/vinlottis/commit/d5f3a7a1f002648ea91965758d6a5865ec8df094) - Updated webpack so dist folder now lives at project root. [794a2b](https://github.com/KevinMidboe/vinlottis/commit/794a2b06e4ff97a814ab58a50f786cba87705e53) - Output index file should be in root of dist folder. [bce28c](https://github.com/KevinMidboe/vinlottis/commit/bce28c5eb9768941c9aeac6126a39616d7dff1b4) - Replaced helmet, cors & policy w/ local implem. [efbad6](https://github.com/KevinMidboe/vinlottis/commit/efbad63fcd57ac511d42e8a6e691995777b7e085) - Repalced body-parser for native express.json(). [d2242d](https://github.com/KevinMidboe/vinlottis/commit/d2242d4b9bfe1622bb0f2ee5876ce81610468097) - Replace babel/polyfill w/ core-js v3. [d49303](https://github.com/KevinMidboe/vinlottis/commit/d49303a42a3e654b345c34d3acbb38de46e48376) - Where we import module.exports don't work. [5cbb3c](https://github.com/KevinMidboe/vinlottis/commit/5cbb3cbe8730a3cb68f9302527f4bd8cba56995d) - New command start-dev runs with node_env flag set to development. [b6e2bd](https://github.com/KevinMidboe/vinlottis/commit/b6e2bde4d13039d2c2cf3c1d4c24d964c6fa69be) - Better redis logging. [f1d500](https://github.com/KevinMidboe/vinlottis/commit/f1d500936b1dd69f0c657f1191794092000459f6) - Chathistory only returns funcs and used by router. [ee5f81](https://github.com/KevinMidboe/vinlottis/commit/ee5f817248ca63e071c17c64537e41f1849259e6) - Exclude moment from chart.js from webpack. [e12e5c](https://github.com/KevinMidboe/vinlottis/commit/e12e5cafb05cd3f473d5ee72fee436fb9af24fef) - Frontend updated: Login and register moved to /api/ path. [2504dc](https://github.com/KevinMidboe/vinlottis/commit/2504dc55d65a6f142fae37b0363cbe87d50afb52) - Moved to api router. [50c79a](https://github.com/KevinMidboe/vinlottis/commit/50c79abaf75f935a021f4a3613deeba5b2c74657) - Assets and dist static paths. [c85e6c](https://github.com/KevinMidboe/vinlottis/commit/c85e6ca56a62067df7a88e35527f0d4e4fa74a1d) - Cleaned redirects and disabled sw when localhost. [7eb69a](https://github.com/KevinMidboe/vinlottis/commit/7eb69aa3f7e4ba4a7a385bdf4a676818724cb96a) - Define socketIo as io on app. [054ff6](https://github.com/KevinMidboe/vinlottis/commit/054ff69b2786ce98c04ca5d59a59163b3d8967d9) - Better url handling when connecting to socketio. [7096fb](https://github.com/KevinMidboe/vinlottis/commit/7096fbed868e382aa2ee75bc023c25b65b1318e8) - Updated font url w/ updated assets path. [1f1742](https://github.com/KevinMidboe/vinlottis/commit/1f17429c8f91c174f66696ec759a45da80834ebc) - Pulled feature branch up-to-date w/ master. [30fdbb](https://github.com/KevinMidboe/vinlottis/commit/30fdbb5e2f3b772dd8e6fffb4ef38129d6e8f574) - Moved assets into public folder. [0e8f73](https://github.com/KevinMidboe/vinlottis/commit/0e8f73ebd5bd1cf4d9563ade81e8de8ee050575c) - Manually include local google analytics file. [a2a81e](https://github.com/KevinMidboe/vinlottis/commit/a2a81e488e672dc701b4e2fc8205aeaac2f70ba0) - Preprended /public to all /assets references. [594c4c](https://github.com/KevinMidboe/vinlottis/commit/594c4cc4828923ac9fe68c94bc577d3af0943e86) - Single template & analytics.js script reference. [cc0bef](https://github.com/KevinMidboe/vinlottis/commit/cc0bef927f1fa10a9c7da2f85c3958eacf16cac6) - Webpack conf now outputs to public/dist. [d36aad](https://github.com/KevinMidboe/vinlottis/commit/d36aad3f9ee2e3a5c6a320791c44a118347c8746) - Frontend checks if localhost before req sw.js. [51e11d](https://github.com/KevinMidboe/vinlottis/commit/51e11d0df06f13efe13f0b35656eb75e046cbef0) - Upgraded html-webpack-plugin. [036f6e](https://github.com/KevinMidboe/vinlottis/commit/036f6ea499b8046fa555298ca56a6b1e5baad3e7) - Moved middleware/ & schemas/ into api/. [236c07](https://github.com/KevinMidboe/vinlottis/commit/236c07f3d0ded7026ce722451ef9ac1f11c15c07) - Require statements now use path.join correctly. [ad27ba](https://github.com/KevinMidboe/vinlottis/commit/ad27ba8b33de6354b4a34712866f4a5e76014e40) - All style imports use @ webpack alias for root. [7bebe0](https://github.com/KevinMidboe/vinlottis/commit/7bebe07db6c7f5c7150df01e4aa19329265fda4c) - Replaced uglifyjs w/ webpack 5 TerserPlugin. [81ce46](https://github.com/KevinMidboe/vinlottis/commit/81ce466318e6c5f3e6f1351922c4628e7aeb9aa4) - 'Use' for babel-loader and removed unused deps. [cf0614](https://github.com/KevinMidboe/vinlottis/commit/cf06140f60ecba9b8ec728ab32359535dc4e0fc7) - Urlloader uses options not query params. [7c0d7c](https://github.com/KevinMidboe/vinlottis/commit/7c0d7c14ec7ec11d3f836fb3f5ac483e17713b41) - Updated and remove unused dependencies. [ea1237](https://github.com/KevinMidboe/vinlottis/commit/ea1237464d70e56de8aa534801b7f03021cff539) - Removed vue-analytics and update all code refs. [edd09c](https://github.com/KevinMidboe/vinlottis/commit/edd09c012c491dbe5d67ee1f6a81d8f2e391e989) - Removed sentry tracing and before events are sent we console.error log them and in dev disable all events. [d58f6d](https://github.com/KevinMidboe/vinlottis/commit/d58f6dd21021b632c6500dd82e4d68093016d484) - Added download location and date. [055d13](https://github.com/KevinMidboe/vinlottis/commit/055d13af3536cab73b4d697bb2c327f9cfae59fc) - Moved entry and HtmlWebpackPlugin from Vinlottis.config to webpack.common and webpack.prod. Removed Vinlottis.config. [ccc729](https://github.com/KevinMidboe/vinlottis/commit/ccc72997c0450037d4831d610833f940c430573d) - Updated yarn.lock [8f844d](https://github.com/KevinMidboe/vinlottis/commit/8f844dbf85671028277adb65c0b913eb3f8ae4d1) - Now saves messages as redis sorted list. [da8251](https://github.com/KevinMidboe/vinlottis/commit/da8251c733ebf14a6d0e8c8b08dd4bb751898203) - Chat history pages w/ page & limit params. [6503b3](https://github.com/KevinMidboe/vinlottis/commit/6503b309c5d1049dc7f365c40195e691e30c6fa2) - Better username validation for chat registration. [539386](https://github.com/KevinMidboe/vinlottis/commit/539386664c4d9d2affdff48497889bfc6817ecd4) - Refined chat scroll handling & styling. [ced7eb](https://github.com/KevinMidboe/vinlottis/commit/ced7ebfcac6b2803bcfe27c944cca760a39b1a24) - Invalid username validation prompt. [c4c74c](https://github.com/KevinMidboe/vinlottis/commit/c4c74ca3ef54bb4f5dbc36b33419e0ed50e55a70) - Build bundle analyzer and no-auth start commands. [2fa0c1](https://github.com/KevinMidboe/vinlottis/commit/2fa0c1085c989f54ec6d7bad75af3beb882664c9) - Misc updates and better logging. [9e7be8](https://github.com/KevinMidboe/vinlottis/commit/9e7be82f571b95c61aaf4ac7fafd71ed1e8207b1) - Send ga event for pageview when visiting virtualLotteryPage. [466e21](https://github.com/KevinMidboe/vinlottis/commit/466e21aa0e2d217a0a7175dc9c69345ac56c672c) - Enabled codesplitting by chuck for frontend pages. [a1a14b](https://github.com/KevinMidboe/vinlottis/commit/a1a14b5361c5fcfa4dcc2bb4cfaf6b590c329f2f) - Updated outdates packages. [37f41f](https://github.com/KevinMidboe/vinlottis/commit/37f41ff89499e16fdb580f81c2ac661fd23ff42e) - Only setup sentry when not in development. [913268](https://github.com/KevinMidboe/vinlottis/commit/913268b01cc26a8b454c05c81163c269682ab61d) - Renamed /src to /frontend. [ce7e05](https://github.com/KevinMidboe/vinlottis/commit/ce7e05fd4358fc06f323b8b9e37ea049c4277b59) - Updated dev webpack config. [926557](https://github.com/KevinMidboe/vinlottis/commit/9265572e4540503057547566dfa06f99bbbfc06d) - Dev-server proxies /api and WS request to backend. [183981](https://github.com/KevinMidboe/vinlottis/commit/1839810e66c9407a713b5803b8448a5f3a9c8f62)
Adrianht (Migrated from github.com) reviewed 2020-12-04 20:03:38 +00:00
kasperrt (Migrated from github.com) reviewed 2020-12-04 20:03:38 +00:00
KevinMidboe commented 2021-01-02 12:55:01 +00:00 (Migrated from github.com)

Closes #66

Closes #66
Sign in to join this conversation.
No description provided.