Skip to content

ovrclk/lunie-light

 
 

Repository files navigation

Lunie Light (Beta)

Hello! 👋 Welcome to the Lunie Light Beta repo.

Lunie Light is a staking interface for proof-of-stake blockchains in the Cosmos ecosystem — built for speed, simplicity, and ease-of-use.

Lunie Light uses Nuxt.js, and relies on the REST API of a Cosmos node for data.

Lunie Light will work with the Keplr Browser Extension and the Ledger Nano. Local key management should only be used for testing and development purposes.

Features:

  • ✅ Super simple — one config file
  • 🏎 Fast, modern web technologies
  • 📱 Fully responsive
  • ⛓ Real-time on-chain data
  • 🔭 Explore mode
  • 💸 Multi-denom balances support
  • 🥩 Staking and unstaking management
  • 💯 Complete validator list with instant search
  • 🤗 Validator profiles for every validator
  • 🧾 Transaction history

Getting started

  1. Edit the networks.js config file with the relevant details for your project
  2. Run yarn install to install the app dependencies
  3. Run yarn dev to serve the app at localhost:3000

CORS

If the node you want to connect to doesn't have CORS enabled, you can't use it with the application. In this case use a CORS proxy (only in development) i.e. https://cors-anywhere.herokuapp.com/.

How on-chain data works

On-chain data is managed using the Vuex store. Understanding how Vuex works will be helpful for manipulating data in Lunie Light.

How data flows through Lunie Light

  1. Middleware in the default.vue file will call data/init to initialize the connection the Cosmos REST API before any pages are rendered. If the API is not initialized, requests will fail and data will not flow 🏄‍♂️
  2. Mutations and Actions are stored in the data.js file which manages the Vuex store and API requests
  3. Actions in data.js will call query functions in the cosmos-source.js file.
  4. Reducers in cosmos-reducers.js parse the responses from the API into a format that is easy for frontend Vue components to understand and work with

Customizing for your chain

Lunie Light will work out of the box with Cosmos-SDK v0.40 assuming there are no missing modules or modifications.

Check the /apis folder for the files responsible for mapping chain data to the Lunie frontend. There are deprecated Cosmos-SDK v0.39 files there for your convenience.

It is recommended that you manually go through the UI and check which requests are throwing errors. You should also manually test all functions and actions to make sure everything works as expected on your chain.

If your chain is missing modules or you have changed the Cosmos data model you will have to update the source and reducer files to accomodate these changes.

How to deploy

On Netlify

  1. Add your forked 🍴 repo
  2. Go to "Site Settings" > "Build & Deploy" > "Edit Settings"
  3. Set the build command to yarn generate
  4. Set the publish directory to dist

Deploy to Netlify

Using Docker

Running the container: You can run the image using make run, or the below:

docker run -it --rm -e PORT=8080 -e NODE_ENV=production -p 8080:8080 ovrclk/lunie-lite

You can access the applicaiton on http://localhost:8080

Building the image: The simplest way you can build a container is using Buildpacks, after you install Buildpacks, run make image or the below:

pack build ovrclk/lunie-lite --builder heroku/buildpacks:18

Thank you kindly!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 58.9%
  • JavaScript 39.2%
  • CSS 1.8%
  • Makefile 0.1%