musicblocks icon indicating copy to clipboard operation
musicblocks copied to clipboard

Git-based Backend

Open samyok opened this issue 5 years ago • 4 comments

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

  1. 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)
  2. Implement New Features:
    • Anonymous user IDs and groups
    • Implement (backend + frontend) project commits
    • Forking other projects
    • Branching your own project
    • Merging branches/projects
  3. Continue rewrite: moderation features
    • Mod Login + current moderation features
    • More detailed features too: remove branches and do other actions on behalf of the user
  4. 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 :)

samyok avatar Dec 15 '19 17:12 samyok

I believe there was some work toward this as a GSoC (2018? 2019?) project. I recommend you review that work.

pikurasa avatar Dec 15 '19 21:12 pikurasa

@perriefidelis Can you look at this from the UX POV?

walterbender avatar Dec 16 '19 13:12 walterbender

I dropped some comments on the google docs

perriefidelis avatar Dec 16 '19 14:12 perriefidelis

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.

Bottersnike avatar Dec 24 '19 19:12 Bottersnike