Building a Desktop application for inventory and order mangement with Electron,Sequelize and Angular.js

Before i start i’d like to tell you that this is my first article on Medium so i hope it will be helpful for somebody somewhere.

In this article i’m going to show you how i built an inventory and order management app for a small company in my hometown (By the way i live in the city of sun, Agadir in Morocco).I have heard about Electron since a year ago but never used it to build applications for my clients untill now .A client has recently requested me to build a desktop application for him so i decided to take this as a chance to use the modern web tools to build for the Desktop and if the experience succeeds without any problems i will switch to Electron and JavaScript to build applications instead of Java ecosystem which i’m getting bored using it.

Before we continue ,lets say a word about Electron.So what is Electron and why using it?

Simply Electron is a project created by GitHub as a part of their Atom editor and later becomes independent.They have put together Chromuim and Nodejs plus an added API to allow web developers to build desktop applications using their existing skills with JavaScript language and its related ecosystem.You get all the power of Nodejs plus a headless browser and a rich API in one project .Nodejs allows you to access the filesystem, databases , ORMs and all other browser restricted things.Chromuim allows you to use HTML 5 and CSS(Bootstrap) to build modern and beautifull user interfaces .It also allows you to use all the client side JavaScript frameworks such as Angularjs,Backbone,React etc..As a result you can build cross platform Desktop applications using powerful and modern tools.

Now lets talk briefly about the whole ecosystem

I used Angularjs as the frontend framework.Angularjs is very popular client side Javascript MVC framework built by Google.It is my favorite framework alongside with Backbone.I used Sequelize as the ORM ,i’ve stopped a longtime ago writing raw sql instead i use object relational mappers.Sequelize is one of the best ORMs available for Node.js.It supports many dialects such as sqlite,mysql,postgresql etc..And of course i used the awesome Electron to put all the pieces together.

Back to our application .We need to implement many functionalities such as:

Inventory management

The user needs to be able to create Items and Familly of Items and to update Item quantity and price whenever products arrive from Providers

Sales management

A user needs to be able to create and print Quotations ,Sales Orders and Invoices .It needs also to be able to create Clients

Purchases management

A user needs to be able to create and print Purchase Orders and Providers.

To Be Continued…

Developer and technical author. Read more articles at Techiediaries

Developer and technical author. Read more articles at Techiediaries