A production-ready web application for flashing firmware to ESP32/ESP8266 devices using the Web Serial API. Built for Val Town with TypeScript, React, and Hono.
├── backend/
│ ├── index.ts # Main Hono server
│ ├── routes/
│ │ ├── firmware.ts # Firmware management endpoints
│ │ ├── serial.ts # Serial/flashing endpoints
│ │ └── static.ts # Static file serving
│ ├── services/
│ │ ├── firmwareStore.ts # Firmware storage and management
│ │ └── elfConverter.ts # ELF to BIN conversion
│ └── utils/
│ └── validation.ts # Input validation and security
├── frontend/
│ ├── index.html # Main HTML template
│ ├── index.tsx # React app entry point
│ ├── components/
│ │ ├── App.tsx # Main app component
│ │ ├── ConnectPort.tsx # Serial port connection
│ │ ├── FlashControls.tsx # Flashing interface
│ │ └── FirmwareList.tsx # Available firmware list
│ └── services/
│ ├── serialService.ts # Web Serial API wrapper
│ └── api.ts # Backend API client
├── shared/
│ └── types.ts # Shared TypeScript types
└── firmwares/ # Pre-built firmware binaries
├── bruce/
├── marauder/
├── ghost-esp/
└── netagotchi/
backend/index.ts (HTTP trigger)/ and API endpoints are under /api/firmwares/ directoryGET /api/firmwares - List available firmwareGET /api/firmwares/:name - Download firmware binaryPOST /api/convert - Convert ELF to BINGET /api/device-info - Get supported device informationThe app automatically serves the frontend and handles API requests. All firmware binaries are pre-loaded and ready for flashing.