Peer-Share is a distributed peer to peer holochain application (hApp) that enables peers to shared their contents with others. This content can be shared either completely free of charge or with a paid subscription by using some centralized or distributed payment methods.
Basically this project is an experimental hApp to learn and challenge holochain technology and then design and test some practices and architectures during the Holochain-in-Action meetings.
Holochain-in-Action is a weekly virtual meetings for:
on Holochain technology and also Holoport echosystem.
If you would like to participate in the Holochain-in-Action meetings please fill out this application form. here
nix-shell
(It takes a lot of time for the first time.)npm i
npm test
https://www.youtube.com/playlist?list=PL2hOZGg8QnUDiTkJF2CD2Fu1D9F6KbsmB
Holo layer:
Outlet layer: (MVC pattern)
External Layer
[Public Entry][Edit(N),Delete(N)]
struct Schema {
definition:JSON, // JSON Schema: https://json-schema.org/
version:String
owner_address:AgentPubKey, // progenitor pattern, this is developer agent address
}
Validation Rules: 1- definition, version, owner_address are required. 2- owner_address should be progenitor pattern 3- json schema should be valid.
Peer-Share Example:
Schema will be created by Admin User.
```json=
Schema {
name: "Channel",
definition:{
[field:title, type:string,lenght:50, required:yes],
[field:category, type:int, required:yes],
[field:createdat, type:datetime, required:yes],
[field:description, type:string, lenght:4000, required:no],
},
version:"v1",
owner_address:"asdf234sfsewr#$2"
}
Schema {
name: "Tag",
definition:{
[field:name, type:string(25), required:yes]
},
version:"v1",
owner_address:"asdf234sfsewr#$2"
}
[Public Entry][Edit(N),Delete(Y)]
struct Public_Content {
content:String, // JSON data in JsonSchema standard format
schema:Address, // Hash address of JsonSchema
owner: AgentPubKey, // user address
}
Validation Rules: 1- ower address is valid 2- validate content based on the referenced schema using schema format.
Example:
```json=
Public_Content { // Channel is public entry in DHT
content:{
title:"Holochain in Action",
category:1
createdat:"01-01-2021 12:30",
description:"empty"
},
schema:"HNsj6tQ51s1SPrCBkedbNf0Tp0GbM",
owner:"o23KMBAuJGSYnRmoBZM3lMfTKevIkA"
}
[Private Entry][Edit(Y),Delete(Y)]
struct Private_Content{
content:String, // JSON data in JsonSchema standard format
schema:Address, // Hash address of JsonSchema
owner: AgentPubKey, // user address
}
Validation Rules: 1- ower address is valid 2- validate content based on the referenced schema using schema format.
Example:
```json=
Private_Content { // Draft-Channel is private entry in source-chain
content:{
title:"Holochain in Action",
category:1
createdat:"01-01-2021 12:30",
description:"empty"
},
schema:"HNsj6tQ51s1SPrCBkedbNf0Tp0GbM",
owner:"o23KMBAuJGSYnRmoBZM3lMfTKevIkA"
}
Outlet layer(MVC Pattern)