MineGuardian-Backend banner

MineGuardian-Backend

7 devlogs
8h 23m 59s

This is the backend for MineGuardian-Frontend (duh), it will be a python program listening and providing api endpoints for the Frontend, which can be found at https://flavortown.hackclub.com/projects/910 but also an installer for Minecraft servers from official sources

SilentSword

So, I just did the api endpoints to stop and start a server. I uploaded the same video as for the frontend, because, again, that’s how you can see them in action!

0
SilentSword

Ok, so I tried to make the server use the WebSocket connection to send, in realtime, the output of the minecraft servers, but apparently, on windows, java sends the output slower when it detects that it is being run in a subprocess, and I tried to make it instant, but I couldn’t figure it out, so im gonna work on other features next such as basic turning on and off the server, etc… and ill focus on the console later.

0
SilentSword

Ok, so in those 2h, I have just made the api work with the frontend. I implemented WebSocket support, and that’s kinda it. I know, I know, even I think it’s too little for 2h of work, but you have to believe me, I am glad it didn’t take me 3h. Even though I wrote a little bit of code, the amount of debugging I had to do is ISNSANE. That doesn’t mean I don’t love programming anymore, it’s my favorite hobby, I was just telling you how things went. Also, you do want to read the devlog from the frontend, I have basically worked on both at the same time. But for now, it’s good night for me❤️
P.S: I uploaded the same video as for the fronted because that’s where you can see the api’s functionality.

0
SilentSword

Ok, im login only 44m, but I have actually worked a little bit more (close to 1h or 1.2h). The program now actually runs the servers in the background, and you can attach whenever to whatever server you want (in the video I only did it with one server because I’m lazy to download 2 minecraft servers). The best part (for me, and for you), it runs on any os!!! So excited to make an mvp and see your reaction on it. Now I think I want to see if there are any bugs or typos, and then I’ll make the API server work, or redesign it and make a simpler api, idk how or what I’ll see. Hope you are as excited as I am for this!!!

0
SilentSword

It has been some time. The running server part was very easy, but I wanted to make the server run in a subprocess and then be able to tap into the subprocess of any server whenever you would like. Finaly, after 30min or more, I gave up and let the features I already implemented stay. The features I implemented now are:

  1. Automatic acceptance of EULA (user must confirm tho)
  2. Automatic launch script creation (works on any os; windows, linux, macOS,… tested only on windows tho:( )
  3. Added a config file where the user can modify the startup script if they know what they are doing.

That’s all for today, I’ll see you tomorrow!

0
SilentSword

Added the feature to automatically download the Minecraft server. Took a while, but it can download any version of vanilla Minecraft servers (basically official, from Mojang, Minecraft’s owners). It will do it in a special directory for servers for easier management. Text thing I have to make the program actually install the server.

0
SilentSword

Created the project with python and made some basic cli interface using questionary. The program is able to start a flask API server and respond to Api calls, providing some test data

0