Skip to content

A full-stack application on Ruby on Rails which is a based on a custom redesign of Twitter.

Notifications You must be signed in to change notification settings

RaminMammadzada/rails-twitter-redesign

Repository files navigation

Microverse > Ruby on Rails Capstone > Twitter Redesign

Project specification

In the project, I built a full-stack application on Ruby on Rails which is a based on a redesign of Twitter. I followed the given design of the website, but personalized the content and introduced voting to the tweets ( or opinions ).

homepace screenshot Homepage

homepace screenshot Userpage

MVP version of the app

I followed a user journey to build the following MVP version of the app:

  1. The user logs in to the app, only by typing the username (a proper authenticated login is not a requirement).

  2. The user is presented with the homepage (see the Homepage screenshot above) that includes:

    1. Left-side menu (includes only links to pages that are implemented).
    2. Tweets tab in the centre (skip Photos and Videos for this MVP).
    3. Right-side section with *Who to follow (*skip Trending for this MVP).
  3. The Tweets section includes:

    1. Simple form for creating a tweet.
    2. List of all tweets (sorted by most recent) that display tweet text and author details.
  4. The Who to follow section includes:

    1. List of profiles that are not followed by the logged-in user (ordered by most recently added).
  5. When the user opens the profile page (see the Userpage screenshot above), they can see:

    1. Left-side menu (includes only links to pages that are implemented).
    2. Cover picture and Tweets tab in the centre (skipped other tabs and Tweet to user form).
    3. Right-side section with Profile detailed info.
  6. The Profile detailed info section includes:

    1. User photo.
    2. Button to follow a user.
    3. Stats: total number of tweets, number of followers and number of following users.
    4. List of people who follow this user.
  7. At the end extend the MVP app with one simple voting feature is created.

  8. Eager loading is implemented in the controllers to avoid n+1 queries problem.

Technical mandatory requirements of the project:

  1. The project is a desktop web app.

  2. The database schema reflects the following structure:

    homepace screenshot

  3. It validates all user input to make sure that anyone with bad intentions cannot compromise the app.

  4. It uses Postgres as database.

  5. It uses .erb view template engine.

  6. It is an MVP of the full product (with the full graphical design but only basic features that can be easily extended in the future).

  7. The project is deployed and accessible online.

Live Demo

Video presentation

https://www.loom.com/share/5aa5cb27022f492bb791996455297b5a

Getting Started

Prerequisites

  • Ruby v2.7.0p0
  • Rails v6.0.3.4
  • Node v13.7.0
  • npm v6.13.6
  • Postgres v12.4

If you have difficulty to change the version of the prerequested apps, you can check the notes below.

  • Note 1: You can change your Ruby version by using rvm.

  • Note 2: You can change your Rails version by following this article rvm.

  • Note 3: You can change your Node version by using nvm.

  • Paperclip

    • It is intended as an easy file attachment library for ActiveRecord. You can check the installation instructions from its repository here.
    • The intent behind it was to keep setup as easy as possible and to treat files as much like other attributes as possible. This means they aren't saved to their final locations on disk, nor are they deleted if set to nil, until ActiveRecord::Base#save is called. It manages validations based on size and presence, if required. It can transform its assigned image into thumbnails if needed, and the prerequisites are as simple as installing ImageMagick (which, for most modern Unix-based systems, is as easy as installing the right packages). Attached files are saved to the filesystem and referenced in the browser by an easily understandable specification, which has sensible and useful defaults. You can learn how to install ImageMagick from the Paperclip repository as well.

Installation and Setup

  • In order to run, you need to install RUBY and Rails in your computer. For windows you can go to Ruby installer and for MAC and LINUX you can go to Ruby official site for intructions on how to intall it.

  • To get a local copy up and running, follow these simple example steps.

    • Clone the project by typing https://github.com/RaminMammadzada/rails-twitter-redesign/
    • Redirect to the root of the project by typing cd rails-twitter-redesign
    • Go to the test_and_deploy branch by typing git checkout test_and_deploy
    • bundle update
    • bundle install
  • Setup database with:

   rails db:create
   rails db:migrate

Usage

Start server with:

    rails server

Open http://localhost:3000/ in your browser.

Run tests

    rpsec --format documentation

Authors

👤 Ramin Mammadzada

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

📝 License

This project is MIT licensed.

About

A full-stack application on Ruby on Rails which is a based on a custom redesign of Twitter.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published