
How I implemented a local-first Git workflow in an Electron/React app (building a Postman alternative)
Hey everyone, I recently got frustrated with API clients forcing cloud sync and requiring accounts just to save a few HTTP requests. I wanted my API collections to live directly inside my project repositories as plain JSON files, so I decided to build my own local-first API client using React 19, Vite, and Electron. The biggest architectural challenge wasn't the HTTP client itself, but integrating native Git operations so users could branch, commit, and push their collections without leaving the UI. I wanted to share how I structured this, in case anyone else is building local-first Electron apps: The Architecture (IPC Bridge) You obviously can't run Git commands directly from the React frontend. I used simple-git in the Electron Main process. I exposed specific handlers via contextBridge in the preload script. Instead of exposing a generic command runner (which is a security risk), I strictly typed the IPC channels for operations like git:status, git:commit, and git:push. Handling the
Continue reading on Dev.to JavaScript
Opens in a new tab

.jpg&w=1200&q=75)


