diff --git a/.glitch-assets b/.glitch-assets
new file mode 100644
index 0000000..e69de29
diff --git a/README.md b/README.md
deleted file mode 100644
index 83abc62..0000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# ipfs-decisioning
\ No newline at end of file
diff --git a/app.js b/app.js
new file mode 100644
index 0000000..13683c8
--- /dev/null
+++ b/app.js
@@ -0,0 +1,170 @@
+const {comp, html, render} = hypersimple;
+
+const policy = [
+ { category: "Size and shape of data", questions: [
+ {text: "Super small amount ", color: "green"},
+ {text:"Their activity results in outcomes that align with our mission.", color: "green"},
+ {text:"Petabytes", color: "green"},
+ ]},
+ { category: "Privacy / Encryption", questions: [
+ {text: "Encrypted, can't be on public network", color: "green"},
+ {text: "Encrypted, can be on public network", color: "green"},
+ {text: "Totally public", color: "green"},
+ ]},
+ { category: "Availability", questions: [
+ {text: "Hot - online 24/7, five 9s of sub 500ms response time", color: "green"},
+ {text: "Warm - casual access is fine, can design around a wait, but needs to be online", color: "green"},
+ {text: "Cold - periodic retrieval within a few days of request", color: "green"},
+ ]},
+ { category: "Scale", questions: [
+ {text: "Just a few files between friends", color: "green"},
+ {text: "Thousands of users, at this point", color: "green"},
+ {text: "Designing for millions of simultaneous users", color: "green"},
+ ]},
+ { category: "Who's paying", questions: [
+ {text: "Design is that nobody is paying anything", color: "green"},
+ {text: "Our company will pay for the IPFS availability cost", color: "green"},
+ {text: "The users will pay for the IPFS availability cost of their data", color: "green"},
+ {text: "On-chain storage endowment pays pinning system via yield from one-time staked tokens", color: "green"},
+ ]},
+ { category: "Update frequency", questions: [
+ {text: "Data updates constantly", color: "yellow"},
+ {text: "Data updates now and then", color: "yellow"},
+ {text: "Data is written once, never again", color: "yellow"},
+ ]},
+ { category: "Deletions / Censorship", questions: [
+ {text: "All data must be immediately delete-able at all times", color: "yellow"},
+ {text: "Delete requests should be possible", color: "yellow"},
+ {text: "Data cannot be taken down ever, at the network level", color: "yellow"},
+ {text: "Data can be removed by publisher", color: "yellow"},
+ ]},
+ { category: "Misc", questions: [
+ {text: "Needs to sync data between users or nodes", color: "yellow"},
+ {text: "Publishing a website, also to HTTP", color: "yellow"},
+
+ ]},
+];
+
+const PolicyForm = comp(model => html`
+
+ ${model.policy.map(Category)}
+
+`);
+
+const Category = comp(model => html`
+
+
${model.category}
+
+ ${model.questions.map(Question)}
+
+
+`);
+
+const Question = comp(model => html`
+
+
+
+
+
+ ${model.text}
+
+
+`);
+
+const ReportMarkdown = comp(model => html`
+
+ ${model.policy
+ .filter(category => category.questions.some(q => q.checked))
+ .map(CategoryMarkdown)
+ }
+
+`);
+
+const CategoryMarkdown = comp(model => html`
+
+ **${model.category}**
+
+ ${model.questions.filter(q => q.checked).map(QuestionMarkdown)}
+
+
+`);
+
+const QuestionMarkdown = comp(model => {
+ let ijome = {green: '✅', yellow: '⚠️', red: '🚫'};
+ return html`
+ * ${ijome[model.color]} ${model.text}
+`});
+
+const Report = comp(model => html`
+ ${model.policy
+ .filter(category => category.questions.some(q => q.checked))
+ .map(CategoryReport)
+ }
+`);
+
+const CategoryReport = comp(model => html`
+
+
${model.category}
+
+ ${model.questions.filter(q => q.checked).map(QuestionReport)}
+
+
+`);
+
+const QuestionReport = comp(model => html`
+ ${model.text}
+`);
+
+// main app
+const App = comp(model => html`
+
+
+ IPFS Publishing Decisioning
+
+
+
+ You want to publish your files or data to IPFS?
+ Check the matching boxes below, and see your choices magically generated!
+
+
Legend:
+
+ ✅ - This is probably worth doing, and could be great.
+ ⚠️ - We should carefully consider the trade-offs.
+ 🚫 - This could be dangerous for the project and organization.
+
+
+
+ ${PolicyForm(model)}
+ ${ReportMarkdown(model)}
+
+
+
+`);
+
+// model: it will be mutated to trigger updates on changes
+let model = {
+ policy: policy,
+ checked: 0,
+ onCheck: function(e) {
+ model.policy.some(cat => {
+ let index = cat.questions.findIndex(el => el.text == e.detail.text);
+ if (index != -1) {
+ cat.questions[index].checked = e.detail.checked;
+ return true;
+ }
+ });
+ model.checked += e.detail.checked ? 1 : -1;
+ }
+};
+
+window.addEventListener('onCheck', model.onCheck);
+
+function emit(name, data) {
+ window.dispatchEvent(new CustomEvent(name, { detail: data }));
+}
+
+// render
+render(document.body, () => App(model));
diff --git a/hypersimple.min.js b/hypersimple.min.js
new file mode 100644
index 0000000..3e9809d
--- /dev/null
+++ b/hypersimple.min.js
@@ -0,0 +1,2 @@
+/*! (c) Andrea Giammarchi - ISC */
+var hypersimple=function(e){"use strict";var t={};try{t.WeakMap=WeakMap}catch(e){t.WeakMap=function(t,e){var n=e.defineProperty,r=e.hasOwnProperty,o=i.prototype;return o.delete=function(e){return this.has(e)&&delete e[this._]},o.get=function(e){return this.has(e)?e[this._]:void 0},o.has=function(e){return r.call(e,this._)},o.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},i;function i(e){n(this,"_",{value:"_@ungap/weakmap"+t++}),e&&e.forEach(a,this)}function a(e){this.set(e[0],e[1])}}(Math.random(),Object)}var u=t.WeakMap,n={};try{n.Map=Map}catch(e){n.Map=function(){var n=0,o=[],i=[];return{delete:function(e){var t=r(e);return t&&(o.splice(n,1),i.splice(n,1)),t},forEach:function(n,r){o.forEach(function(e,t){n.call(r,i[t],e,this)},this)},get:function(e){return r(e)?i[n]:void 0},has:function(e){return r(e)},set:function(e,t){return i[r(e)?n:o.push(e)-1]=t,this}};function r(e){return-1<(n=o.indexOf(e))}}}var a=n.Map,o={};try{o.WeakSet=WeakSet}catch(e){!function(e,t){var n=r.prototype;function r(){t(this,"_",{value:"_@ungap/weakmap"+e++})}n.add=function(e){return this.has(e)||t(e,this._,{value:!0,configurable:!0}),this},n.has=function(e){return this.hasOwnProperty.call(e,this._)},n.delete=function(e){return this.has(e)&&delete e[this._]},o.WeakSet=r}(Math.random(),Object.defineProperty)}var r=o.WeakSet,i={};try{i.Map=Map}catch(e){i.Map=function(){var n=0,o=[],i=[];return{delete:function(e){var t=r(e);return t&&(o.splice(n,1),i.splice(n,1)),t},forEach:function(n,r){o.forEach(function(e,t){n.call(r,i[t],e,this)},this)},get:function(e){return r(e)?i[n]:void 0},has:function(e){return r(e)},set:function(e,t){return i[r(e)?n:o.push(e)-1]=t,this}};function r(e){return-1<(n=o.indexOf(e))}}}function g(e,t,n,r,o,i){for(var a=("selectedIndex"in t),u=-1;ra;)--c;l=u+r-c;var g=Array(l),y=s[c];for(--n;y;){for(var b=y,w=b.newi,E=b.oldi;w>>0;n"+e+"",r=n.querySelectorAll(o)}else n.innerHTML=e,r=n.childNodes;return q(t,r),t},function(e,t){return("svg"===t?function(e){var t=z(S),n=z("div");return n.innerHTML=''+e+" ",q(t,n.firstChild.childNodes),t}:_)(e)});function q(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===S?j.createDocumentFragment():j.createElementNS("http://www.w3.org/1999/xhtml",e)}var I,Z,B,V,G,J,K,Q,U,X,Y=(I=document,Z="appendChild",B="cloneNode",V="createTextNode",J=(G="importNode")in I,(K=I.createDocumentFragment())[Z](I[V]("g")),K[Z](I[V]("")),(J?I[G](K,!0):K[B](!0)).childNodes.length<2?function e(t,n){for(var r=t[B](),o=t.childNodes||[],i=o.length,a=0;n&&a',Q[U].childNodes[0].getAttribute(X)==te)||(te="_dt: "+te.slice(1,-1)+";",!0)}catch(e){}var ne="\x3c!--"+te+"--\x3e",re=8,oe=1,ie=3,ae=/^(?:style|textarea)$/i,ue=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;var ce=" \\f\\n\\r\\t",le="[^"+ce+"\\/>\"'=]+",se="["+ce+"]+"+le,fe="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",he="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+le.replace("\\/","")+"))?)",de=new RegExp(fe+se+he+"+)(["+ce+"]*/?>)","g"),ve=new RegExp(fe+se+he+"*)(["+ce+"]*/>)","g"),pe=new RegExp("("+se+"\\s*=\\s*)(['\"]?)"+ne+"\\2","gi");function me(e,t,n,r){return"<"+t+n.replace(pe,ge)+r}function ge(e,t,n){return t+(n||'"')+te+(n||'"')}function ye(e,t,n){return ue.test(t)?e:"<"+t+n+">"+t+">"}var be={};try{be.Map=Map}catch(e){be.Map=function(){var n=0,o=[],i=[];return{delete:function(e){var t=r(e);return t&&(o.splice(n,1),i.splice(n,1)),t},forEach:function(n,r){o.forEach(function(e,t){n.call(r,i[t],e,this)},this)},get:function(e){return r(e)?i[n]:void 0},has:function(e){return r(e)},set:function(e,t){return i[r(e)?n:o.push(e)-1]=t,this}};function r(e){return-1<(n=o.indexOf(e))}}}var we=be.Map;function Ee(e,t){for(var n=t.length,r=0;r'"]/g,Ct=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,kt={"&":"&","<":"<",">":">","'":"'",'"':"""},Mt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'};function Ot(e){return kt[e]}function At(e){return Mt[e]}var jt=new u,St=new u,Tt=new u,_t=0,Pt=!0;function Lt(e){Pt&&Tt.get(e).forEach(Dt,e)}function Dt(e){return function(e,t,n,r){var o=bt.id,i=bt.model;bt.id=n,bt.model=e;try{return t.apply(null,r)}finally{bt.id=o,bt.model=i}}(this,e.Component,e.id,e.args)}return e.comp=function(r){var o=++_t;return jt.set(i,o),i;function i(e){var t=e||{},n=Tt.get(t)||function(e){var t=new a;return Tt.set(e,t),function(r,o){mt(r).forEach(function(e){var t,n=pt(r,e);n.configurable&&("value"in n?(t=Et(n.value,r),vt(r,e,{configurable:!0,enumerable:!0,get:function(){return t},set:function(e){t=Et(e,r),o(r)}})):"set"in n&&(t=n.set,n.set=function(e){t.call(r,e),o(r)},vt(r,e,n)))})}(e,Lt),t}(t);return Dt.call(t,n.get(i)||function(e,t,n,r,o){var i={Component:n,id:r,args:o};return e.set(t,i),i}(n,i,r,o,yt.call(arguments,0)))}},e.define=dt,e.escape=function(e){return Nt.call(e,xt,Ot)},e.html=function(){return ot(bt.model,"html:"+bt.id).apply(null,arguments)},e.render=function(e,t){var n=jt.has(t)?t(St.get(e)||function(e){var t={};return St.set(e,t),t}(e)):t(),r=1===n.nodeType;return r&&e.firstChild===n||!r&&n.childNodes.every(wt,e.childNodes)||(e.textContent="",e.appendChild(n.valueOf(!0))),e},e.svg=function(){return ot(bt.model,"svg:"+bt.id).apply(null,arguments)},e.unescape=function(e){return Nt.call(e,Ct,At)},e.update=function(e,t){var n=Tt.get(e);if(!n)throw new Error("unknown model");Pt=!1;try{!function e(t,n){for(var r in n)if(gt.call(n,r)){var o=gt.call(t,r),i=n[r],a=o?t[r]:null;o&&null!==i&&"object"==typeof i?e(a,i):o&&i===a||(t[r]=i)}}(e,t||{})}finally{Pt=!0,n.forEach(Dt,e)}},e}({});
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..92903ff
--- /dev/null
+++ b/index.html
@@ -0,0 +1,22 @@
+
+
+
+ IPFS Publishing Decisioning
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..1dc04d1
--- /dev/null
+++ b/style.css
@@ -0,0 +1,106 @@
+* {
+ box-sizing: border-box;
+}
+
+body {
+ font-family: "Benton Sans", "Helvetica Neue", helvetica, arial, sans-serif;
+ margin: 2em;
+}
+
+h1 {
+ color: #373fff;
+}
+
+h3 {
+ margin: 0.5rem;
+ margin-left: 0;
+}
+
+.bold {
+ font-weight: bold;
+}
+
+.container {
+ display: flex;
+ margin: 0;
+ padding: 0;
+}
+
+.form {
+ flex: 2 0%;
+ padding-top: 0;
+ columns: 3 18rem;
+}
+
+.report {
+ flex: 1 0%;
+ background-color: pink;
+ display: inline-block;
+ border-radius: 3px;
+ padding-top: 0.5rem;
+}
+
+.reportmarkdown {
+ flex: 1 0%;
+ background-color: pink;
+ display: inline-block;
+ border-radius: 3px;
+ padding: 0.5rem;
+}
+
+.category {
+ margin: 0.5rem;
+ margin-top: 0;
+ padding: 0.5rem;
+ background-color: cyan;
+ display: inline-block;
+ flex: 1;
+ border-radius: 3px;
+}
+
+.question {
+ display: flex;
+ margin-bottom: 0.5rem;
+}
+
+input {
+ margin-right: 0.5rem;
+}
+
+.reportcategory {
+ margin: 0.5rem;
+ margin-top: 0;
+ padding: 0.5rem;
+ background-color: cyan;
+ display: inline-block;
+ flex: 1;
+ border-radius: 3px;
+}
+
+.report ul {
+ margin: 0.2rem;
+ padding: 0;
+ list-style-type: none;
+}
+
+li {
+ margin-bottom: 0.2rem;
+}
+
+footer {
+ margin-top: 50px;
+ padding-top: 25px;
+ border-top: 1px solid lightgrey;
+}
+
+.green::before {
+ content: "✅ ";
+}
+
+.yellow::before {
+ content: "⚠️ ";
+}
+
+.red::before {
+ content: "🚫 ";
+}