ElectronSafe

October 19, 2024

ElectronSafe is a desktop application built with Electron and React that leverages the command-line interface of Veracrypt to provide a modern graphical user interface for creating and mounting encrypted containers.

GitHub Repository

Motivation

The motivation behind this project is to provide a proof of concept for using Electron to interact with CLI tools and give these tools a modern and visually appealing interface without modifying their code. This approach has been successfully implemented in projects like Docker Desktop, where the client is an Electron application. The project currently functions exclusively on Windows. With minor adjustments, it should be compatible with Linux and macOS.

Create container view

Technologies

  • React
  • Typescript
  • nodepty: Utilized for spawning and controlling a terminal within the Node.js environment. It allows the creation of a pseudo-terminal (pty) that can be programmatically read from and written to, enabling direct interaction with command-line tools.
  • Electron: Empowers the development of cross-platform desktop applications using JavaScript. By leveraging Electron's main process, we interface with nodepty for terminal operations. Inter-process communication (IPC) events are used to transmit data to the renderer process, where React handles the dynamic UI rendering.
  • Tailwind CSS: A highly configurable, utility-first CSS framework that accelerates the styling process by providing low-level utility classes directly in the markup.
  • shadcn: A robust component library that offers a collection of accessible, pre-styled components, enhancing the UI development with consistent design patterns and best practices.
  • Vite