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
.png
file. - 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 install
To run the demo application locally:
npm run dev
This 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-creator
logic 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.png
you just downloaded. The application uses theaura-parser
to extract theaura
chunk, decompress the data, and render the interactive regions on the image using theAuraViewer
React component.
src/components/AuraViewer/
: Contains the React component responsible for rendering the interactive experience.src/lib/aura-parser/
: Contains the logic for parsing theaura
chunk from a PNG file.src/lib/aura-creator/
: Contains the logic for creating an AIIP file by injecting theaura
chunk.src/assets/
: Contains the sample data used for the demonstration.
This project is licensed under the MIT License. See the LICENSE file for details.