You did inspire me to look and see if there were any good open source LMS starter packs you could use.
Did find this https://github.com/instructure/canvas-lms/wiki
Its free to learn from and use as a test case. Not a bad thing to look at if you're going to try and make your own
K