Git Product home page Git Product logo

customer-support's Introduction

README

Installation

Get started with Docker & Docker Compose (preferred)

tested with docker version 1.13.0 and docker-compose version 1.10.0

  1. Install docker and docker compose - https://docs.docker.com/compose/install/
  2. Run the services:
cd Code
docker-compose up -d
docker-compose exec backend rails db:setup
  1. Open http://localhost:4000
  2. Use one of the following email, users have same password: password
  1. For development
cd Code
docker-compose -f docker-compose.dev.yml up -d # run in development environment
docker-compose exec backend rails db:setup
docker-compose exec backend rails spec spinach

Install a development environment

Backend

Ruby version

  • 2.3.1

System dependencies

  • Mysql version 5.7
  • Elasticsearch version 2.4

Configuration

  • Mysql

    • use root and empty password or override in config/database.yml
    • in production environment set env variable DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
  • Elasticsearch

    • should be run on localhost:9200
    • in production environment set env variable ES_HOST="host:port"

Prepare and run web server

  1. Setup database
cd Code/backend
rails db:environment:set RAILS_ENV=development
rails db:setup # creates database, load schema and seed data
  1. Install gems
bundle install
  1. Run test suite (must pass)
rails spec # Unit tests
rails spinach # Feature tests
  1. Run server on port 3000
rails s

Frontend

Node.js version

  • 7.4

Configuration

  1. Install packages
cd Code/frontend
npm install
  1. Run lint and test suite (must pass)
npm run deploy:dev
  1. Run dev server
npm run dev
  1. Open the app - http://localhost:4000

  2. For development

cd Code
docker-compose -f docker-compose.dev.yml up -d # run in development environment
docker-compose exec frontend npm run test
docker-compose exec frontend npm run lint

Test Coverage

Backend

  • unit tests (rspec) - 30.29%
  • integration tests (spinach) - 96.83%

Frontend

  • unit tests
Statements   : 48.32% ( 274/567 )
Branches     : 36.41% ( 79/217 )
Functions    : 34.23% ( 89/260 )
Lines        : 50.48% ( 265/525 )

customer-support's People

Contributors

webgago avatar

Watchers

 avatar  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.