marlitas / artspirationbe Goto Github PK
View Code? Open in Web Editor NEWThe backend portion of Artspiration
The backend portion of Artspiration
[ ] - Create user controller create method for loggin in user and creating new user
Post Request from FE:
{
"name": omniauth['info']['name'],
"email": omniauth['info']['email'],
"token": omniauth['credentials']['token']
}
[ ] - Creates new user in database OR finds user
[ ] - Email has uniqueness in user class validations
Expected JSON to send to FE:
{
:data => {:id=> {user_id},
:type=> 'user',
:attrs=>{:email, :name}
}
[ ] - Create RatedArt Model class method to return art where liked = true
[ ] - Create RatedArt Controller index method to render JSON of users liked art
Expected Response([0..n_user_likes] times):
{
:data =>[ {:id=> {art_id},
:type=> 'liked_rated_art',
:attrs=>{:art_attrs},
:user_id => {user_id}
}]
}
As a user, when I visit the home page,
Clicking the link will redirect me to that artist's artsy page. artsy.net/artist/
As an authenticated user,
when I visit the user's image index page ('/users/:id/favorites' path)
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 text field to enter keyword(s) to search for art/images
[ ] A link that takes me back to my dashboard
- When I click this link, I am redirected to the '/users/:id/dashboard path'
[ ] A link to explore
- When I click this link, I am redirected to....
[ ] A link to the artist page (found in wireframe)
- When I click this link, I am redirected to...
[ ] A link to log out
- When I click this link, I am logged out of my account and redirected back to the home page '/'
The images will be retrieved by consuming The Deviant Art API
As an authenticated user,
As a user, when I visit ('/users/images/:id') or ('/dashboard/images/:id'), I see
[ ] - Make Rated Art Controller create method when user rates a piece of art
Request from FE:
{
"user_id": {{user_id}},
"art_id": "{{art_id}}",
"liked": "{{true/false}}"
}
Expected Response from BE to FE:
{:data => {status: 200/400}}
As a user, when I visit the home 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 '/'
As a user, when logged in I can logout at any time which:
[ ] - Create user controller show method
FE get request:
{
"user_id": {{user_id}}
}
BE expected JSON response:
{
:data => {:id=> {user_id},
:type=> 'user',
:attrs=>{:email, :name}}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.