musicblocks
musicblocks copied to clipboard
Git-based Backend
Problem
Currently, Musicblock's planet has a basic forking system. In order to better serve the purpose of Musicblocks and its Planet, a Git-based planet (wherein users could commit, open/clone projects, merge, fork, and create PRs) would be a useful feature.
Idea: Node-based planet rewrite
- Architecture:
- NodeJS with a MongoDB backend
- Use actual git repos for every project (in a subdirectory) using NodeGit -- git repos would be modified ProjectData JSON to allow better merging, no change to core Musicblocks code
- Pros:
- Language Parity: all the Musicblocks code, including server, will be in JS, rather than JS and PHP
- Scalable and maintainable: everything can be modularized pretty well and will last as long as we have disk space to support
- Mongo's document-based database works perfectly with the amount of data that's going to be generated specific to each project
- Cons:
- Not much
Implementation
- Rewrite:
- Create HTML mockups of all the changes (proposed changes here)
- Rewrite non-changed Planet features in NodeJS (such as downloading/uploading projects, searching, tags, etc)
- Implement New Features:
- Anonymous user IDs and groups
- Implement (backend + frontend) project commits
- Forking other projects
- Branching your own project
- Merging branches/projects
- Continue rewrite: moderation features
- Mod Login + current moderation features
- More detailed features too: remove branches and do other actions on behalf of the user
- Cleanup
- Documentation (i.e. setting up server, general architecture, etc.). Code documentation would be written as we go along :)
- Docker image(?)
My UX idea can be found here, but open to comments :)
I believe there was some work toward this as a GSoC (2018? 2019?) project. I recommend you review that work.
@perriefidelis Can you look at this from the UX POV?
I dropped some comments on the google docs
I'm not entirely sold on using git. Diffing between two JSON files, and storing those diffs in a database, can be performed trivially without git, and also without the large overhead that comes from creating an entire new git repository per project. I really like the idea of being able to track changes and branch new projects off others, but I'm not sure if git is the correct tool for the job.