I'm trying to create a program similar to PLEX as a side project on my own and am having a little bit of a problem trying to create a game plan for the whole thing. Im only focusing on using a web browser as the client for accessing the home server to keep things a little more simple, since I'm the only one working on the project. I'm doing this because want to learn a little bit about web architecture. Anyways So far I'm using java as the main language for the server which uses one thread as an rtsp server and another thread to allow for the user to input directories, edit some settings for the server (e.g port number, directories used for the different media files and functions for adding and deleting those directories), and scan the directories to add each individual file to a database. However im getting a little lost on how I would link the java server to a database and combine all of these elements to make a web application that communicates with all these different elements. I was thinking about using angularJS and mySQl as some of the other technologies for this project but i just don't know how to go about structuring it all. Can anyone give any suggestions or lead me to the right place? Here is a link to the github project that I have on it that contains the code I have so far for the java server. Idk if im going about this thing right at all.