Game Browser project setup
Previously we discussed the project idea and its requirements. You can read about these in the first part of this article series here: Let's build a website.
This time we’ll take a look at how we will set up our backend project.
We’ll basically have two separate projects: the backend, and the frontend. These can be developed separately, since there is an API between them. As long as both, backend and frontend, implement the same API, they will work together. Of course it is easier to develop them together, because then we can immediately see if we need to make any changes to the API.
But this time we will focus on the backend. Note that the articles are written so that development happens on Windows 11. The examples should work on a Linux or Mac machine as well, but there will be Windows specific instructions, such as setting path settings.
Let’s install the tools we need to start building the backend:
Install Java Development Kit (JDK) 17 or newer
Install IntelliJ Idea Community Edition (or Ultimate if you have access to it)
Project setup in IntelliJ IDEA
We’ll have the following kind of folder structure for the backend:
Create the same kind of structure for your project, and then open it in IntelliJ. Once you’ve opened it, we need to make sure we’ve got the correct JDK for the project. Press thee Three lines menu and then look at Project structure - Project - SDK. IntelliJ should have recognized your installed Java version. Select your installed JDK, and press OK.
The other thing we should check is Maven settings. Press the Three lines menu again, and go to Build, Execution, Deployment - Build Tools - Maven. Check Maven home path on the right side of the window. We can use the bundled Maven, or we could use a separately installed Maven if we want to. Leave it to Bundled (Maven 3) for now.
It is a good idea to have Maven available from command line as well, so add the Bundled Maven to path. My IntelliJ version is 2023.2.2, so my path to Maven is: