Giter Club home page Giter Club logo

cadastro-dvds-venda's Introduction

cadastro-dvds-venda's People

Contributors

caloni avatar

Watchers

 avatar

cadastro-dvds-venda's Issues

App upload DVD images

Situation

We have some DVDs that need images to be taken to be available to register them to sell.

Objective

The app can take picture of DVDs and those pictures will be saved in the cloud.

Orientation

We need an image API to upload and have direct link to those images to use them in the spreadsheet to MercadoLivre product registration. Initially I tried to use imgr, but now they do not allow phone numbers from Brazil region to sign up, so we need a better solution. Could be an anonymous one, a free one and could be a very cheap one. What is easier to use as a REST API.

Proof

The app can take pictures and those pictures, the direct links are part of the DVD registration and those links can access the images from everywhere.

Refactor project to get rid of the API

Briefing

We started the project as a classic client/server approach, where the client could be any app or site that uses the API in the server side. However, the mobile approach will be the only one needed for this project and doesn't make sense put all this complexity of where to put the API running and database issues when a simple phone app can handle all of this.

Mission

Get rid of every API reference, including the API itself. The solution must still keep working using a local database and accessing external APIs.

Tech

Just use the sqlite (Android default database) for the app and delete a lot of code. It should be no complex interaction between APIs in the project.

Proof

It is possible to use the app without the need to put some server up. Just internet connection is enough.

DVD register API

Situation

We have a horrible Python script that manipulates a Mercado Livre spreadsheet used to create multiple products in order to register the available DVDs to sell.

Mission

Transform this script into an API that receives every item as a json object.

Orientation

There is no need to think about security or good practices in this project right now, it is going to run locally. Just write a goddam API that receives one json object and put it into a database (every database is just fine). It can be done in every language.

The json object can be something like this:

{
  "dvd":
  {
    "productTitle": "DVD O Poderoso Chefão",
    "images": "url-to-image-or-empty,another-url-to-image-or-nothing",
    "qty": "1",
    "price": "12,99",
    "condition": "Usado",
    "movieTrailer": "link-to-youtube-with-movie-trailer",
    "delivery": "A definir",
    "takeout": "Permitido",
    "warranty": "Sem garantia",
    "format": "DVD",
    "movieTitle": "O Poderoso Chefão",
    "movieDirector": "Francis Ford Coppola",
    "resolution": "SD",
    "disks": "1",
    "audio": "Inglês",
    "gender": "Drama",
    "company": "Paramount"
  }
}

Use case:

curl -H "application/json" -d "@dvd.json" http://localhost:8080/dvds
dvd criado com sucesso!

Evidence

It is possible to call this API and as a consequence the next select from the database should return this new item.

App gets movie details from internet

Situation

We need to type every detail of the movie when registering a new DVD.

Objective

  • Use default values to commons cases (e.g. 1 disk, DVD format);
  • When typing the name of the product show a list of movie matches from the internet; if chosen one, fill the movie title and director fields (probaly Áudio as well).

Orientation

We can use the IMDB and its REST API or Google. The advantage of Google is that is possible to type the brazilian title of the movie and still find it (not always available in IMDB). Other options include OMDB. We can take advantage of Python lib and export this in a endpoint inside the API (look at this script).

Proof

It is possible to type a word in the product title field and at least one movie should be floating; if selected at least the movie title and movie director fields should be filled automatically.

App take pictures and upload them

Situation

We have some DVDs that need images to be taken to be available to register them to sell. We also have the upload image feature available. Both are not tested or documented using a cell phone.

Objective

The app in the cell phone can take picture of DVDs and those pictures will be saved in the cloud after taken. The link to those images will appear in one of the fields used to register the DVD.

Orientation

We already have a image upload API to send those images and get the URL. What we don't have is take pictures with the cell phone camera and select those pictures to send. There is not a updated documentation of how to proceed to do that (the installation and use doc).

Proof

The app in the cell phone can take pictures and those pictures, the direct links are part of the DVD registration field and those links can access the images from everywhere.

App get movie details from uploaded images

Situation

The Issue #8 was not fixed because it was discovered that there is a much simpler way to fill the movie details using Google Vision API.

Now we have in the app the feature of adding images to the cloud and get its links. Using the link above is possible to call Google Vision to get the text from those images and use it as an autocomplete option for other fields.

Objective

To use text from the images from the DVD to autocomplete the fields that are being filled by the user. The autocomplete option can show up in every field to be filled as was being made for movie title.

Orientation

Call Google Vision API directly from the app using the images captured from the camera and use the autocomplete feature to fill the fields the user selected.

Proof

When editing or adding a new DVD with 1 or more images some text present in those images must be in the autocomplete option for the fields movie title and director, as well as others (optional).

Export DVDs to Mercado Livre spreadsheet

Situation

With the register API we have a database with all the DVDs, but no way to transform this database to the MercadoLivre spreadsheet to registers the products.

Objective

Create a link to download a spreadsheet with all the DVDs registered.

Orientation

This link can be a new endpoint. What the endpoint must do is to use a spreadsheet template and a select in the database to populate the spreadsheet (there is a Python script to do that already). This spreadsheet can be temporary and available in memory just to return to the caller is able to download it.

Proof

Must be possible to access a link and download the spreadsheet. The spreadsheet must contain all the DVDs registered.

App register a new DVD

Situation

We need to register a DVD using terminal command running curl or similar to access the API.

Objective

Use an app to register a DVD.

Orientation

Just start an Android app using Android Studio or whatever and in the first screen put the DVD required fields. An add button must call the API using these fields to register a new DVD.

Proof

A new DVD registered using the app must show up in the downloaded spreadsheet.

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.