Visit The Site »
Download this repository
|
Report A Bug
|
Fork It
- The Project Brief
- The Nitty Gritty
- Tools & Technology Used
- Setup & Use
- Showcase
- Contributions, Issues and Forking
- Creator
- Show Your Support!
- Licensing
This is a project included in the Rails module to be completed by students of Microverse.
This project sees us tackle a larger, more complex and realistic task in creating a social media web app with all the functionality we've come to expect from social media websites - friendships, invites, posts, comments and likes.
As this project naturally has a larger remit than previous back-end centric projects that have come before, it is split up into 5 major milestones:
- Data Architecture & Planning
- Creation of friendship models & associations
- Improving efficiency of mutual friendship generation & handling
- Deployment to Heroku
- Final Touches & Styling
Posts, comments and likes had been handled for us in the project setup, thus the core challenges in this project were establishing an efficient friendship system whereby users could send invitations as well as receive invitations, all while maintaining a tidy database.
This enforced some ground rules as to how we should generated our models:
- Users would have to have friendships as well as inverse friendships (where they are the friend of another)
- Friendships would have to belong to users both as the creator of the friend request and also the receiver.
Subsequently, an additional medley of controller and helper functions would enable detection of friend request states and existence, enable creation and destruction of requests and allow for updating on friend request acceptance or decline.
Languages & Frameworks
- Ruby 2.7.1
- Ruby on Rails 6.0.3.1
- SASS/CSS3
Gems of note
Testing
Database
- PostgreSQL
Linters & Quality Control
Deployment
- Heroku
Setup should be fairly straightforward. You will have to ensure your machine is properly equipped to run the code first:
- Make sure you have both Ruby and Ruby on Rails (Mac • Linux • Windows) installed.
- Download this repository.
cd
into the root directory of wherever you download this repo. What does 'cd' mean?- Whilst at the root (home) directory of this project, enter
bundle install
to install the projects software dependencies. - In your terminal window, enter
rails server
to start the server. - Now navigate to
localhost:4000
in your browser to start playing around with the webpages!
Alternatively if you'd like to confirm the entire project is passing testing:
cd
into this repository in your terminal- Enter
bundle exec rspec
to run all tests
Signing In is facilitated with the Devise Gem and offers additional functionality like password recovery and signing up for a new account.
A closer look at the site-wide navbar and Facebook-style dynamically populated friend requests dropdown.
A closer look at the friend request dropdown - A notification ball displays when the user receives new friend requests and the list displays new requests. The user is given the option to accept or decline. Additionally, suggested (non-friended) users are listed below.
From the homepage the user can create new posts which are fed into the user and user's respective friends' timelines upon submission.
The post title relays a series of different messages to the user to engage and encourage the user to post more.
Users are able to easily create a basic thread beneath the post's main content and like or unlike a post.
Selecting 'Friend Requests' from the navbar takes the user to the Friendships page, where a full page view of new invites and suggested users can be seen.
Users can easily send friend requests from the list of suggested users. New pending friend requests appear at the top of the page.
Incoming friend requests will also appear at the top of the page, prior to 'Pending Requests'. Accepting will add the sender of the invitation to the users friends. Declining will delete the friendship (and friend request by extension).
As an alternative to the Friendship page, the User Index will display all users - friends, non-friends and pending requests.
The user profile displays the users own posts and offers familiar functionality such as commenting on and liking their posts.
The user profile also features 'Add Friend', 'Request Pending' and 'Friends' buttons.
Contributions, issues and feature requests are more than welcome!
If you have any problems running or setting this project up, please submit it as a bug on the issues page. right away!
If you want to make your own changes, modifications or improvements, go ahead and Fork it!
- Fork it
- Create your working branch (git checkout -b [choose-a-name])
- Commit your changes (git commit -am 'what this commit will fix/add/improve')
- Push to the branch (git push origin [chosen-name])
- Create a new Pull Request
Rory Hellier - Github
Give a ⭐️ if you like this project!
This project is MIT licensed.