This topic began on 18th October 2020, a few days after I first started thinking about how to build a decentralised alternative for github on the Safe Network.
It has progressed rapily, from some outline ideas on implementation, and discussions to help envisage a “Safe-git” UI. Within two months the essential concept was proven and now has the beginnings of a demonstration product that looks the part.
We’re now moving from the early vision preserved below, to planning to build a usable product. Everyone is welcome to contribute ideas, feedback suggestions and messages of encouragement.
Please read on if you would like to get more involved, contribute general points here or open an issue on the github repo for specific issues or more detailed discussions: happyborg/p2p-git-portal-poc
A no-server no-backend (ideally in Rust) with web frontend, e.g. using Svelte.
- operate directly on repositories in peer-to-peer storage
- clone, upload, fetch/push between p2p storage, local device and remotes (some by CLI)
- extensions (Issues, PRs etc.) supported without interfering with repository commits
Windows, MacOS and Linux
- Static HTML Web UI and “git extra” CLI for viewing, creating, editing etc of Issues
- Cross platform Desktop GUI (e.g. using Tauri)
What an amazing few weeks. In this update we move from concept pretty much proven to having a brand new look, courtesy of new contributor @Miguelo.
We have proven the essentials of a statically hosted (no-server no-backend) peer-to-peer alternative to github. A Git Portal including features like github issues for bug tracking, discussion etc.
This has been achieved surprisingly quickly - I began discussion on this on 18th October 2020, so its taken slightly over two months to get here. To achieve this we used as much existing code as we could find, notably the excellent Go libraries
Some of this will be replaced, but I envisage continuing to use the
git-bug CLI and file format alongside Git Portal as a p2p web UI. We have a good relationship with the author of
git-bug and it would be great to continue and build on that, supporting his work to improve and extend its features, with Pull Requests for example.
Now for details of the latest update.
Git Portal got a new look!
Here it is, a working proof-of-concept for a decentralised alternative to GitHub running from static storage, and later Safe Network (or any static hosting or p2p storage such as Solid or IPFS etc). It isn’t feature complete yet so you can’t create and edit issues in the UI, but you can see one’s which have been created automatically for “New” repositories on the Issues tab.
@Miguelo is busy with Christmas so has asked me to do the announcement, but the credit for this fantastic UI is his. In a very short time he’s transformed the look and operation of the UI into something that really looks the part as well as demonstrating the key features needed. To get this look he used Tailwind CSS building on the Svelte framework with Go/Wasm backend, plus his own customisations.
Can you see which repository he’s cloned for display, and a who gets mentioned in the Commits tab! Nice touch
Thank you @Nigel for your vocal support and for providing the Safe Git logo which appears at the top left.
Anyone can try the demo out by visiting http://gitch.happybeing.com/. Be patient for the first time loading takes a little while (you may need to refresh if you’ve visited this link before). Once the red message goes away you are set.
Create Repository: To start, enter a repository name under “Create repository” and click “Create” to make the new repository. This is instant, and let’s you browse the files in the .git directory, or view the commits (none yet) or Issues (a few are created automatically).
Clone Repository: To clone from github you need to use a proxy as described in the README. If you just want to do a quick test, click on the gear icon and enter the following proxy URL: https://cors.isomorphic-git.org/. That’s handy for testing but not for regular use. Then click “Clone” and wait while it fetches the data. For large repositories this can take quite a while, so one has been entered for you to try, which should complete in under a minute.
Upload Repository: You can choose a repository directory to upload, but be aware this will fail for large repositories at the moment. It works for repositories up to about 2,000 files, but fails if they have 10,000 (including all the commits etc in
.git). Again, uploading can take a while so be patient!
If you think something went wrong or just want to see what’s going on under the hood, open the browser console (Ctrl-Shift-I in Firefox or Chrome/Chromium). Any issues, please report here or on happyborg/github.
18th March 2021: I’ve paused my work on Git Portal and am considering whether I want to continue alone on such a large project, or on code at all.
With perfect timing MaidSafe have announced substantial funding is available to third party developers. So if you have relevant skills and might want to contribute or even take the lead over time, let’s talk.
This a chance contribute to something you want to happen by either using what you know or learning something new. We’ll help you get going or with learning as you go.
There are many features not implemented, but I’ve shown that they should be possible, though there are limitations to the approach.
The main difficulty is the size of the bundle with a 12MB Go runtime, the current demo is 16MB which is a lot for a web app. I’m looking into different ways of around this for the web, and it will be possible to bundle this into a desktop app using Tauri.
- get compiling to web assembly
- make into a package
- modify to use go-billy filesystem for git and git-bug operations
- integrate into the git portal
- add a simple file viewer
- get help with UI styles and UX / API design
- NEW: provide UI for creating and editing issues
- NEW: refine UX closer to the github experience
- NEW: evaluate product implementation options