Skip to content

Instantly share code, notes, and snippets.

@heratyian
Created July 17, 2024 18:48
Show Gist options
  • Save heratyian/7ad30b31ce2818c4fcaf39fabf7ca154 to your computer and use it in GitHub Desktop.
Save heratyian/7ad30b31ce2818c4fcaf39fabf7ca154 to your computer and use it in GitHub Desktop.
Readit Functional Specification

Readit Functional Specification

Readit is a community forum for sharing your ideas.

Pain Points

It's difficult to find a space to share your ideas.

Proposed Solution

A community forum where users can post, like, and comment your ideas.

User Stories

MVP

  • 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

Reach Goal

  • 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

Domain Model

# - 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment