Facebook clone created using Ruby On Rails. Live Demo
- Facialbook
- Table of Contents
- Motivation
- Minimum features:
- Installation
- Usage
- API
- Maintainers
- Contributing
- License
This project is our implementation of Facebook - the world's biggest social network.
We wanted to showcase our Ruby on Rails skills with this project. Soon, we intend to also incorporate React and NextJS to deal with the frontend (and server side rendering) while converting our backend to a simple API.
- User signup and signin (with Remember Me) and creation of Profile (with Profile picture uploading)
- Sending, Accepting, Cancelling and Deleting (Rejecting) Friend Requests
- Removing Friends
- Showing a user's friends and mutual friends with other users
- Newsfeed and Timeline
- Posting on the newsfeed, on one's own timeline and on a friend's timeline (allows image uploading)
- Editing and Deleting authored posts
- Commenting on posts or other comments
- Editing and deleting comments
- Liking and Unliking posts and comments
- Showing Like count
- Ruby version of at least 2.5.3
- Rails version of at least 5.2.3
- PostgreSQL version 9 above
After cloning:
In Gemfile
change ruby '2.6.3'
to correspond to your system's ruby version. For rbenv
users, run the command in the terminal: rbenv local <your system's ruby version>
.
Run bundle update
to install the latest version of the gems in the Gemfile
.
Run in the terminal:
EDITOR="<your default code editor> --wait" rails credentials:edit
This will fire up a `XYZ.credentials.yml file. In this file edit the following:
pg_credentials:
username: <your local postgreSQL username>
password: <corresponding password>
fb_api:
app_id: <your FB APP ID>
app_secret: <your FB APP SECRET>
Then save and close this file. It will generate a master.key
file.
Configure database by running rails db:setup
-> creates the development
and test
databases and seeds the application.
rails server
Then goto http:\\localhost:3000
Simply run
rspec
If using Heroku, make sure you have an existing heroku app for this or run:
heroku create <app name>
to create an app in Heroku and add heroku as a remote.
In Heroku app settings click on Reveal Config Vars then add the following fields (along with their values in your credentials):
FB_APP_ID
FB_APP_SECRET
RAILS_MASTER_KEY
Then in your local terminal run:
heroku run rails db:migrate && heroku run rails db:seed
Contact maintainers for contribution instructions.
Small note: If editing the README, please conform to the standard-readme specification.
ryto © 2019 Ryan and Dipto