Moo - A Twitter clone (mainly for shitposting) #81
Replies: 6 comments 19 replies
-
Database DesignTables1.
|
column | definition |
---|---|
id | uuid |
username | string(30) - only alphanumeric |
name | string (50) |
avatar | string (url) |
bio | text (240) |
follower_count | bigint |
following_count | bigint |
verified | boolean |
2. posts
column | definition |
---|---|
id | uuid |
text | string (240) chars |
author_id | uuid - foreignkey(user.id) |
images | array<string(url)> - max 4 |
like_count | bigint |
repost_count | bigint |
orig_post_id | uuid (self reference, can be null) |
reply_to_id | uuid (self reference, can be null) |
hashtags | array |
mentions | array<{name: string, id: uuid}> |
3. hashtags
column | definition |
---|---|
id | uuid |
tag | text (only a-z,0-9,_ chars) |
recent_post_count | bigint |
4. likes
column | definition |
---|---|
id | uuid |
post_id | uuid - foreign key (post.id) |
user_id | uuid - foreign key (user.id) |
5. hashtag_posts
column | definition |
---|---|
id | uuid |
hashtag_id | uuid - foreign key (hashtag.id) |
post_id | uuid - foreign key (post.id) |
6. user_followings
column | definition |
---|---|
id | uuid |
follower_id | uuid - foreign key (user.id) |
followee_id | uuid - foreign key (user.id) |
7. post_mentions
TBD
Beta Was this translation helpful? Give feedback.
-
API Design
|
query | definition |
---|---|
by | username |
reply_to | post uuid |
hashtag | tag |
GET /posts/{postid}
Get details of a post
{
"text": "....",
"like_count": 999,
"replies": [ // first 50
{
"text": "....",
"like_count": 999,
},
{
"text": "....",
"like_count": 999,
}
]
}
POST /posts
🔒
Create a new post
DELETE /posts/{postid}
🔒
Delete a given post id
PUT /posts/{postid}/like
🔒
Like the given post
DELETE /posts/{postid}/like
🔒
Un-like the given post
hashtags
GET /hashtags
📃
Top hashtags (default top 10)
GET /hashtags/{tag}/posts
📃
All posts of this given hashtag
Beta Was this translation helpful? Give feedback.
-
Anyone seeing this discussion, there is vote on our Discord server about which framework we will use for the backend. https://canary.discord.com/channels/780066247601291285/787377926722945035/854365075036045322 |
Beta Was this translation helpful? Give feedback.
-
how will manage to mention users in a post means how we can give suggestion |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I am looking for some good projects to contribute to this October. Was wondering if this project is participating in Hactoberfest or not. |
Beta Was this translation helpful? Give feedback.
-
hii , can i still contribute to this project ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Projects
Summary
A twitter-like social media site where anyone can post 240-character texts (future: images), and people can reply, like or reshare the posts.
Users can follow each other. The home feed shows posts from users that they follow.
Users will be notified when someone likes their posts, replies or reshares them and when someone follows them.
Users and posts can be searched.
Future Scope
Entities (in product terms)
1. Users
2. Posts
3. Notification
4. Hashtags
Beta Was this translation helpful? Give feedback.
All reactions