|
1 | | -# demo |
| 1 | +# algo-ipfs demo |
2 | 2 |
|
3 | | -## Project setup |
4 | | -``` |
| 3 | +Vue 2.7 front-end for the [Algorand-IPFS Integration](https://github.com/redcpp/algorand-ipfs-js) library. Lists every file registered on-chain for a given Algorand address (using zero-Algo note transactions as a public index), and links each entry to its IPFS gateway and explorer page. |
| 4 | + |
| 5 | +**Live:** [algo-ipfs.surge.sh](https://algo-ipfs.surge.sh/) |
| 6 | + |
| 7 | +## How it works |
| 8 | + |
| 9 | +1. On load, queries the AlgoNode **indexer** for all transactions sent by the demo address (hardcoded as a TestNet account in `src/components/Algorand.vue`). |
| 10 | +2. Decodes each transaction's note field into `{ filename, cid }`. |
| 11 | +3. Renders the list with links to: |
| 12 | + - **IPFS gateway** (`ipfs.io`) — to fetch the file content |
| 13 | + - **Lora explorer** (`lora.algokit.io`) — to inspect the on-chain transaction |
| 14 | + |
| 15 | +The encrypted file in the list (`algorand_white_paper.pdf`) is downloadable but its contents are AES-encrypted — you need the CLI in the parent repo with the matching `ENCRYPTION_PASSWORD` to decrypt. |
| 16 | + |
| 17 | +## Stack |
| 18 | + |
| 19 | +- Vue 2.7 + Vue CLI 5 |
| 20 | +- `algosdk` v2 (browser indexer client) |
| 21 | +- AlgoNode public indexer — no API key needed |
| 22 | +- Deployed as static SPA on [Surge](https://surge.sh) |
| 23 | + |
| 24 | +## Run locally |
| 25 | + |
| 26 | +```bash |
5 | 27 | npm install |
| 28 | +npm run serve # dev server with hot reload on :8080 |
| 29 | +npm run build # production bundle to dist/ |
| 30 | +npm run lint |
6 | 31 | ``` |
7 | 32 |
|
8 | | -### Compiles and hot-reloads for development |
9 | | -``` |
10 | | -npm run serve |
11 | | -``` |
| 33 | +## Deploy |
12 | 34 |
|
13 | | -### Compiles and minifies for production |
14 | | -``` |
| 35 | +```bash |
15 | 36 | npm run build |
| 37 | +npx surge dist algo-ipfs.surge.sh |
16 | 38 | ``` |
17 | 39 |
|
18 | | -### Lints and fixes files |
19 | | -``` |
20 | | -npm run lint |
21 | | -``` |
| 40 | +## Configuration |
| 41 | + |
| 42 | +The AlgoNode endpoint and demo address live in `src/components/Algorand.vue`. To point at MainNet or a different account, edit the constants at the top of that file. |
| 43 | + |
| 44 | +## Why Vue 2 |
22 | 45 |
|
23 | | -### Customize configuration |
24 | | -See [Configuration Reference](https://cli.vuejs.org/config/). |
| 46 | +The original 2020 project was Vue 2. The 2026 migration kept Vue 2.7 (the LTS final of the v2 line) rather than rewriting in Vue 3 — same component code works under Vue CLI 5 on modern Node, with much smaller diff. Vue 3 + Vite would be a sensible next refactor if anyone wants it. |
0 commit comments