milkyklim / into-pieces

Fragile implementation of ghost bin on holochain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

into-pieces

"into pieces" is a holochain app where you can share text. Think of ghostbin which was taken down.

User stories

Any agent should be able to

  • create, update (essentially fork) and remove pastes.
  • query the list of created pastes.

Entry structure

Entry "paste" {
	struct Paste {
		title: String,
		text: String,
		language: String,
		timestamp: u64,
		expiration: u64,
		author_id: Address,
		reported: bool
  }
	Links: {
		agent_id -> paste, link_type: "author_paste"
	}
}
Entry "anchor" {
	struct Anchor {
		anchor_type: String,
		anchor_text: Option<String>
	}
}

Entry relationship diagram

graph TD
	subgraph Paste Zome
		subgraph Paste
		end
		subgraph agent_id
			alice_id
			bob_id
		end
		subgraph anchors
			author_pastes
		end
		author_pastes --> Paste
		alice_id -->|my_pastes| Paste
		bob_id -->|my_pastes| Paste
	end

Validation

Entries

  • paste: * title should be <= 50 chars;

    • text should be <= 1024 chars;
    • agent_address should match entry signer on create, update or delete entry.
  • anchors:

    • agent_address should match entry signer on create;
    • anchor update or delete is not valid.

About

Fragile implementation of ghost bin on holochain

License:GNU General Public License v3.0


Languages

Language:Rust 52.6%Language:JavaScript 39.6%Language:HTML 5.0%Language:Nix 2.0%Language:Shell 0.8%