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.comI. 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
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
Campaign placement setup time reduced from >1 hours to <10 mins
Placements automated across Gap, Old Navy, and Banana Republic
API adopted by franchise and localization teams
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.
