Code Monkey home page Code Monkey logo

luksense's Introduction

LUKSense

LUKSense is a platform for buying, selling, and tracking licenses. Enriched with innovative features, LUKSense offers an all-in-one solution for license management. The platform operates on LUKSO network. The goal of LUKSense is making it as easy as possible for anyone to start using Web 3 solutions in the same way they use Web 2.

LUKSense Logo

Project Name

LUKSense

Creator

Hesam Sameri

LUKSO Build ๐Ÿ†™ #1 Hackathon winner

Demo dApp

Demo dApp is available at luksense.store

LSP8 contract used in the demo: 0x763b8a43321A6D45aFbADe24Ad398460F85820cf

Demo video

Demo video is available at youtu.be/UyaAmd0jKNA

Features

  • A truly permissionless platform
    • No ban or removal is possible
  • Fast and rich search system
    • LSP4 metadata of licenses are indexed in Elasticsearch for best search experience
  • Built-in customizable gamification
    • Users earn trophies for certain actions and prestige for good behavior
  • Advanced caching (i.e. Web 3 as fast as Web 2)
    • Smart contact data is cached in a local Postgresql for faster retrieval
  • Built on top of LUKSO standards
    • LUKSense makes use of and is compatible with several LUKSO LSPs

Debian/Ubuntu Setup

This installation manual assumes you have a freshly installed minimal OS. This is tested on Ubuntu 20.04. Slight changes in the commands might be needed for other Debian-based systems. Don't forget to run all commands as a superuser (root).

Pre-configuration

apt update
apt upgrade -y
apt install wget curl ca-certificates apt-transport-https -y
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-8.x.list
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
apt update

Install

apt install postgresql postgresql-contrib elasticsearch redis nodejs -y

Elasticsearch prints some post-installation info. Make sure to write down the generated password for the elastic built-in superuser. By the way, you can reset that password any time by issuing:

/path/to/elasticsearch-reset-password -u elastic

Configure

Configure Elasticsearch as a service for easier management:

systemctl daemon-reload
systemctl enable elasticsearch.service
systemctl start elasticsearch.service

Make sure pg_config is in PATH environment variable. Switch to postgres user to be able to access psql on command line. Run psql and create mainnet and testnet databases. Create tables by importing schema.sql:

psql mainnet < schema.sql
psql testnet < schema.sql

Check and edit config.sql. Make sure all 'MUST_CHANGE_THIS' strings are changed. Also make sure storage_location path exists for both environments. Run the queries for both mainnet and testnet databases:

psql mainnet < config.sql
psql testnet < config.sql

You can select site_env in app.py and change it at anytime later.

Edit /etc/postgresql/14/main/pg_hba.conf and grant access to your OS user.

Make a virtual environment and activate it:

python3 -m venv venv
source venv/bin/activate

Install helper packages for building requirements (run as root):

apt install build-essential libpq-dev python3-dev postgresql-server-dev-all -y

Install requirements:

pip3 install -r requirements.txt

Run index_setup.txt in Kibana dev tools or issue a corresponding curl command directly to Elasticsearch.

Install required npm packages in lukso and lukso/api directories. Edit lukso/lsp8.js as desired and run it once to have an LSP8 contract. Rename lukso/sample_config.json to lukso/config.json and fill in the empty values. Finally, in lukso/api/ directory, create a sqlite database named api.db and import api.sql.

Run

All four components below must be running together, otherwise you'll face problems.

Python Web App

gunicorn -t 300 --log-level debug --workers 4 --bind 127.0.0.1:9000 app:app

Celery Backround

celery -A app.celery worker -E -l INFO

LUKSO Event Listener

cd lukso
watch -n 60 node event.js

Internal API

cd lukso/api
node index.js

Self-governing System

LUKSense comes with a built-in self-governing system. It prevents spam and rewards good behavior. More info will be available here soon.

Upcoming Features

Here is a list of WIP and upcoming features:

  • Script for easy installation / Docker image
  • DAO (replacing current self-governance)

luksense's People

Contributors

h-sameri avatar

Watchers

 avatar

Forkers

alllukso

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.