Impratech provides a JavaEE RESTful webservice that is built using RESTEasy (a JAX-RS implementation) and Hibernate ORM. The application connects to MySQL database using a JDBC connector and all queries are specified using JPQL. Impratech is shipped with a frontend that is built using AngularJS.
The frontend is a single page app built using a standard AngularJS architecture consisting of a view layer, controller layer and frontend services layer. The view layer is composed of Html templates and CSS. The controller layer is made of AngularJS controllers that glue data (received from the backend) and view. The services layer has a set of AngularJS services that communicate with the backend (using JSON structures).
Impratech defines 3 user roles: Principal user, Sales manager, Buyer. Each role has a set of functions that they are authorised to invoke/execute. Generally speaking, these functions (APIs) are designed to capture the basic business processes and data flow of a typical chemical company. The APIs manipulate following entities:
- Freight rates
- Contract prices
- Contract call-offs
- Spot request for quotation
- Company settings
This API driven architecture allows Impratech clients to develop their own frontend and connect it to Impratech through its RESTful API.
Authentication/security to Impratech’s end points is achieved using Json Web Tokens (JWT). As an example use case, to authenticate a user, we invoke the Login endpoint (with their username and password) and in return we are provided with a JWT that consists of various claims (user role, tenantId, name, email, company, expirydate). All subsequest API calls must contain the JWT as the bearer token in the authorization header.
Impratech provides two models of deployment: in the cloud deployment and on-premise deployment. The cloud deployment is based on a multi-tenant system with separate database. Each client has their own database and a client unique tenantID determines which database Impratech will connect.