Giter VIP home page Giter VIP logo

smartphones_catalog's Introduction

โœจ Introduction

SmartPhone Catalog it's an app where you can upload data from a CSV file and seed a DB made for selling cellphones. You can also list and filter the data you uploaded. It was made to be flexible and also logical with an scalable and still simple database modeling. That's our initial documentation:

SmartPhone Catalog also provides you a simple API decoupled from web's controller business logic, so we can add and control data beyond our initial planning, adding new brands or devices without needing to upload from CSV directly. It'll be easier to implement any kinda of form and also make basic CRUD changes by the way this app was made.

It's not a piece of cake, still. Error handling can be hard and useless if it's spread over the app as it's now and the only specs coverage facade are between models and API. The services could be refactored and maybe an async processing made with Sidekiq or a cache feature could help us handling more data volume. Dockerizing our app could also improve developer experience.

Still a WIP, but works.

๐Ÿ“Œ Technologies

  • Ruby On Rails
  • RSpec
  • Bootstrap
  • Active Model Serializer
  • FactoryBot
  • MySQL

๐Ÿ“Œ Features

  • Upload CSV data to the DB
  • List CSV data
  • List and filter all DB data

โœจ Getting Started

๐Ÿ“Œ Clone this repository

git clone https://github.com/marianasmmattos/smartphones_catalog.git
cd smartphones_catalog

๐Ÿ“Œ Running it

Open a terminal window.

  1. First, create database
rails db:create
  1. Then, run our migrations so the schema is up to date
rails db:migrate
  1. Run our app!
bin/rails server

or

rails s

๐Ÿ“Œ Expected CSV

So, to seed our db you need to provide a certain type of CSV format. You can find it at input_valid.csv. The collums should be:

manufacturer model color carrier_plan_type quantity price
string string string pre / pos int int

๐Ÿ“Œ API Docummentation

Endpoints - v1

Announcements

/api/announcements/
Method: GET
/api/announcements/:id
Method: GET
/api/announcements?:device_color_id&:plan_id&:price&:amount
Method: POST

Brands

! WIP !

smartphones_catalog's People

Contributors

marianasmmattos avatar mantegamassarotto avatar dodecaphonic avatar fabriciofernandes avatar hugotamaki avatar romeucarvalho avatar

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.