Code Monkey home page Code Monkey logo

artspirationfe's People

Contributors

alexklick avatar deebot10 avatar jasonpknoll avatar jtpiland avatar kabcouwer avatar marlitas avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

daveypdev

artspirationfe's Issues

API Consumption

As an authenticated user,

  • when I visit the dashboard page I see a 'random - curated' image.
  • Image is pulled from Artsy API (with image ID that is stored in database)
  • Image is selected randomly from matching categories of previous user likes.
  • categories determined by Cloud Vision API (labels & image properties endpoints).
  • Image properties maxResults = 1
  • labels maxResults = 5
  • categories saved to BE database and tied to image ID (confirm with schema builders)
  • categories user likes saved to BE database and tied to user ID (confirm with schema builders)
  • (use pagination for Artsy <size=1>)

Dashboard Page (already logged in user)

As a logged in user, when I visit the '/dashboard' I see:

  • my 5 most recent 'liked' pieces of art
  • A link to my liked art index page
  • Recommended art for the day (1-5?)
  • Each art links to its art show page
  • If recommended art is liked/disliked
  • liked path => art moves to liked art
  • disliked path => art is removed from recommended art

JSON Responses:

  • User:
    :data => {:id=> {user_id},
    :type=> 'user',
    :attrs=>{:email, :name}}

  • Recommended Art:
    [0..n] times:
    {:data =>{:id=> {art_id},
    :type=> '"recommended_art',
    :attributes=> {
    title: 'title',
    artist: 'artist',
    artist_url: 'artist_url'
    image_url: 'image_url'
    liked: nil or 'unrated'?
    user_id: 'user_id' }}

  • Liked Rated Art:
    [0..n_user_likes] times:
    {:data =>[ {:id=> {art_id},
    :type=> 'liked_rated_art',
    :attributes=> {
    title: 'title',
    artist: 'artist',
    artist_url: 'artist_url'
    image_url: 'image_url'
    liked: 'true' (or 'false') or nil?
    user_id: 'user_id' }}

User's Image Index Page

As an authenticated user,
when I visit the user's image index page ('/user/images' path) or ('/dashboard/images')
I should see:

  • Links to all of the images in my 'Favorite Images' folder
    When I click this link , it either 1. redirects me to that images show page or 2. enlarges the image on the same page.

  • A link that takes me back to my dashboard
    When I click this link, I am redirected to the ('/user') or ('/dashboard')

  • A link to the artist page from Artsy
    When I click this link, I am redirected to...('artsy.net/artist/')

  • A link to log out
    When I click this link, I am logged out of my account and redirected back to the home page '/'

Logout Funtion

As a user, when logged in I can logout at any time which:

  • redirects me to the home page where I am prompted to log back in
  • disallows me from visiting other paths without logging in
  • Located in Navbar

User Home Page

As a user, when I visit the home page,

  • I can login to my account with Google Oauth, and get redirected to my user dashboard
  • If login is unsuccessful I receive flash error: "Login Not Successful. Please try again."

User Registration

As a user, when I visit the home page

  • I can register a new account through Google Oauth
  • If there is already an account with that email, flash error "Account already exists with that email."
  • If registration works, I am loggin in as a new user and directed to my users dashboard
  • I should not have any liked art yet
  • Recommended Art is random (we have no data on this user yet)

Artists of the Month

As a user, when I visit the home page,

  • I see the featured artist of the month.
  • I see a link to that artist's artsy page

Clicking the link will redirect me to that artist's artsy page. artsy.net/artist/

Authorization

  • Track logged in user through sessions.
  • Only allow logged in user to visit their own dashboard.

Art Show Page

As a user, when I visit ('/users/arts/:id') or ('/dashboard/arts/:id'), I see

  • That artwork
  • Options to like, dislike (or do neither) for the work of art.
  • if already liked or disliked, show which button has been chosen
  • Link to the artists page (Artsy artists show page)

JSON Formats:

  • Requests:

Rated_art
get '/api/v1/users/:id/rated_art/:art_id

  • Response:

Rated_Art
:data =>{:id=> {art_id},
:type=> '"rated_art',
:attributes=> {
title: 'title',
artist: 'artist',
artist_url: 'artist_url'
image_url: 'image_url'
liked: 'true' (or 'false') or nil?
user_id: 'user_id' }

Art Show Page - Update liked boolean

As a user, when I visit ('/users/arts/:id') or ('/dashboard/arts/:id'):

  • I can click options to like or dislike art
  • I can go back and forth between options

JSON Formats:

Requests:

-Rated_art
update '/api/v1/users/:id/rated_art/:art_id

Response:

  • Rated Art
    :data =>{:id=> {art_id},
    :type=> '"rated_art',
    :attributes=> {
    title: 'title',
    artist: 'artist',
    artist_url: 'artist_url'
    image_url: 'image_url'
    liked: 'true' (or 'false') or nil?
    user_id: 'user_id' }

User Login

As a user, when I login, I am redirected to the '/dashboard' I see:

  • Welcome 'users email'
  • Everything else that is mentioned in the dashboard story of already logged in user

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.