Jetbrains Plugin - Notification that the file has already been edited by other developers and further edits could result in a merge conflict
Jetbrains Plugin - Notification that the change is noted in the collaboration layer - Other developer will be informed when editing the file
Backend - Flask-based rest backend for database management of the live collaboration layer
Frontend - Web application for browsing through the live collaboration database in React
Beside working alone on a project or copy and paste snippets from different team members, today there exist two forms of collaboration for developers: a VCS like GIT and a live collaboration similar to Google Docs.
None of them are perfect: Live collaboration tools increase the difficulty to work on a stable, testable and executable code basis due to the permanent edits of users. A VCS distincts between the different code bases of developers, however, merging the different versions is a real point of pain. We believe that this can be improved through a combined approach, leveraging both of their advantages.
What it does
Normally changes of the code basis only get distributed through commits and pushes in VCS. However, our system adds a live collaboration layer above GIT. This means that even when files are changed locally without committing, our cloud-based database notes the changes by the users. If other developers with the same commit in the repository want to edit one of those files, they get a notification that this specific file have already been changed by another team member locally. This allows developers an improved coordination of their work, which is helpful for small and large repository or developer teams. It avoids duplicate work efforts and improves communication among the team - and most importantly, reduces the number of merge conflicts in a project.
How we built it
On the server-side, we created a python-based backend with Flask and SQL hostet on Heroku. It is the single source of truth for the so-called live changes (edits that are not yet commited in the VCS). The system is able to track multiple repositories with all the included commits and files for large-scaled projects.
In order to access these information, we created a browser-based frontend in React and moreover, also developed a client-side plugin for the Jetbrains IDE in Java. This plugin integrates into the developer's workflow and gives him real-time notification while he is editing potentially conflicting files. With the activated plugin and connection to the GIT information, developers can completely avoid merge conflicts.
Challenges we ran into
The main challenge was the limited documentation of the Jetbrain plugin development. It took a while to understand the important interfaces and provided APIs in order to listen on file changes and send notification within the Jetbrains environment. A further pitfall was the interaction of the different programs and services (micro-architecture) and the code-split between our team members.
Accomplishments that we're proud of
The project is based on multiple individual components which have to interact with each other. We were particular proud when all those components successfully worked together. It enabled us to use our own product during our development process to avoid merge conflicts and people working on the same files or tasks.
What we learned
The importance of documentation: The case of Jetbrains plugin development documentation reminded us about the importance of well-documented interfaces, libraries and tutorials in the area of IT. A good documentation is a real timesaver when working with libraries and toolkits from other developers.
How to split the workload: Especially during the beginning of the Hackathon it took us a while to get comfortable with the GIT workflow and code-splitting. This was one reason why we decided to approach the challenge of improved developer collaboration - we were affected by it ourselves.
What's next for Merge in Peace
Currently, Merge in Peace works on a file-base, which means that in case of a file change, the complete file is noted as changed in our collaboration database. However, with an improved GIT integration, we can use this information in feature for individual functions. This means developers get only notification when both changed the same functions, but not when they are just changing different parts of the same file. The second point usually does not affect each other and will not trigger a merge conflict. A further step is the improvement of the Jetbrains integration with a better UI, Code-highlighting of affected code snippets and improved configuration settings.