Code Monkey home page Code Monkey logo

alchemy-internal-website's Introduction

Build Status Alchemy Internal Website

This project integrates with Alchemy's Microsoft Dynamics NAV database providing useful features to the Alchemy staff.

  • Secure login service allowing only Alchemy employees to access
  • Tools:
    • Tools for branding special PDF documents such as Safety Data Sheets for Product Data Sheets
    • Tool for translating CRM reports into vendor specific requirements
  • Products:
    • Sales, Cost, Margin and Volume chart for the last 5 years
    • Summerised view of individual products
    • Allows uploading and downloading of documents associated with product
  • Customers:
    • Sales, Cost, Margin and Volume chart for the last 5 years
    • Summerised view of customers
    • Includes customer credit information
    • Lists product sell prices per customer
    • Compares YTD to PY for each product the volume, sales and marign
  • Vendors:
    • Sales, Cost, Margin and Volume chart for the last 5 years
    • Able to show Vendor group stats, whereby all metrics are combined for a particular vendor group
    • List of products associate with vendor
  • Sales:
    • Overall company sales over the years chart
    • Comparison of individual sales people charts

Development environment

Initial setup

Copy secrets.yml.example and database.yml.example to config/secrets.yml and config/database.yml

Build

docker build -t alchemy-internal-docker .

Run

First time only:

docker run -v $(pwd):/var/alchemy -i -t alchemy-internal-docker /var/alchemy/initialise-database-dev.sh

To start web app:

docker run --name alchemy-internal --rm -p 3000:3000 -v $(pwd):/var/alchemy -i -t alchemy-internal-docker /var/alchemy/start.sh

To get into the console:

docker exec -i -t alchemy-internal /bin/bash -c "source /usr/local/rvm/scripts/rvm; cd /var/alchemy; bundle exec rails c development"

Login

username: [email protected] password: password

API endpoints

Here are some examples of using the endpoints with curl. You need to have a user in the database that has the api_user field set to true

# Get list of products, customer users or vendors:
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X GET -d '{"user":{"email":"[email protected]","password":"password"}}' http://localhost:3000/api/products
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X GET -d '{"user":{"email":"[email protected]","password":"password"}}' http://localhost:3000/api/customer_users
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X GET -d '{"user":{"email":"[email protected]","password":"password"}}' http://localhost:3000/api/vendors

# Change customer user password:
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X PUT -d '{"user":{"email":"[email protected]","password":"password"}, "password": "new_password"}' http://localhost:3000/api/customer_users/2

# Get COA document
curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X GET -d '{"user":{"email":"[email protected]","password":"password"},"cod_id":"123456"}' http://localhost:3000/api/certificate_of_approval > 123456.pdf

alchemy-internal-website's People

Watchers

 avatar

Forkers

joshofreeness

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.