MineLease
A Git-based Minecraft server management application for conflict-free collaborative gaming.

The Challenge
A group of friends and I wanted to use a shared Minecraft server, but file synchronization (e.g., with Google Drive) was unreliable and often led to data loss or conflicts when multiple people wanted to play at the same time.
My Solution
I created an Electron and React-based desktop application that treats the server files as a Git repository. The system is based on a 'leasing' logic: a player 'checks out' the server, which locks it for others using a lock file. After playing, the changes (the new state of the world) are uploaded as a new 'commit', and the server becomes available again. This model provides full version control and data security.
Tech Stack
- Electron: Allowed me to create a cross-platform desktop application with web technologies (React, Node.js) that can access the file system and run command-line operations (Git).
- React: Provided a modern and responsive user interface for the application.
- Git: The core of the system. Git efficiently handles changes to large files and provides a complete version history, which is the foundation of the project.
- keytar: Securely stores the user's GitHub token in the operating system's keychain.
Technical Deep-Dive
The heart of the system is the atomic handling of the `lock` and `unlock` processes. When a user wants to start the server, the application first modifies and uploads only the `.mclease_lock` file to the Git repository. This is an extremely fast operation that immediately 'reserves' the server. The local Minecraft server only starts after a successful 'lock'. At the end of the game, the process is reversed: the world is saved, the lock file is updated, and the two are uploaded together in a single commit, guaranteeing a consistent state.