Giter Club home page Giter Club logo

chemstore's Introduction

ChemStore

ChemStore is a chemical stock and inventory database, designed as a Java EE (REST) Web service. To access use localhost:8080/api/v1 or from a browser http://localhost:8080/api/v1. Note that the port number can be changed (see Payara Application Server)

JPA entities for chemicals and apparatus

The Entity relationship diagram is as follows:

All JPA entities are extensions of AbstractEntity. The key entities stored permanently are:

  • Supplier
    • Company name
    • Contact email
    • Contact phone number
  • Reagent
    • CAS ID
    • Name
  • Apparatus
    • Name
    • Capacity

The stock items are then related to the supplier via one-to-one relational mappings:

  • StockChemical
    • Reagent (one-to-one)
    • Supplier (one-to-one)
    • Unit (enum)
    • Expiry Date
    • Density
    • Concentration
  • StockApparatus
    • Apparatus (one-to-one)
    • Supplier (one-to-one)

With the above records put in place, the end-user will eventually be expected to keep a record of current stock:

  • Chemical stock
    • StockChemical (one-to-one)
    • Quantity
  • Apparatus stock
    • StockApparatus (one-to-one)
    • Quantity

The (purchase) Order is composed of Lists of ApparatusOrdered and ChemicalOrdered:

  • ApparatusOrdered

    • Order (many-to-many)
    • StockApparatus (one-to-one)
    • Quantity ordered
    • Price
    • Currency (enum)
  • ChemicalOrdered

    • Order (many-to-many)
    • StockChemical (one-to-one)
    • Quantity ordered
    • Price
    • Currency (enum)

Hence, ApparatusOrdered and ChemicalOrdered are individual rows of Order:

  • Order
    • Order date and time
    • (List of) ApparatusOrdered (many-to-many)
    • (List of) ChemicalOrdered (many-to-many)

The mappings are many-to-many since it is likely that the same quantity of apparatus and/or reagents will be requested again.

Payara Application Server

ChemStore is designed to run over the Payara Application Server. To build a fat JAR file with the Payara server embedded, execute mvn clean package from the project parent directory. To run the app, enter java -jar ChemStore-1.0-SNAPSHOT-microbundle --port 5000, noting that the port parameter is optional.

EclipseLink

ChemStore uses the EclipseLink ORM with the H2 in-memory database. The database is initially void of entities.

To post new reagents (for example), send POST request to "localhost:8080/api/v1/reagents" with a (raw) JSON in the request body:

{
    "CAS_id" : "Some CAS ID",
    "chemicalName" : "Alcohol"
}

Future capabilities of ChemStore

Teacher submitted lab requirements

The teacher can submit a request sheet for a class, for classes taking the same experiment, saving the instructions for future use:

  • Teacher chemical request facility
    • Date of request
    • Date/week of experiment(s)
    • Number of students
    • Number of surplus quantities
    • Chemicals required
      • Chemical name
      • Quantity per student
    • Apparatus required
      • Apparatus name
      • Capacity

Reagent quantities calculator

The school/college technician can also make use of a reagent quantities calculator:

  • School technician reagent quantities and dilutions calculator
    • Molar/formula mass
    • Stock concentration
    • Volume per student
    • Number of students + surplus
    • OUTPUT: volume/mass required

chemstore's People

Contributors

jfspps avatar

Watchers

 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.