Readit is a community forum for sharing your ideas.
It's difficult to find a space to share your ideas.
A community forum where users can post, like, and comment your ideas.
- As a user, I want to be able to share my thoughts, so that other users can read it.
- As a user, I want to be able to comment on other posts, so that I can share my reaction.
- As a user, I want to be able to comment on other comments, so that we can spark more discussion.
- As a user, I want to be able to schedule my posts, so that they can be shared in the future.
- As a user, I want to be able to like posts, so that I can save posts I like.
- As a user, I want to be able to like comments, so that I can promote good comments
- As a company, I want to be able to advertise on posts, so that I can makret my product
- As a user, I want to be able to follow other users, so that I can stay up to date on their posts
- As a user, I want to be able to flag posts as offensive, so that we can maintain harmony.
- As a user, I want to have some engagement metrics, so that I can quantify my usage.
- As a user, I want to have a username, so that I don't have to share my email
# - id
# - created_at
# - updated_at
# - email
# - password
# - username
class User
has_many :posts
has_many :comments
has_many :likes
end
# - id
# - created_at
# - updated_at
# - title
# - body
# - author_id
# - published_at
# - likes_count
# - comments_count
class Post
belongs_to :author, class_name: "User"
has_many :comments
has_many :likes
end
# - id
# - created_at
# - updated_at
# - commentable_id
# - commentable_type
# - body
# - author_id
class Comment
belongs_to :author, class_name: "User"
has_many :comments
belongs_to :commentable, polymorphic: true
end
# - id
# - created_at
# - updated_at
# - likeable_id
# - likeable_type
# - user_id
class Likes
belongs_to :user
belongs_to :likeable, polymorphic: true
end