Skip to content

zestyxyz/beacon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed Spatial Internet Graph Beacon

Adding the beacon will get your spatial web app discovered across a distributed network of spatial internet graphs.

Current Functionality

As of today, the beacon simply sends some basic metadata about the embedding app (name, description, and URL) to a specified relay endpoint for indexing.

Usage

To ensure the beacon picks up all the relevant information, make sure your setup resembles below:

JavaScript

import Beacon from 'sig-beacon'; // NPM
/* OR */
import Beacon from "https://cdn.jsdelivr.net/npm/sig-beacon@0.0.11/index.js"; // CDN

const beacon = new Beacon("<BASE_RELAY_URL>");
await beacon.signal();

Ensure the relay URL is valid and without subdirectories, e.g. https://relay.zesty.xyz/.

HTML

<html>
  <head>
    <meta name="description" content="<YOUR_APPLICATION_DESCRIPTION>">
    <meta name="application-name" content="<YOUR_APPLICATION_NAME>">
    <meta name="keywords" content="<comma,separated,keywords>">
    <meta property="og:url" content="<YOUR_APPLICATION_URL>">
    <meta property="og:image" content="<YOUR_APPLICATION_IMAGE>">
    <script src="your_script_with_beacon_code.js" type="module"></script>
    <!-- Any other tags in your page head -->
  </head>
  <body>
    <!-- The rest of your app -->
  </body>
</html>

About

Connect your spatial app to the spatial internet graph

Resources

Stars

Watchers

Forks

Packages

No packages published