logo

File Automation API — Reverse-Engineered Electron Workflow

Rebuilt Gap Inc.’s local Electron file manager into a Node.js REST API using SMB2 to enable remote content creation and automation.

Internal Tools / API Integrationgap.com

I. The Challenge

Gap’s digital team relied on an Electron app to manage hundreds of marketing “placements” across brand sites (Gap, Old Navy, Banana Republic). The app required engineers to connect manually to an internal Windows file server, duplicate campaign folders by CIID (Campaign ID), and update static HTML and assets. This process was slow, error-prone, and blocked non-technical producers from executing simple content updates.

II. The Solution & Architecture

Reverse-engineered the Electron workflow and rebuilt it as a web-accessible REST API using Node.js and the SMB2 library. The API performed authenticated CRUD operations directly on the internal Windows share where production pages lived. Producers could create placements, upload assets, or clone evergreen templates by simply submitting a form — no server connection required.

System Architecture

Legacy Electron App
Local tool for creating campaign folders by CIID
Windows SMB Server
Hosted live production page files per brand (Gap, Old Navy, Banana Republic)
Node.js + Express Backend
REST API wrapper around SMB2 file operations
SMB2 Library
Performed remote read/write/clone actions within secure sandbox
Web App Frontend
Form-based UI for creating CIID folders and uploading assets
File Templates Engine
Generated HTML with brand-specific evergreen content
Producer Access Layer
Enabled non-engineers to publish content via REST
Azure Migration
Later moved to Azure Cloud with full API portability

III. Technology Stack

Core Backend

  • Node.js + Express
  • SMB2 Library for Windows Shares
  • REST API Architecture
  • JSON File Configurations

Frontend

  • React Form Interface
  • Drag-and-Drop Asset Uploads
  • Dynamic Template Rendering
  • Axios for API Calls

Automation

  • CIID-based Folder Generation
  • Evergreen HTML Templates
  • Asset Upload Validation
  • Automated File Naming Conventions

Infrastructure

  • Internal Sandbox Environment
  • Azure Migration (Post-project)
  • Windows Server File Shares
  • Corporate Network Authentication

IV. Results & Impact

6x Faster

Campaign placement setup time reduced from >1 hours to <10 mins

100+

Placements automated across Gap, Old Navy, and Banana Republic

Multi-Team

API adopted by franchise and localization teams

Azure Ready

System later migrated to cloud infrastructure with no code change

Key Learnings

  • Reverse-engineering internal Electron tools revealed reusable backend patterns hidden in desktop workflows.
  • Using SMB2 allowed full file control inside corporate networks without manual mounting.
  • Abstracting filesystem logic into a REST API empowered producers and improved cross-team efficiency.
Professional headshot

Let's Connect

I'm always interested in discussing new opportunities, technical challenges, or potential collaborations. Feel free to reach out through any of the channels below.También hablo Español!

Typically respond within 24 hours