A simple Facebook web app.
Fakebook is a simple Facebook web app, made using the methodology of The Oding Project. This project asks us to make a fake Facebook app and you can click here to see the project requirements.
After each milestone the project will be reviewed and approved by a TSE from Microverse.
- Ruby
- Ruby on Rails Framework
- HTML
- CSS
- Lucid Chart - For building the ERB which you can see here
This project was created by:
-
António Fernandes Github | Twitter | LinkedIn | Email | Portfolio
-
Carlos Del Real Github Account https://github.com/carloshdelreal
The live version of this project is on Fakebook by Carlos and António.
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 Installation Guide
Once you have installed the required 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 functionality 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!
All the source code in the The Odin Project is available jointly under the MIT License and the Beerware License.
- 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 user password, 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.
- 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.