top of page

Using the SEAL Stack


Using a SEAL Stack at SEAL Stack.org

Recently, we needed to develop a desktop application for one of our clients. As web developers, our immediate thought was to use the SEAL Stack (http://sealstack.org). SEAL is a technology stack that uses SQLite, Electron, Angular, and Loopback.

Why use Electron?

Electron (https://electronjs.org) gives a developer the ability to build cross platform desktop apps with JavaScript, HTML, and CSS. It is a framework developed by GitHub. It combines Node.js, which is a JavaScript runtime that allows you to run JavaScript on the desktop, with Chromium, the open-source technology behind Google’s Chrome browser. This allows a developer to develop as if it is a web app, but from the user's perspective. It functions as a single application. Electron is used in many popular applications including Slack, Microsoft Visual Studio Code, and tools from GitHub.

Why use Angular? Angular is a front-end web framework developed by Google. (https://angular.io). It makes writing single-page apps easy. It uses declarative templates for data binding and handles routing. It promotes component reuse across your application, making your code more stable. Angular uses TypeScript, an extension of JavaScript that adds strong typing.

Running a Web Server An interesting twist to the project, was that there was a high probability that the client would want it converted to a web app in the future. Aside from the benefit of being able to develop with familiar web technologies, Electron gave us the ability to easily transition to the web at a later date if needed.

With this knowledge in mind, we decided from the very beginning to build the app like a standard single-page app and use Electron to run it. Because Electron runs on Node.js, it was easy to spin up a server within the app. In the future, if we need to transition the app to the web, it will simply require deploying the code to a web server (and a few additional tasks such as changing data connectors to connect to a database server, adding authentication, etc).

Why use LoopBack? For the web framework, we chose LoopBack (https://loopback.io). LoopBack is a highly-extensible, open-source Node.js framework. It is built on Express, the most popular Node.js framework. It makes it easy to quickly create dynamic end-to-end REST APIs. It has an ORM and data connectors for all the standard databases making it very easy to retrieve and persist data.

Why use SQLite? By default, the LoopBack boilerplate configuration uses memory for data storage. Because we needed the data to persist between sessions, so we decided to use a database for data storage. In this case, we chose SQLite (https://sqlite.org). Benefits of SQLite include not having to install a database server on the user’s computer. SQLite is public domain and works across many different platforms. The data is stored in a single .sqlite file that can be transferred from one computer to another if needed, which could help with syncing data between users in the future. To avoid any issues running SQLite cross platform, we used a Node.js implementation of a SQL parser called sqljs. and wrote a custom connector for Loopback using sqljs (https://github.com/canallc/loopback-connector-sqljs).

System Architecture Here’s a diagram illustrating how the four elements of the SEAL stack integrate together.

The stack bundle

Wiring it Up The easiest way to get started with the SEAL stack is to use the quick-start project (http://sealstack.org). The site is well documented. It also provides instructions for modifying an existing application to use the SEAL stack.

Dan Sterrett
Aaron Luprek

This article was a collaboration between CANA Advisors Principal Software Developer Dan Sterrett, and CANA Advisors Senior Software Developer Aaron Luprek.

For more programming articles, information on on SEALstack and other projects in development visit CANAadvisors.com

 
 
 

Recent Posts

See All
CANA, CRATE, and the chatbot

CANA has always encouraged its team members to think outside the box and test new ideas. A recent CANA CRATE project perfectly...

 
 
 

22 Comments


Tim
Tim
3 days ago

This SEAL stack looks interesting! I was just looking into options for cross-platform desktop apps and the idea of using JavaScript, HTML, and CSS with Electron is appealing. I need to track my period, so I'm always on the lookout for good tools. The mention of Angular for the front-end also caught my eye since I've been meaning to explore single-page app development more. Thanks for sharing this!

Like

Skyinplay
Skyinplay
Jul 26

Radhe Exchange is India’s trusted online betting exchange offering live sports betting, fast withdrawals, real-time odds, and a secure platform. Bet smart, play fair, and win big with a smooth, user-friendly experience. Join now and start winning

Like

Skyinplay
Skyinplay
Jul 26

Skyinplay is a leading online gaming platform in India, offering sports betting, casino games, fantasy leagues, and peer-to-peer exchange betting. Known for its user-friendly interface and secure environment, it supports popular Indian payment methods and provides 24/7 support. With games like Teen Patti, cricket betting, and live casino options, Skyinplay caters to both casual players and serious bettors, making it a top destination for real-money gaming.

Like

gold-365
gold-365
Jul 23

Laser247 is your trusted online betting platform offering live sports, casino games, and secure gameplay. Enjoy real-time action, fast withdrawals, and 24/7 access on any device. Join Laser247 and play with confidence every time.

Like

gold-365
gold-365
Jul 23

Laser 247 delivers a premium online gaming experience with real-time betting, casino games, and fast payment options. Enjoy secure access, easy registration, and 24/7 support. Whether you're a beginner or pro, Laser 247 offers something for everyone.

Like
bottom of page