git ssb

2+

VictorBjelkholm (lasoa) / metabutt



Tree:
📄.gitignore
📄README.md
📄dev.cljs.edn
📄figwheel-main.edn
📁imgs
📄package-lock.json
📄project.clj
📁resources
📁src
📄test.cljs.edn
📁test
📄webpack.config.js
README.md

MetaButt

imgs/main.png

Introduction

Application editor for SSB content, written on top of SSB. Basically a notebook sort of application, where queries and UI are data stored in SSB.

Used for exploring messages in SSB and prototyping UIs

Authentication

Unsure how to handle this right now. See %CE27BmJ...

So current solution is to put your keys in src/metabutt/core.cljs:33, fill out the values there, and now it'll work.

Future: if user is not setup already, file input for selecting ~/.ssb/secret
and input fields for filling out multiserver-address and shs key.

Features

Nested Queries

Warning: this is not actually implemented, just thinking around this currently.

Would require:

Use case:

Demonstration

img/output.gif

Misc

Application editor for SSB content, written on top of SSB

Phases:

Exploration:

Save your viewer:

Write your own content producer

Join together applications

;; A view type
;; a view is a type that can help you see things in scuttlebutt like you
;; havent seen them before

;; A view contains clojure code that is used to do queries and UI in each
;; others clients. Invitation for someone to change your experience.
;; Let's see where this goes.

;; maybe just like notebooks over scuttlebutt
;; inspired by
;; visualization from %EDfBE6r4HcaKJBTwcpes4nyOWFkYRdmifFl3Dy89SK4=.sha256

;; uses just the latest version for each view, based on which authors
;; you follow

;; notebooks vs views? Notebooks could be used as views but not vice-versa

;; should build a general version that is basically a repl that lives
;; with you. Time to bring in the clojurescript compiler into the browser...

;; or maybe functionator?

;; (def demo-ui
;;   "[:div
;;     [:pre (with-out-str (cljs.pprint/pprint (first result)]")

Basically, start with listing all messages, of all types.

Then have a editor that can write a query and a UI, then show the output of them two.

Implement listing all messages with this.

Give option to create that view if you don't already have it.

{:limit 1000
 :query
  [{:$filter {:value {:content {:type {:$is :string}}}}}
   {:$reduce {:type [:value :content :type]
              :count {:$count true}
              :timestamp {:$max [:value :timestamp]}}}
   {:$sort [[:count] [:timestamp]]}]}

[:div (-> result cljs.pprint/pprint with-out-str]

  "$filter": {
    value: {
      content: {channel: "solarpunk"}
    }
  }


[:div
 (map (fn [msg]
        [:div
         {:style {:margin 30}}
         (-> msg :value :content :text)])
      result)]

 {:reverse true
  :limit 10
  :query [{:$filter {:value {:content {:type "post"
                                       :channel "solarpunk"}}}}]}

License

2020 MIT - Victor Bjelkholm

Built with git-ssb-web