Skip to content

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

communityStats

Overview

Share important analytics you collect using Leto Analytics with your community! Easily showcase activity data for NFTs, webpages, and more with a static, public stats page (in descending order by view count).

Feel free to use this repo to make your own community stats page!

Screenshot 2023-10-16 at 12 25 50 PM

Getting Started

Follow the steps below to set up and run the commuityStats React App in development mode:

  1. Clone the Repository:

    git clone [https://github.com/galaxyxtwo/communityStats]
    cd [communityStats]
    
  2. Add your CIDs:

    This app has an example list of IPFS CIDs in src/app.js. Before launching your app, change these CIDs to the production CIDs that you want to display in the leaderboard.

Note: Only IPFS CIDs that have been accessed through the Leto IPFS Gateway will return a view count, called "numberAccessed.

  1. Run the Development Server:
    npm install
    npm start
    

After executing the above command, the react app should be running in development mode. Navigate to the specified local server address in your browser to view the website.

To run this application in the cloud, choose a hosting provider and then use a cloudflare worker for the api request. Check out the /worker code in this other example. /worker is Javascript code meant for a Cloudflare worker that processes api requests. /src is the front-end built with React.

Background

communityStats uses the Leto Analytics API to display a view count for each CID. To make it easy, steps are included to host the communityStats page on IPFS hosting provider, Spheron. This is an awesome IPFS hosting provider, but technically communityStats can be hosted on any cloud provider.

This repo is similar to the viewIpfsAnalytics example, but doesnt include an input box to add CIDs. This allows a developer or community to manage what data is added onto the community webpage.

Learn more about Leto by visiting the Leto docs!

About

Display CIDs and their corresponding "numberaccessed" view count

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages