Author: aezi zhu (github.com/aezizhu)
This repository contains the reference implementation and prototype for the Aura Interactive Image Protocol (AIIP). It includes a functional demonstration of the core protocol, allowing for the creation and viewing of self-contained, interactive PNG image files.
For the complete technical specification of the protocol, please see the Aura Image Protocol Specification repository.
AIIP is a protocol designed to embed rich, interactive experiences within a standard PNG file. It works by adding a custom aura data chunk that contains a secure, declarative JSON object defining interactive regions, events, and content.
- Self-Contained: All interactivity is packed into a single
.pngfile. - Backward Compatible: Images gracefully degrade to standard static PNGs in non-compatible viewers.
- Secure by Design: The protocol uses a declarative JSON structure, not executable code, to prevent security risks.
This project was built with Vite, React, and TypeScript.
Clone the repository and install the dependencies:
npm installTo run the demo application locally:
npm run devThis will start a development server, typically at http://localhost:5173.
The application demonstrates the full, end-to-end workflow of the protocol:
-
Creator Demo: Click the "Generate & Download" button. This uses the
aura-creatorlogic to take a sample image and a sample JSON object, compress the JSON, and inject it into a new PNG file (interactive-map.png) that is downloaded to your computer. -
Viewer Demo: Click the "Choose File" button and select the
interactive-map.pngyou just downloaded. The application uses theaura-parserto extract theaurachunk, decompress the data, and render the interactive regions on the image using theAuraViewerReact component.
src/components/AuraViewer/: Contains the React component responsible for rendering the interactive experience.src/lib/aura-parser/: Contains the logic for parsing theaurachunk from a PNG file.src/lib/aura-creator/: Contains the logic for creating an AIIP file by injecting theaurachunk.src/assets/: Contains the sample data used for the demonstration.
This project is licensed under the MIT License. See the LICENSE file for details.