H.I.V.E. is a coding application designed by team .wasp that contains various coding questions for users and an admin interface for admins to add new questions to the database.
Members of team ".wasp": @halavurtberke, @balcibora, @joonullus, @esertt, @erkam3, @Gokdeniz-Derelioglu
In order to run the program properly, follow the steps below:
- First, make sure that you have Maven installed and properly working on your device: https://maven.apache.org/download.cgi.
- Navigate to the ServerLauncher.java class and fill the .env part in the following code (represented with "//here") with the path to your service key to the/your database (more info about the database below): "FileInputStream serviceAccount = new FileInputStream(//here)".
- Navigate to the GptApi.java class and set the .env part in the following code to your own OpenAI API key: "private String ApiKey = //here".
- Navigate to the CompilerApi.java class and fill in the .env in the following code to your own Online Code Compiler API key: super(//here, "online-code-compiler.p.rapidapi.com", "application/json").
- Navigate to the ServerLauncher.java class and run the main. The server should be connected and online after this.
- Navigate to the Main.java class and run the main. The program should run without issues now. Happy coding!
The project contains two user interface pages: one for the users who will solve questions and another for admins who will add questions. This allows the admins to have an easier experience when adding questions to the database.
JavaFX is used for the user interface. Additionally, SceneBuilder was used to create the scenes for admin and user interfaces, different question types, etc.
Firestore is used as the database for this project. The database is connected to the local server, which is launched separately. The account key for the database should be put to HIVEbywasp->server->demo->src->main->resources folder. The communication between the client and the server is done using URLs and Spring Boot which is launched by Maven.
Gson: library used to convert JSON files to strings and vice versaOpenAI API: used to get advanced feedback for write-the-code questionsOnline Code Compiler API by Glavier: used to compile the user answers for write-the-code questionsMaven: used to launch Spring Boot and add Firestore as a dependencySpring Boot: used to set the REST API to communicate with the clientFirestore Cloud: used as the databaseLombok: used for auto getters/setters in the server, as a Maven dependency
The workspace contains two folders by default, where:
src: the folder to maintain sourceslib: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the bin folder by default.
If you want to customize the folder structure, open
.vscode/settings.jsonand update the related settings there.
The JAVA PROJECTS view allows you to manage your dependencies. More details can be found here.