Skip to content

A social media app where users can create posts, add comments, and accept and/or request friendships.

Notifications You must be signed in to change notification settings

EricMbouwe/Stay-in-touch

 
 

Repository files navigation

Stay in touch app with Ruby on Rails

This milestone 5 presents the Friendships functionality for a social media application.

Contributors Forks Stargazers Issues


Microverse Logo

Stay In Touch Application

This project is part of the Microverse curriculum in Ruby On Rails course!
Explore the docs »

View Demo Report Bug Request Feature

Stay in touch allows users to create posts and invite other users for friendship.
Invited user can accept or reject invitations.
Logged in users can see and comment posts created by their selves or by their friends.


Application Screen Shots

Log In

program interface


Users List

program interface


User show

program interface


Timeline

program interface


Table of Contents

About The Project

The project creates a database which holds 5 tables:

- Users : Is the table containing the users' data  
  - Fields :  
    - string:   name  
    - datetime: created_at  
    - datetime: update_at  

- Posts : is the table containing the posts' data  
  - Fields:  
    - text:     content  
    - integer:  user_id  
    - datetime: created_at  
    - datetime: update_at  

- Comments : Is the table that contains the comments created about posts  
  - Fields  
    - text:     content  
    - integer:  post_id  
    - integer:  user_id  
    - datetime: created_at  
    - datetime: update_at  

- Friendships : Is the table that connects users for a friendship  
  - Fields  
    - integer: user_id  
    - integer: friend_id  
    - integer: status  
  * The user_id is the id of the user who invites the user with friend_id as an id  
  * The status field denotes  
    -  0 initially for pending  
    -  1 for an acceptance by the friend_id user  
    - -1 for a rejection by the friend_id user  

- Likes : Is the table that contains the users' likes on the Posts  
  - Fields  
    - integer: post_id  
    - integer: user_id  

Live version

You can see it working Heroku

Application Instructions

  • New users must sign up and give a name, an email and a password
  • Using their email and password they can log in
  • A logged in user can create posts and invite other users for friendship
  • Invitations can be accepted or rejected by the user who is invited
  • In the User Index (All Users), all users are shown together with their friendship invitation status
    • If some one has invited the current user then an Accept and a Reject buttons are shown next to that user's name
    • If the current user has invited someone else for friendship then a Pending label is shown until they accept or reject the invitation
    • If the current user is a friend then a Friend label is shown
    • If the current user's invitation has been rejected then a User Rejected label is shown
    • If the current user has rejected an invitation then a Rejected label is shown
  • The User show view shows the posts that the user has added together with
    • a list of their frends
    • a list of pending invitations to other users
    • a list of pending invitations from other users
    • A friendship status or acceptance-rejection buttons are shown at the top-right corner
  • The Timeline shows Posts created by the user or their friends and the user can add comments to the posts and check the post they like!

System Requierments

  • Ruby
  • Rails
  • Yarn
  • RSpec

Dependencies

  • rspec-rails gem
  • capybara gem
  • selenium-webdriver gem
  • chromedriver-helper gem

Configuration

  • first, clone the project Run
  git clone https://github.com/ericmbouwe/Stay-in-touch.git
  • Install the necessary dependancies Run
  bundle install
  rails generate rspec:install
  yarn install

Development

  • Clone the project
  https://github.com/ericmbouwe/Stay-in-touch.git

Testing

  • Tests have been included using RSpec for controllers, views and models
  • Location /spec/
  • 5 test files
    • comments_spec.rb
    • friendships_spec.rb
    • menu_spec.rb
    • posts_spec.rb
    • users_spec.rb

Controller test files implement the views tests as well.


Built With

This project was built using these technologies.

  • Ruby version 2.6
  • Ruby On Rails version 6.0
  • rspec
  • capybara

Contributors

👤 Author_1

Eric Mbouwe

👤 Author_2

Ioannis Kousis


Acknowledgements

About

A social media app where users can create posts, add comments, and accept and/or request friendships.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 73.0%
  • HTML 18.8%
  • CSS 7.0%
  • JavaScript 1.2%