Skip to content

The Fakebook Web Application is a Ruby on Rails Project that implements many of the Facebook Social Network, we have a list of users to which we can send friend requests, we as registered users receive friend requests, we are able to login with user name and password, update the profile, with a profile photo, create posts with images, create com…

Notifications You must be signed in to change notification settings

carloshdelreal/Fakebook

 
 

Repository files navigation

FakeBook

A simple Facebook web app.

Fakebook is a simple facebook web app, made using the methodology of The Odin Project. This project ask us to make a facebook clone. You can click here to see the project requirements.

After each milestone the project will be reviewed and approved by a TSE from Microverse.

Tools used

In this project we used:

  • Ruby
  • Ruby on Rails Framework
  • Html
  • CSS
  • Lucid Chart - For building the ERB wich you can see here*

Author

This project was created by:

The Web App

The live version of this project is on Fakebook by Carlos and António

Required Installations

If you want a copy of this project running on your machine you have to install:

  • Ruby 2.6
  • gem 3.0
  • Bundler 1.17
  • Rails 6.0.0

For installation instructions follow The Instalation Guide

Instalation of This App

Once you have installed the requiered packages shown on the Required Installations, proceed with the following steps

Clone the Repository, the folder toy_app will be downloaded

your@pc:~$ git clone https://github.com/trox115/Fakebook.git

Move to the downloaded folder

your@pc:~$ cd Fakebook

install gems

your@pc:~$ bundle install --without production

migrate the database

your@pc:~$ rails db:create
your@pc:~$ rails db:migrate

Finally, run the test suite to verify that everything is working correctly:

your@pc:~$ rspec

If the test suite passes, you'll be ready to run the app in a local server:

If you desire to create dummy data to see the apps functionallity run

your@pc:~$ rails db:seed

To enable the facebook login system you have to provide two environment variables with the keys to do that you have to

your@pc:~$ export FACEBOOK_ID=heregoesyourfacebookappid
your@pc:~$ export FACEBOOK_KEY=heregoesyourfacebookappkey

lastly run the server

your@pc:~$ rails server

Then, go to http://localhost:3000/

Voila!

License

All the source code in the The Odin Project is available jointly under the MIT License and the Beerware License.

Final Project Checklist

  • Use Postgresql for your database from the beginning (not sqlite3), that way your deployment to Heroku will go much more smoothly. See the Heroku Docs for setup info.
  • Users must sign in to see anything except the sign in page.
  • User sign-in should use the Devise gem. Devise gives you all sorts of helpful methods so you no longer have to write your own user passwords, sessions, and #current_user methods. See the Railscast (which uses Rails 3) for a step-by-step introduction. The docs will be fully current.
  • Users can send Friend Requests to other Users.
  • A User must accept the Friend Request to become friends.
  • The Friend Request shows up in the notifications section of a User’s navbar.
  • Users can create Posts (text only to start).
  • Users can Like Posts.
  • Users can Comment on Posts.
  • Posts should always display with the post content, author, comments and likes.
  • Treat the Posts Index page like the real Facebook’s “Timeline” feature – show all the recent posts from the current user and users she is friends with.
  • Users can create a Profile with a Photo (just start by using the Gravatar image like you did in the Rails Tutorial).
  • The User Show page contains their Profile information, photo, and Posts.
  • The Users Index page lists all users and buttons for sending Friend Requests to those who are not already friends or who don’t already have a pending request.
  • Sign in should use Omniauth to allow a user to sign in with their real Facebook account. See the RailsCast on FB authentication with Devise for a step-by-step look at how it works.
  • Set up a mailer to send a welcome email when a new user signs up. Use the letter_opener gem (see docs here) to test it in development mode.
  • Deploy your App to Heroku.
  • Set up the SendGrid add-on and start sending real emails. It’s free for low usage tiers.

Extra Credit

  • Make posts also allow images (either just via a URL or, more complicated, by uploading one).
  • Use the Active Storage to allow users to upload a photo to their profile.
  • Make your post able to be either a text OR a photo by using a polymorphic association (so users can still like or comment on it while being none-the-wiser).
  • Style it up nicely! We’ll dive into HTML/CSS in the next course.

Fakebook Features

One of the main features of this web application is the login system, it was implemented using devise and it allows the user to login with your username and password.

If you haven't registered yet so you can use [email protected] as username and foobar as password

And you will be prompted to the home page, off course you can logout whenever you want

In the application you can browse through your profile that shows your username and profile photo (you can update it!) and the posts that you have created.

You can go to the friends page that shows all of your friends, your friend's requests and pending friends (the one's that are crazy to be your friends).

Then you can create a post and add it an image

Last but not least you can comment and like your friend's posts

About

The Fakebook Web Application is a Ruby on Rails Project that implements many of the Facebook Social Network, we have a list of users to which we can send friend requests, we as registered users receive friend requests, we are able to login with user name and password, update the profile, with a profile photo, create posts with images, create com…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.8%
  • Ruby 4.0%
  • Other 1.2%