/web3-web-app

Create and monetize composable discovery engines. ๐Ÿš€

Primary LanguageTypeScript

Create and monetize interoperable discovery engines. ๐Ÿš€

About Index Network

Index Network allows creators to make contextual discovery engines from their information. It enables data-ownership, collaboration, and monetization to form discovery ecosystem as a network. It cultivates greater participation in decentralized discovery and creates diverse and inclusive ecosystem.

We use NFTs as creator roles for broader contexts with large groups. Index is useful for creatorsโ€‹, communities, DAOs, brands, curators, researchers, enthusiasts.

Table of contents

  1. Features
  2. Examples
  3. Architecture overview
  4. Components
  5. Getting started
  6. Contributing
  7. Credits
  8. Resources
  9. License

Features

  • Interoperable Indexes: Create an index by adding any relevant contents to the topic.
  • Search: Transform indexes into refined search engines.
  • Collaboration: Use NFTs as creator roles to enable broader contexts with large groups. (Granted by LIT Protocol)
  • Creator Monetization: Utilize membership NFTs to earn revenue with complete autonomy.
  • Launch Mainnet
  • Enable 3rd-party Algorithms: Integrate with the LLMs, search algorithms.
  • Integrations (eg. zapier)
  • Token curated indexes
  • Creator Monetization (private indexes)
  • New Schemas: Expand the supported schemas:
    • Links
    • Videos
    • Products
    • NFTs
    • Events
    • Articles
  • Schema-based custom filters: Filtering capabilities tailored for the new schemas
  • Bundling: Allowing users to bundle multiple indexes together.
  • Composable Queries: Query multiple indexes together w/o natural language.

Examples

!TODO

Architecture Overview

Dataflow

Components

Web App

The Web App repository is where you can find the code for the index.as web application. The web app provides a user-friendly interface that allows creators to make discovery engines, manage their content, and configure them.

Indexer

The API repository hosts the code for the index.as backend. It acts as the backbone of the tool, providing the necessary methods to consume data from Ceramic, with PostgreSQL indexing. Uses Debezium to produce Apache Kafka and finally consumes to Elasticsearch by running yarn kafka-consumer

API

The API repository also hosts the code for search and metadata endpoints. To start, you can simply run yarn api

Ceramic Network Node

ComposeDB on Ceramic is a composable graph database built for Web3. Here you can find the steps to deploy along with an IPFS Node: https://composedb.js.org/docs/0.5.x/guides/composedb-server

We built four different schemas to store information on Ceramic:

IPFS Node

ComposeDB on Ceramic is a composable graph database built for Web3. Here you can find the steps to deploy along with an IPFS Node: https://composedb.js.org/docs/0.5.x/guides/composedb-server

Others

We use PostgreSQL indexing feature of Ceramic Network and use KafkaConnect CDC to produce db changes to Apache Kafka and finally write data to Elasticsearch via the consumer service.

Getting started

Indexes are ComposeDB documents that stores the main information of an Index. Currently all indexes are owned by LIT PKPs (Programmable Key Pair) to have NFT based access control options.

Initialize the ComposeDB Client

import { ComposeClient } from '@composedb/client'
import { DID } from 'dids'
import { Ed25519Provider } from 'key-did-provider-ed25519'
import { getResolver } from 'key-did-resolver'
import { fromString } from 'uint8arrays/from-string'

const CERAMIC_HOST = "https://ceramic-testnet.index.as"
const CERAMIC_ADMIN_KEY = "<YOUR_CERAMIC_ADMIN_KEY>"

const privateKey = fromString(CERAMIC_ADMIN_KEY, 'base16') 
const did = new DID({
  resolver: getResolver(),
  provider: new Ed25519Provider(privateKey),
})
await did.authenticate()

import { definition } from "indexas_definition.js";

const compose = new ComposeClient({ ceramic: CERAMIC_HOST, definition })
compose.setDID(did)

Create Index

const index = await compose.executeQuery(`
  mutation CreateIndex($input: CreateIndexInput!) {
    createIndex(input: $input) {
      document {
        id
        title
        collabAction
        pkpPublicKey
        createdAt
        updatedAt
      }
    }
  }
`,
{
    "i": {
      "content": {
        "did": "did:key:zQ3shviNesaR4tePLzV5dAe3VhyMxMkCu2jgwwKZ9fSCikQ8E", 
        "title": "My first index", 
        "collabAction": "QmSBSz4GFaEskvbcRdbJVMzwbe9K2yxWsDHPn8Yh29WLRG",
        "pkpPublicKey": "Your PKP Public Key",
        "created_at": "2023-06-27T00:00:00Z", 
        "updated_at": "2023-06-27T00:00:00Z", 
      }
    }
  }
);

Create a Link

const link = await compose.executeQuery(`
  mutation CreateLink($input: CreateLinkInput!) {
    createLink(input: $input) {
      document {
        id
        controllerDID{
          id
        }
        url
        title
        tags
        favicon
        createdAt
        updatedAt
        deletedAt
      }
    }
  }
`,
{
    "i": {
      "content": {
        "url": "https://testnet.index.as", 
        "title": "index.as", 
        "tags": ["no-code", "discovery tools"],
        "favicon": "https://testnet.index.as/favicon-white.png",
        "created_at": "2023-06-27T00:00:00Z", 
        "updated_at": "2023-06-27T00:00:00Z", 
      }
    }
  }
);

Associate created Link with the Index

const indexLink = await compose.executeQuery(`
  mutation CreateIndexLink($input: CreateIndexLinkInput!) {
    createIndexLink(input: $input) {
      document {
        id
        indexerDID {
          id
        }
        controllerDID {
          id
        }
        indexId
        linkId
        createdAt
        updatedAt
        deletedAt
        link {
          id
          controllerDID {
            id
          }
          title
          url
          favicon
          tags
          content
          createdAt
          updatedAt
          deletedAt
        }
      }
    }
  }
`,
{
    "i": {
      "content": {
        "indexId": index.id, 
        "linkId": link.id, 
        "indexerDID": did.id,
        "created_at": "2023-06-27T00:00:00Z", 
        "updated_at": "2023-06-27T00:00:00Z",
      }
    }
  }
);

Contributing

First of all, thanks for thinking of contributing to this project. : Before sending a Pull Request, please make sure that you're assigned the task on a GitHub issue.

  • If a relevant issue already exists, discuss on the issue and get it assigned to yourself on GitHub.
  • If no relevant issue exists, open a new issue and get it assigned to yourself on GitHub.

And join our community to get support, provide feedback, or just to say hello on...

Built with Open Protocols

Index.as leverages the power of several open protocols to enhance its capabilities:

  • Ceramic: Ceramic is a decentralized data network that brings unlimited data composability to Web3 applications. It enables Index.as to leverage the decentralized data network and utilize its features in building discovery engines.
  • Lit Protocol: Lit Protocol is a decentralized access control infrastructure designed to bring more utility to the web. Index.as integrates Lit Protocol to provide enhanced access control features, allowing creators to have fine-grained control over their data.
  • IPFS: IPFS (InterPlanetary File System) is a peer-to-peer hypermedia protocol designed to preserve and grow humanity's knowledge by making the web upgradeable, resilient, and more open. Index.as utilizes IPFS to store and distribute data, ensuring its availability and resilience.

Resources

  • index.as to explore the app.
  • Discord for support and discussions with the community and the team.
  • GitHub for source code, project board, issues, and pull requests.
  • Twitter for the latest updates on the product and published blogs.

License

index.as is under the MIT license. See the LICENSE for more information.