# The Index - Metadata search system for IPFS hashes

**URL:** <https://discuss.ipfs.tech/t/the-index-metadata-search-system-for-ipfs-hashes/169>\
**Category:** Help\
**Created:** [April 25, 2017, 7:17pm UTC](https://discuss.ipfs.tech/t/the-index-metadata-search-system-for-ipfs-hashes/169 "2017-04-25T19:17:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cakenggt](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@cakenggt](https://discuss.ipfs.tech/u/cakenggt)\
**Post date:** [April 25, 2017, 7:17pm UTC](https://discuss.ipfs.tech/t/the-index-metadata-search-system-for-ipfs-hashes/169/1 "2017-04-25T19:17:20Z")

</div>

If anyone was familiar with The Foundation, it was an IPFS hosted app that I wrote a while ago that allowed you to write descriptions of, and classify, IPFS hashes, upload those, and then have other users search for them so that we could have some sort of organized meta-directory of interesting files. It’s main problem was that it relied on a central server to store the information. I rewrote it once I read about pubsub and realized we could use that for the same purpose, but without having to rely on any outside servers.

What can you do with The Index? You can search file names and descriptions for the stuff you want, and can also upload those files that aren’t already in the app. Syncing should be automatic, so as soon as you add a file, all other online users will be able to find it as well.

Before you start using it, you have to do some configuration on your IPFS daemon. Run the following commands to allow the app to communicate with your daemon.

```
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"*\"]"
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials "[\"true\"]"
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "[\"PUT\", \"POST\", \"GET\"]"

```

Then start up your daemon using the following command to enable pubsub

```
ipfs daemon --enable-pubsub-experiment

```

Now navigate to either of the following addresses. The IPNS one might be updated in the future, but the IPFS address will last forever.

[http://localhost:8080/ipns/QmPZHE9MgGVvoshoFoHeigkZeHPMKdbDJsCQKtEJtjNqoZ](http://localhost:8080/ipns/QmPZHE9MgGVvoshoFoHeigkZeHPMKdbDJsCQKtEJtjNqoZ) [http://localhost:8080/ipfs/QmXny7UjYEiFXskWr5Un6p5DMZPU87yzdmC3VEQcCx9xBC](http://localhost:8080/ipfs/QmXny7UjYEiFXskWr5Un6p5DMZPU87yzdmC3VEQcCx9xBC)

You should be able to do a search and find the IPFS Readme as an initial file in The Index.

## How does it work?

I made the simplest [CDRT](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type) possible, one that allows only adds. When the app starts up, it asks through the pubsub connection all other active apps for data. It then gathers all of their responses (which are in the form of IPFS hashes of their own databases), gets all of those database files, and adds whatever entries it doesn’t already have to it’s own database. At the end, it publishes it’s own database again so that everyone else can get the most up to date database. This doesn’t rely on a central server, only on other databases being online at the same time, so it’s generally a good idea for you to leave your daemon running and the app on in the background so you can get up to date index files and share yours with others.

---

<div class="post-metadata">

**Author:** ![tjayrush](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/tjayrush/32/52_2.png) [@tjayrush](https://discuss.ipfs.tech/u/tjayrush)\
**Post date:** [May 5, 2017, 9:21pm UTC](https://discuss.ipfs.tech/t/the-index-metadata-search-system-for-ipfs-hashes/169/2 "2017-05-05T21:21:34Z")

</div>

I’m new to the community, so please excuse me if this is off topic or not of particular interest.

Have you thought about storing this type of info in an Ethereum smart contract? I’m coming from the Ethereum world, and over there, there is a huge amount of talk of solving certain problems (such as data storage) using IPFS. Is there a likewise interest in (or use of) Ethereum to solve problems from the IPFS perspective?

---

<div class="post-metadata">

**Author:** ![Katamori](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/katamori/32/75_2.png) [@Katamori](https://discuss.ipfs.tech/u/Katamori)\
**Post date:** [May 19, 2017, 2:13pm UTC](https://discuss.ipfs.tech/t/the-index-metadata-search-system-for-ipfs-hashes/169/3 "2017-05-19T14:13:58Z")

</div>

Do you have a public Github repo, ar any source code access for this project? Look pretty damn amazing!

---

<div class="post-metadata">

**Author:** ![flyingzumwalt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flyingzumwalt/32/12_2.png) [@flyingzumwalt](https://discuss.ipfs.tech/u/flyingzumwalt)\
**Post date:** [May 20, 2017, 3:42am UTC](https://discuss.ipfs.tech/t/the-index-metadata-search-system-for-ipfs-hashes/169/4 "2017-05-20T03:42:09Z")

</div>

Also see [this other discussion about CRDTs](https://discuss.ipfs.tech/t/persistent-p2p-serverless-multi-party-shared-indexing-capability/241)

I added some links to reference info there:

> [@Persistent P2P Serverless Multi-Party Shared Indexing Capability](https://discuss.ipfs.tech/t/persistent-p2p-serverless-multi-party-shared-indexing-capability/241/3):
>
> If you want to dig deep into these topics I recommend checking out the reference info in these repositories: About pubsub: [https://github.com/libp2p/research-pubsub/](https://github.com/libp2p/research-pubsub/) includes a [call for lit review materials](https://github.com/libp2p/research-pubsub/issues/4) that recommends reading this article for a “very comprehensive overview”: [http://dl.acm.org/citation.cfm?id=2543583](http://dl.acm.org/citation.cfm?id=2543583) About CRDTs: [https://github.com/ipfs/research-CRDT](https://github.com/ipfs/research-CRDT)

and this

> [@Persistent P2P Serverless Multi-Party Shared Indexing Capability](https://discuss.ipfs.tech/t/persistent-p2p-serverless-multi-party-shared-indexing-capability/241/4):
>
> Also @pgte is working on y-ipfs-connector, which uses [yjs](https://github.com/y-js/yjs) to put CRDTs on IPFS pubsub. This is very new work – @pgte has only had a few days to work on it so far but here is a quick demo of it in action: [https://www.youtube.com/watch?v=8xE1MEyZsbo](https://www.youtube.com/watch?v=8xE1MEyZsbo). You might want to follow the work @daviddias and I are doing with @edsilv and @aescylus for the [IIIF](http://iiif.io) (International Image Interoperability Framework) [conference in June](http://iiif.io/event/2017/vatican/), our goal is to use Dynamic Content over IPFS to synchronise IIIF document annota…

---

<div class="post-metadata">

**Author:** ![cakenggt](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@cakenggt](https://discuss.ipfs.tech/u/cakenggt)\
**Post date:** [May 22, 2017, 11:50am UTC](https://discuss.ipfs.tech/t/the-index-metadata-search-system-for-ipfs-hashes/169/5 "2017-05-22T11:50:23Z")

</div>

I’ve got a github repo here: [https://github.com/cakenggt/ipfs-foundation-frontend](https://github.com/cakenggt/ipfs-foundation-frontend). Even though it is called ‘frontend’, it is actually the entire codebase.
