GithubHelp home page GithubHelp logo

barstock_backend's Introduction

README

Description

BarStock is a 13-day, four-person project during Mod 4 of 4, for Turing School's Back-End Engineering Program. Our team consists of two Front-End Developers and two Back-End Developers.

Our challenge was to create a native application from idea to inception by integrating our skills as Front-End and Back-End Developers to solve a real-world problem.

Thus, BarStock was born. BarStock is a web application designed to solve the communication challenges between bar owners and distributors when placing inventory orders. In the bar industry, it is frequently common practice to place weekly inventory orders via text messages/emails. Bar owners are not provided with pricing sheets, nor available inventory, and often receive incorrect shipments. BarStock is intended to alleviate this headache by providing bar owners with user interface to view distributor inventory, analyze profit margins, and automate text message/email ordering.

BarStock Back-End utilizes Ruby on Rails, RSpec, ActiveRecord, and a PostgreSQL database for the BarStock User Interface, which communicate back and forth via API requests/responses.

Login Screen Selecting Inventory
Login Screen Selecting Inventory
View Margin/Profits Place Order
View Margin Profits Place Order
Account Information Reorder
Account Information Reorder

Schema

Alt text

Available Endpoints

All available endpoints have been documented on Swagger. Alt text

Representative Notifications of Order

Upon creation of an order, both an email and an email and a text message are sent to the distributor's representative.

Order Email

Alt text

Order Text Message

Alt text

Getting Started

To run BarStock Back-End on a local machine, navigate to the directory in which you would like the project to be located, then execute the following commands:

$ git clone [email protected]:MRKrog/barstock_backend.git
$ cd barstock_backend
$ bundle
$ rails g rspec:install
$ rails db:create
$ rails db:migrate
$ rails db:seed
$ figaro install

Environment Variable Setup:

Create Accounts With The Following Services:

Add the following code snippet to the config/application.yml file. Make sure to insert the key/secret without the alligator clips ( < > ).

TWILIO_ACCOUNT_SID: <insert>
TWILIO_AUTH_TOKEN: <insert>
TWILIO_PHONE_NUMBER: <insert utilizing the format of '+1720993333'>
SENDGRID_PASSWORD: <insert>

Running Tests

To run the test suite, execute the following: redis-server. Keep the redis server running and open a new terminal tab. Execute the following: bundle exec rspec.

Deployment

To view BarStock in development, execute the following command from the project directory: rails s. In a browser, visit localhost:3000, to view the application.

To view the application in production, from the project directory, execute the following commands:

$ createuser -s -r barstock_backend
$ RAILS_ENV=production rake db:{drop,create,migrate,seed}
$ rake assets:precompile
$ rails s -e production

Tools Utilized:

  • Fast JSON API
  • RSpec
  • Faraday
  • Figaro
  • Faraday
  • Capybara
  • Pry
  • Shoulda-Matchers
  • Factory Bot
  • Database Cleaner
  • SimpleCov
  • Bcrypt
  • Faker
  • Awesome Print
  • WebMock
  • VCR
  • Trello
  • Postman
  • Circle CI
  • Sendgrid
  • Redis
  • HTML Email Template
  • Twilio
  • Mailcatcher

How to Contribute

Contributing Code:
  1. Fork the project.
  2. Write a failing test.
  3. Commit that failing tests.
  4. Commit changes that fix the tests.
  5. Submit a pull request detailing the change that was made.
Submitting a Bug:
  1. Search the existing issues.
  2. Create a new issue if applicable, or contribute to an existing issue.

Related Links:

Authors

Acknowledgments

barstock_backend's People

Contributors

juliamazey avatar mackenzie-frey avatar inzurriaga avatar mrkrog avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Forkers

juliamazey

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.