# Reddit happ clone
---
## Functional requirements
- Communities should be able to create shared spaces in which they share stories and react to them
- One dimensional upvote/downvote is replaced with a multicoloured "signaling" mechanism, in which anyone can create a new kind of "signal" (say, "original" or "accurate" or "funny") and then score posts with that signal.
>Every user can create "signaling_profiles", by which they weight the existing signals. Then, they browse subreddits with those scores applied to their queries, so that they see the content that is more interesting to them.
- Membership should be flexible. For purposes of this exercise, we'll focus only on **invitation only spaces**. Possible membranes include:
- Public shared spaces which everyone can join
- Invitation only spaces: useful for work-like environments
- Social triangulation spaces: useful for friend circles
- Geographical location: useful for local communities
## DHT architecture and zome breakdown
> Follow the links to get to actual design
There is going to be one DHT per each community that wants to create its own private space. Every DHT will include:
- **None or only one** of these membrane zomes:
- social_triangulation
- [membership_by_invitation](https://hackmd.io/nU6nJD34Rv2Zu8aGz-YW5Q?both)
- geographical_location
> This zome will define which members can enter the DHT. There are different ways in which agents can be invited from other public DHTs (a social-graph DNA, or geographical location public systems), so we are not going to design a necessary public DHT from which to pull people in, but this could be included as well.
- **All of these** zomes (links lead to design of each zome):
- [subreddits](https://hackmd.io/Q_9WENGTTJi4uK3ES89TKA)
- [posts](https://hackmd.io/e_iu6DX8TNK6CrbuuDFxZg)
- discussions (very similar to posts, but with reply_to property and links from the replied comment to the replying comment)
- [tags](https://hackmd.io/sVY82QrjSAmaEb1MPPtD3g)
- signaling (signals are just tags with a score in the link tag)
- profile (bridge to Identity Manager): don't store any data in the app, only setup a profile to bridge to Personas&Profiles
Zome dependency graph:
```mermaid
graph TD
subreddits-->posts
tags
signaling-->tags
discussions
profile
```
> The design of this zomes assumes that holochain supports features that currently does not support, but in the future will:
> 1) Linking from/to any entry without statically knowing the entry_type for the link
> 2) DHT conflict resolution callback
>
>This way, the design is much simpler. If someone wants to code this app right now, to fix 1) you can use "proxy" entries that contain only the address of another entry, from/to which attach the generic links. 2) AFAIK there is no way to replicate this functionality, so for now, we can't do much.