memoetapp / memoet

A self-hosted spaced repetition software
GNU Affero General Public License v3.0
96 stars 12 forks source link

Various improvements #33

Closed axelson closed 3 years ago

axelson commented 3 years ago

Hi there! :wave:

Thanks for creating and open-sourcing memoet! It is pretty neat and I'm a huge fan of SRS (I use Anki as a daily practice). I was poking around in Memoet and saw a few things that seemed like they could be improved so I rolled them up in a PR. Please let me know if you'd prefer them broken up into multiple PR's or have any questions about the changes.

Remove :cachex from :extra_applications (dependencies automatically get started and don't need to be added to this list)

Fix Postgres default port (https://www.postgresql.org/docs/10/app-postgres.html)

Change package.json to be a valid SPDX license. Fixes this warning during npm install:

npm WARN assets license should be a valid SPDX license expression

List of valid SPDX licenses: https://spdx.org/licenses/

The other option for an AGPL SPDX license is: AGPL-3.0-or-later

Note: I didn't update package-lock.json because I ended up with a 50+ line change after running npm install (and would've caused likely merge conflicts)

Fix excess recompilation dependencies in Router:

router.ex compilation dependencies before (via https://depviz.jasonaxelson.com) was recompiled when 61 other files were changed: Screenshot 2021-06-05 08 56 30

After this change router.ex is recompiled only when 5 other files are changed: Screenshot 2021-06-05 08 58 54

I believe it is possible to remove the compile-time dependency on api_auth_error_handler.ex as well but I have not removed it for now.

manhtai commented 3 years ago

Really nice! Thanks for the PR!