/chitter-challenge

Build a Twitter Clone!

Primary LanguageRuby

🐥 Chitter

Makers Academy Bootcamp | Week 4 Weekend Challenge

The requirement for this end of week challenge was to build a small Twitter clone that allows the users to post messages to a public stream.

User Stories

IMPLEMENTED

As a user
I want to post a message (peep) to chitter
So that I can let people know what I am doing  

As a user
I want to see the time at which it was made
So that I can better appreciate the context of a peep

As a user
I want to see all peeps in reverse chronological order
So that I can see what others are saying  

As a user
I want to sign up for Chitter
So that I can post messages on Chitter as me

As a user
I want to log in to Chitter
So that only I can post messages on Chitter as me

As a user
I want to log out of Chitter
So that I can avoid others posting messages on Chitter as me

Edge cases also covered: 
- user can't sign up if already in session
- user can't log in if already logged in
- user can't log in without the correct password
- user can't signup/log in without correct format and values for username, email and password
- error messages display using flash for a better UX
- passwords are encrypted with Bcrypt
- user can only add peep if logged in
- add peeps page is not accessible unless a user is in session


Notes

  • Project set up following the ruby web project setup list
  • TDD with 100% test coverage
  • Built using Ruby, HTML, CSS, Bootstrap, RSpec, Capybara, Sinatra
  • Ruby Style Guide

Want to have a look?

  • clone this repo
  • navigate to chitter-challenge directory
  • run bundle to ensure all gems available
  • run rspec to check test coverage
  • to set up the database :
> connect to `psql`
> create the `chitter` database: CREATE DATABASE chitter;
> create the `chitter_test` database: CREATE DATABASE chitter_test;
> To set up the appropriate tables, connect to the database in `psql` and run the SQL scripts in the `db/migrations` folder in the given order.
  • to run the Chitter app:
rackup

Test Coverage

TestCoverage

Rubocop - no offenses

image

Screenshots of the application

Welcome page Welcome Page

Peeps page - no user logged in Peeps Page no login

Create account page create account page

Log in page Log in

Peep page - user logged in peep page with user logged in

Create a peep page create peep