Safenetwork Git Portal Discussion

Screenshot that :slight_smile: Just as you should any long late at night early morning post I make with no typo’s :slight_smile:

5 Likes

He was definitely right about GitHub search sucking though. You can’t even look for a “quoted phrase”. Imagine you could do something like ‘go to definition’ or ‘find usages’ like in an IDE :open_mouth:. That’d be amazing.

3 Likes

Yes, many times I’ve cursed github search. Seems a big missed opportunity for a centralised service. Harder for us, but given the low bar, not a bad thing!

1 Like

I get a sense that there’s energy here, and am hopeful we can ride this and build something very useful.

Wouldn’t it be awesome if in five years Safe was the main FOSS development hub and github left behind.

Here’s to 2025, other things willing!

7 Likes

And there’s git-bug:

  • is fully embedded in git : you only need your git repository to have a bug tracker
  • is distributed : use your normal git remote to collaborate, push and pull your bugs!
  • works offline : in a plane or under the sea? Keep reading and writing bugs!
  • prevents vendor lock-in : your usual service is down or went bad? You already have a full backup.
  • is fast : listing bugs or opening them is a matter of milliseconds
  • doesn’t pollute your project : no files are added in your project
  • integrates with your tooling : use the UI you like (CLI, terminal, web) or integrate with your existing tools through the CLI or the GraphQL API
  • bridges to other bug trackers : use bridges to import and export to other trackers.

This is now more than a proof of concept, but still not fully stable. Expect dragons and unfinished business.

Written in go rather than Rust, but otherwise lots to like, and still active!

3 Likes

git-bug initial notes in case anyone wants to dip in, see the next reply for reports of early experiments, including importing issues from a github repo.


  • git-bug- Distributed, offline-first bug tracker embedded in git, with bridges @Golang (github) active October 2020

git-bug README (20/10/20):
git-bug is a bug tracker that:

  • is fully embedded in git: you only need your git repository to have a bug tracker
  • is distributed: use your normal git remote to collaborate, push and pull your bugs!
  • works offline: in a plane or under the sea? Keep reading and writing bugs!
  • prevents vendor lock-in: your usual service is down or went bad? You already have a full backup.
  • is fast: listing bugs or opening them is a matter of milliseconds
  • doesn’t pollute your project: no files are added in your project
  • integrates with your tooling: use the UI you like (CLI, terminal, web) or integrate with your existing tools through the CLI or the GraphQL API
  • bridges to other bug trackers: use bridges to import and export to other trackers.

Warning: This is now more than a proof of concept, but still not fully stable. Expect dragons and unfinished business.

Notes

Started 2018, GPLv3, excellent features set (see above).
Early but functional code.
Active:
28 contributers on the README
Gitter channel last activity July 2020 (gitter)
Active development as of October 2020
A handful of small $ backers, including SIT
Bridges to import/export for Github, Gitlab & Jira
UI:

  • CLI example: git bug add
    CLI completion for bash, zsh, PowerShell and man pages (all auto generated)
  • terminal UI: provides a dashboard style GUI
  • web UI (Typescript/React/GraphQL) is bundled into a Golang binary
    The description in the main README suggests this is intended for use with a remote, ie not for local use but more like a portal (see workflows), but reading the architecture documentation I see that everything is bundled in a single binary, and the web UI talks to the same internal backend, as everything else. So even if intended for use with a remote, I don’t see why the web UI can’t operate locally.
    WIP but looks nice, launch with git bug webui (example)
    Build info in Web UI README
    This web UI is entirely packed inside the same Golang binary and serve static content through a localhost http server.
    The web UI interact with the backend through a GraphQL API. The schema is available here.

Documentation:

Implementation:
The architecture documentation is clear and suggests disciplined design thinking ahead. More feature complexity that I might expect, which might signify experience in this kind of development or a degree of over engineering. Either way, it looks easy to delve into if needed.

The data model is equally clear and sits alongside the git data structures, designed to work in the same way as git without polluting your application commits. Merging of issues appears well thought out, and looks to me like a CRDT (ie based on a sequence of operations with order assured by a lamport clock) even though “CRDT” is not present in the repo.

Initial Impressions
What’s not to like? It looks as if it can deliver the bug tracking side of Safe-git (github replacement) with relatively little work. It should be possible to extend this (e.g. to handle PRs) although this may require a deep understanding of both git internals (which it follows) and the core of git-bug. So hard for me, but it would be a natural extension of git-bug so may well be added to the project goals at some point.

If I’m correct, building on git-bug would save an awful lot of work. The only downers for me are that it is not Rust, not Svelte and doesn’t use Tauri. Functionally non-of those are necessary, they are just what I would prefer to be working with.

Learning Golang sounds easier than Rust, and I’m open to that. I can leave Tauri aside until something needs it.

Learning GraphQL would be handy and while it won’t hurt to learn some React, it will take some persuading me away from Svelte.

Update

By running git-bug in the browser, it may be possible to host a github like portal as a Safe web app, which along with the git-bug and git command lines gives us a complete alternative to github which I’m sure others will want to use and extend.

I had a good chat with author of git-bug to understand his project and see how we might assist each other, and have already had two offers of help from the Mastodon community. There’s a lot of interest in a github alternative there, along with decentralisation and open source, so all this is very encouraging.

git-bug is written in Golang, so I’m investigating use of Golang → wasm in the browser, and how to shoehorn git-bug into a safe:// URI.

P2P git Portal Web App - Architecture

You know I like pictures:

2 Likes

If anyone wants to play with git-bug with me let me know. We can fork a repo on github, then try importing it, messing with the issues and merging our changes.

Basic CLI experience helpful, but I’ll be happy to assist anyone learning and suggest things to do. Until we have a Safe testnet you will need a github account though.

Progress with git-bug
Looking good so far. Easy install, all the basics seem to work. I created an issue using the interactive CLI, and then imported >600 issues from a fork of an existing github repository.
Very impressive so far.

3 Likes

@Maidsafe To aid my thinking and research about ways to make a Safe-git(hub)…

  • What are the chances of a POSIX like fs API in the browser (e.g. sitting on the tree-crdt or other fs like Safe storage)? Something like node fs would be ideal.

I like the look of git-bug and am wondering if I can get it running in the browser (e.g. compiled to wasm) alongside something like isomorphic-git which is a full implementation of git that works in the browser if you can supply an node fs compatible filesystem.

This might be pie in the sky, but if those two elements can work in the browser we have the core of a static web app on Safe that can look very much like a basic github:

  • a user profile
  • list of repos
  • repo browsing of code, commits, issues etc
  • creating issues and adding comments, labels etc

All this compatible with the equivalent git and git-bug management of local and forked repos, pushed/pulled to/from remotes just as with github.

BTW: I’ve had an offer of help if the Safe-git(hub) web app uses Svelte :thinking:

I am not sure, perhaps @danda can have some insight. wrt wasm though, the guys are sick hearing me bang on about it :slight_smile: I hope to use wasm/wasi as our FFI layer. It’s why I am dead keen on no_std and use musl where we can and keep far away from c or other language dependencies. Rust → wasm is a great fit and rust has done amazing thigs there.

3 Likes

In short, I don’t see any fundamental reason why that couldn’t happen, but we’ve got to first prove the networked fs. Once it is shown to be solid, browser support would seem a logical further step.

6 Likes

That’s as much as I could hope for, thanks @danda and David. I shall look further into this approach.

A bonus here is that I think it might be possible to combine this approach with the webui being built into git-bug already, to some extent at least.

4 Likes

Update - Current Status

By running git-bug in the browser, it may be possible to host a github like portal as a Safe web app, which along with the git-bug and git command lines gives us a complete alternative to github which I’m sure others will want to use and extend.

I had a good chat with author of git-bug to understand his project and see how we might assist each other, and have already had two offers of help from the Mastodon community. There’s a lot of interest in a github alternative there, along with decentralisation and open source, so all this is very encouraging.

git-bug is written in Golang, so currently I’m investigating use of Golang → wasm in the browser, and how to shoehorn git-bug into a safe:// URI.

git Portal Web App - Architecture

You know I like pictures:

8 Likes

I feel anything → wasm works. Go is garbage collected so has more of a runtime (larger wasm binaries) but it’s jot a showstopper these days really. I am excited by wasm/wasi as it offers cross-language possibilities.

3 Likes

LATEST: I finished updating the webpack Go wasm plugin for Golang v1.13 and added a Svelte example.

Next is to use this to get go-git working in the browser as a static website which can be deployed on #p2p storage.

9 Likes

Update - Current Status

The goal is a github like portal which can be hosted on p2p or static storage, initially targetting Safe Network. So initially a Safe Network in-browser app using git-bug and git.go libraries (rather than CLI envisaged initially) to create a realistic alternative to github. Ability to use git-bug to add support for issues (and later pull requests) to a git repo without polluting your commit history.

I’ve been chatting with the author of git-bug to understand his project and see how we might assist each other, and have had two offers of help from the Mastodon community. There’s a lot of interest in a github alternative there, along with decentralisation and open source, so all this is very encouraging.

Currently building a proof-of-concept:

  • Svelte UI
  • backend with git.go / wasm in the browser
  • create and access git repo on a BrowserFS file-system

You can follow the proof-of-concept here:

For more see this post (above) and the posts which follow it:

Safenetwork Git Portal Discussion - #24 by happybeing

11 Likes

Anyone fancy working on the HTML/CSS styling? See here.

2 Likes

I would, but the result would be a dogs dinner that even the hungriest dog would turn his nose up at, so replying to bump the thread. Must be some front-end design types on here surely?

3 Likes

Couple of beers in after a long day, so probably me, but I can’t see how to build p2p-git-portal-poc to see what it looks like now. Any tips?

2 Likes

There’s nothing git like to see yet, in fact at the moment the code is a copy of the template repo below. That is a simple Svelte front end with Go backend, compiled to Wasm and all running in the browser.

So if you are keen to see the first part of getting this working, you can follow the instructions there although I’ve just realised they are incomplete because to build you will need to install Golang v1.13 (which is in the Ubuntu repos).

Happy to help if you want to have a go.

2 Likes

Sounds like a ‘bad first issue while drunk’ :wink: . I’ll have a go at the weekend.

4 Likes