About The Project • Tools Used • Set Up • Installation • How To Use • Database Schema • Contributing • Acknowledgements
The backend of Artspiration consumes the Artsy API and Google Cloud Vision API to power a recommendation engine that connects users with exciting artwork based on their preferences. We expose endpoints that package up this material for frontend consumption to display to our users as a web application.
- Using an Agile process throughout development
- Setting up continuous integration and continous deployment
- Using project management tool Github Project
- Demoing project ot project manager
- Building a backend API for frontend consumption
- Consuming endpoints and manipulating the JSON responses
- Handling large group dynamics with short 3 day sprints
- Working with Machine Learning outputs and implementing into app
- Consuming Google Cloud Vision API
Development | Testing | Gems |
---|---|---|
Ruby 2.7.2 | RSpec | Pry |
Rails 5.2.5 | WebMock | ShouldaMatchers |
JSON | VCR | Faraday |
Atom | SimpleCov | Figaro |
Github | FactoryBot | FastJSON |
TravisCI | Faker | |
Heroku |
- To clone and run this application, you'll need Ruby 2.7.2 and Rails 2.5.3. Using rbenv you can install Ruby 2.7.2 (if you don't have it already) with:
rbenv install 2.7.2
- With rbenv you can set up your Ruby version for a directory and all subdirectories within it. Change into a directory that will eventually contain this repo and then run:
rbenv local 2.7.2
You can check that your Ruby version is correct with ruby -v
- Once you have verified your Ruby version is 2.7.2, check if you have Rails. From the command line:
rails -v
- If you get a message saying rails is not installed or you do not have version 5.2.5, run
gem install rails --version 5.2.5
- You may need to quit and restart your terminal session to see these changes show up
- Get a free API Key at Artsy API
- Get a free (with limits) Google Vision API KEY by following directions here
- Fork this repo
- Clone your new repo
git clone https://github.com/#{your_github_username}/ArtspirationBE.git
- Install gems
bundle install
- Install figaro
bundle exec figaro install
- Enter your API KEYS in
application.yml
artsy_api_key = <ENTER YOUR API KEY> google_api_key = <ENTER YOUR API KEY> key = <ENTER YOUR API KEY>
- Setup the database
rails db:create rails db:migrate
The Artspiration Backend can be used to retrieve user preferences for artwork, as well as make calls to the Artsy API for specific artwork information including: title, artist, image(jpg). The backend can also provide daily recommendations for a piece of art based on past user preferences. Preferences are generated through label and image properties determined by the Google Cloud Vision API. The recommendation engine is built using a combination of collaborative filtering as well as sorting through the saved user preferences.
User Endpoint
Request:
/api/v1/users/:id
Response:
{
"data": {
"id": "133",
"type": "user",
"attributes": {
"name": "Melanie Swaniawski",
"email": "shameka_goyette@bartell.co"
}
}
}
Recommeded Art Endpoint
Request:
/api/v1/users/:id/recommendations
Response:
{
"data": [
{
"id": 168,
"type": "recommended_art",
"attributes": {
"title": "Virgin of the Rocks",
"image": "https://d32dm0rphc51dk.cloudfront.net/Jv-e1fhDjg61OYhhsMoiQg/{image_version}.jpg",
"user_id": 133
}
}
]
}
Rated Art Index Endpoint
Request:
/api/v1/users/:id/rated_arts
Response:
{
"data": [
{
"id": 175,
"type": "rated_art",
"attributes": {
"title": "La Grande Odalisque",
"image": "https://d32dm0rphc51dk.cloudfront.net/crVj8GvGliFrpExNfHWl4Q/medium.jpg",
"liked": true,
"user_id": 145
}
},
{
"id": 184,
"type": "rated_art",
"attributes": {
"title": "L'Embarquement pour Cythère (The Embarkation for Cythera)",
"image": "https://d32dm0rphc51dk.cloudfront.net/Ux_L_UKjxgR-gJ6XZYVgVg/medium.jpg",
"liked": true,
"user_id": 145
}
}
]
}
Rated Art Show Endpoint
Request:
/api/v1/users/:id/rated_arts/:art_id
Response:
{
"data": {
"id": 106,
"type": "rated_art",
"attributes": {
"title": "The Tête à Tête",
"image": "https://d32dm0rphc51dk.cloudfront.net/5KJ7_u7BPqeltkfEnyijIw/medium.jpg",
"liked": true,
"user_id": 145
}
}
}
👤 Jacob Piland
👤 Marla Schulz
👤 Kim Abcouwer
👤 Jason Knoll
👤 Alex Klick
👤 Dee H
- Turing School of Software and Design
- Project created for completion towards Backend Engineering Program
- Artsy API
- Google Cloud Vision API