MatheusPoliCamilo / company-sales-backend

Rails backend for the SalesBox project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rspec rubocop simplecov brakeman bundler_audit reek ruby_critic

SalesBox

SalesBox is a easy to use cloud based sales analyzer that accepts text files (tab separated) uploads.

https://sales-box-app.vercel.app/

Features

With SalesBox you can:

  • Check the Gross Income for each upload
  • Check the All Time Gross Income for all the uploads made
  • See a list of uploaded files to control your analysis.

Get Started ๐Ÿ”ฅ

This repository is the Rails back-end for the SalesBox project. Follow the setup below to install and run it locally.

Prerequisites ๐Ÿ’พ

To run the project, you will need the following dependencies installed:

Ruby 2.7.2

Gem bundler

Postgresql

Installation ๐Ÿ› 

  1. After clonning the repository, in the ROOT directory run the following command to install the dependencies.

     bundle install
    

Running the project โš™๏ธ

To run the project locally, use the commands bellow.

  1. Starts the ProstgreSQL service.

Linux:

    sudo service postgresql start

MacOS:

    brew service postgresql start
  1. Create and prepare the database.

     bin/rails db:create
     bin/rails db:migrate
    
  2. Run the Rails server.

     bin/rails server
    

The Rails server will run by default on localhost:3000.

Running Tests โœ…

  1. Run tests with

     bundle exec rspec
    
  2. For reporting access coverage/index.html on your browser.

Improvements ๐Ÿ“ˆ

  1. Use ActiveStorage with some service like AWS for work with the company sales uploaded file.
  2. Cache on total all-time gross income endpoint.
  3. Some code refactoring to enable the disabled RuboCop cops and Reek rules.

About

Rails backend for the SalesBox project


Languages

Language:Ruby 100.0%Language:Procfile 0.0%