Coder Social home page Coder Social logo

upvote_ui's Introduction

UpVote

6D9CCA08-9791-48E2-B487-4BAA0358D2AB Click to open the UpVote app hosted on Heroku Click here to open the related Back-End API supporting this Front-End

Build Status

Table of Contents

About the project

UpVote is an interactive Rails web application built from conception to completion that authenticates with a third-party service (GitHub), consumes the Upsplash API, and provides a solution to an identified problem.

Purpose

Object Oriented Programing principles, Restful Routing, Test Driven Development, Behavior Driven Development, Authenticated API calls, OAuth process

Welcome Page Demo

upvote2

Installation

  1. Clone down this and the micro-service repo into a directory of your choice
  $ git clone https://github.com/jobannon/upvote_ui
  $ git clone https://github.com/jobannon/upvote_api
  1. Change into the following directory
  $ cd upvote_ui
  1. Install the gem packages
  $ bundle install
  1. Change into the other directory
  $ cd upvote_api
  1. Install the gem packages
  $ bundle install
  1. Set up the database
  $ rake db:{create,migrate,seed}
  1. Launch your local server
  $ rails s
  1. In a separate terminal tab, run the upvote_ui
  $ cd upvote_ui
  $ puma
  1. Finally, visit http://localhost:9292 in your web browser

Requirements

Environment variables and required API keys/tokens:

  • GitHub client_id defined as ENV['GITHUB_KEY']
  • GitHub client_secret defined as ENV['GITHUB_SECRET']

Versions

  • Ruby 2.6.3
  • Rails 6.0.2

Related Repositories

Database

image

Architecture

image

Testing

Testing Technologies

Running Tests

Run the full test suite:

$ bundle exec rspec

Run a single test file:

$ bundle exec rspec <path-to-file>

Roadmap

Contact

Acknowledgements

upvote_ui's People

Contributors

freeheeling avatar hale4029 avatar jobannon avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

freeheeling

upvote_ui's Issues

User can log in

User Can Authenticate

As a visitor
When I visit the home page for Upvote
Then I see a link to log in with GitHub
When I click the link
Then I am taken to 'the dashboard' where I see all current projects/ideas
and I am an authenticated user

Splash Page splash

User Can Log Out

As an authenticated user,
on any page,
in the navbar
I see a link to logout
when I click on this link,
I am logged out of the Upvote application
and a flash message indicates that I have successfully logged out
and I am redirected to the splash login screen.

nav_bar to log out nav bar

Redirected Splash Page splash

Voting statistics

As a registered user,
When I visit the cohort dashboard,
I see a section showing:

  • top three ideas (absolute and percentage)
  • percent of users voted (absolute and percentage)

Dashboard dashboard

Single vote per idea

As an authenticated user,
Once I vote for an idea,
I no longer have the functionality to vote for the same idea.
Number of total votes for all ideas is limited to 3

User Idea Card Update

As an authenticated user
When I visit the dashboard
And click one of my idea cards
I am then redirected to the idea's show page
Where I see all of the previously provided details for the idea,
Any field of which I have the option of editing
After making any changes
I click 'Update/Submit'
Then I should be redirected to the dashboard
And I should see a message that says "Your Idea Has Been Updated"
  • Sad path accounted for
  • API call to retrieve background image (if project title updated)

Idea CRUD Page idea CUD page

User Idea Card Creation

As an authenticated user
When I visit the dashboard
And click a link/button to add an idea card
I am then redirected to './ideas/new'
Where I see a form
And when I fill in project title (required)
And I fill in pitch (required)
And I fill in problem (required)
And I fill in solution (required)
And I fill in the audience (required)
And I fill in features (required)
And I fill in integration (required)
And I click submit
Then I should be redirected to the dashboard
And I should see a message that says "Your Idea Has Been Submitted"
And I should see my idea depicted as a card on the dashboard,
Containing the project title and a background image
  • Sad path accounted for (if the form is not filled in completely)
  • API call to retrieve background image
  • User–Ideas one-to-many relationship

Tasks

  • Create Idea table with columns: title, pitch, problem, solution, audience, features, integration, user_id (foreign key)
  • Create view
  • Create Idea model
  • Create Idea controller

Idea CRUD Page idea CUD page

Vote

As an authenticated user,
When I visit an Idea show page (app/cohort/:id/idea/:id),
I can upvote an app idea by clicking on a 'Vote' button

Idea Show Page idea show page

User Idea Card Deletion

As an authenticated user
When I visit the dashboard
And click one of my idea cards
I am then redirected to the idea's show page
Where I see a button to delete my idea,
And I click 'Delete'
Then I should be redirected to the dashboard
And I should see a message that says "Your Idea Has Been Deleted"
And I should no longer see my idea depicted as a card on the dashboard

Idea CRUD Page idea CUD page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.