Key Dependencies
Trufos relies on a number of key libraries and frameworks. Understanding these dependencies is helpful for development. This is not an exhaustive list but covers the most significant ones.
Core Framework & Build Tools
electron
: The core framework for building cross-platform desktop applications using web technologies.- Role: Provides the main and renderer process architecture, native APIs, and packaging capabilities.
@electron-forge/cli
& related plugins: The build pipeline and toolchain for Electron applications.- Role: Handles packaging, making distributables (DMG, Squirrel, ZIP), and integrating build tools like Vite.
- Plugins used:
plugin-vite
,plugin-auto-unpack-natives
,plugin-fuses
.
vite
: A modern frontend build tool.- Role: Bundles JavaScript/TypeScript for both main and renderer processes, provides a fast development server with HMR.
typescript
: Typed superset of JavaScript.- Role: Enhances code quality, maintainability, and developer experience.
react
&react-dom
: A JavaScript library for building user interfaces.- Role: Powers the entire UI of the renderer process.
UI & Styling
@monaco-editor/react
&monaco-editor
: The code editor component that powers Visual Studio Code.- Role: Used for displaying and editing request/response bodies, with custom language features for template variables.
@radix-ui/*
: A collection of unstyled, accessible UI primitives.- Role: Foundation for many of the
shadcn/ui
components.
- Role: Foundation for many of the
tailwindcss
: A utility-first CSS framework.- Role: Primary styling mechanism for the application. Configured in
tailwind.config.js
.
- Role: Primary styling mechanism for the application. Configured in
shadcn/ui
(implicitly, viacomponents.json
andsrc/renderer/components/ui/
): A collection of re-usable UI components built using Radix UI and Tailwind CSS.- Role: Provides a base set of styled and accessible components (Button, Input, Dialog, etc.).
lucide-react
&react-icons
: Icon libraries.- Role: Provide icons used throughout the application.
class-variance-authority
(cva) &clsx
&tailwind-merge
: Utilities for constructing dynamic and conditional class names, especially for Tailwind CSS.- Role: Used heavily in
shadcn/ui
components and custom components for flexible styling.
- Role: Used heavily in
State Management
zustand
: A small, fast, and scalable state-management solution for React.- Role: Manages global application state in the renderer process (e.g., collections, responses, variables).
immer
: A library for working with immutable state in a more convenient way.- Role: Used as middleware with Zustand to allow “mutable” state updates in actions.
Networking & Data Handling (Main Process)
undici
: A fast, spec-compliant HTTP/1.1 client for Node.js.- Role: Used by
HttpService
in the main process to make actual HTTP requests.
- Role: Used by
postman-collection
: A Node.js module to work with Postman Collection Format v1.0/v2.0/v2.1.- Role: Used by
PostmanImporter
to parse and import Postman collections.
- Role: Used by
template-replace-stream
: A Node.js stream transform for replacing template strings.- Role: Used by
EnvironmentService
to substitute variables (e.g., ``) in request bodies.
- Role: Used by
tmp
: A temporary file and directory creator for Node.js.- Role: Used by
FileSystemService
andHttpService
for managing temporary files, e.g., for response bodies.
- Role: Used by
mime-types
: Utility to look up MIME types by extension and vice versa.- Role: Likely used for determining content types of files.
Logging (Main Process)
winston
: A multi-transport async logging library for Node.js.- Role: Handles structured logging in the main process, including file and console output.
Testing
vitest
: A Vite-native test runner.- Role: Used for unit and integration tests in both main and renderer processes.
jsdom
: A JavaScript implementation of many web standards, for use with Node.js.- Role: Provides a simulated browser environment for renderer process tests.
@testing-library/react
: Utilities for testing React components.- Role: Used for writing tests for UI components in the renderer process.
memfs
: An in-memory file system.- Role: Used in main process tests to mock file system operations.
Development Utilities
eslint
& plugins: Code linter.prettier
: Code formatter.electron-devtools-installer
: Helper to install Chrome DevTools extensions in Electron.
This list provides a good overview of the technological landscape of Trufos. For a complete list, refer to the dependencies
and devDependencies
sections in package.json
.