This milestone 5 presents the Friendships functionality for a social media 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.
- About the Project
- Live Version
- Application Instructions
- System Requierments
- Dependencies
- Configuration
- Development
- Testing
- Built With
- Contributors
- Acknowledgements
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
- 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!
- Ruby
- Rails
- Yarn
- RSpec
- rspec-rails gem
- capybara gem
- selenium-webdriver gem
- chromedriver-helper gem
- 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
- Clone the project
https://github.com/ericmbouwe/Stay-in-touch.git
- 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
This project was built using these technologies.
- Ruby version 2.6
- Ruby On Rails version 6.0
- rspec
- capybara
👤 Author_1
- Github: @ericmbouwe
- Twitter: @ericmbouwe
- Linkedin: Eric Mbouwe
- E-mail: ericmbouwe@gmail.com
👤 Author_2
- Github: @ioanniskousis
- Twitter: @ioanniskousis
- Linkedin: Ioannis Kousis
- E-mail: jgkousis@gmail.com