Giter Club home page Giter Club logo

unlock's Introduction

Unlock


This repository includes all the code deployed by Unlock, including smart contracts and the web app running at unlock-protocol.com.

Unlock is a membership protocol, built on a blockchain. It enables creators to monetize their content or software without relying on a middleman. It lets consumers manage all of their subscriptions in a consistent way, as well as earn discounts when they share the best content and applications they use.

Read more about why we're building Unlock.

License: MIT Build Status

Demo

We recorded a screencast to show how Unlock works for a paywall.

Demo Unlock

You can try Unlock using the Ethereum blockchain on our homepage.

We are building this in the open, which means you can also run the code locally (see instructions below). You can try out the staging version - which runs the latest, in-progress code - at https://staging.unlock-protocol.com. Finally, you can learn more on our documentation wiki.

Contributing

Thanks for your interest in contributing to Unlock! We're excited you're here. There are a variety of ways to contribute to the project. Please read more about contributing in our contributor guide. Please also check our code of conduct for all participants in our community.

Getting started

We use docker to run a set or containers which provide the required infrastructure.

  1. Check out the code from this repository

Unlock uses a mono repo which includes all the services and applications we develop.

git clone https://github.com/unlock-protocol/unlock
cd unlock
  1. Install all dependencies

This will install all dependencies required for all the Unlock components (smart contracts and react app).

npm ci
  1. Set up your environment variables

At the root of the repo, add a file names .env.dev.local which includes the following variables:

ETHEREUM_ADDRESS=<your ethereum address>
READ_ONLY_PROVIDER=http://localhost:8545
LOCKSMITH_URI=http://localhost:8080
WEDLOCKS_URI=http://localhost:1337
DASHBOARD_URL=http://localhost:3000
PAYWALL_URL=http://localhost:3001
PAYWALL_SCRIPT_URL=http://localhost:3001/static/paywall.min.js
UNLOCK_STATIC_URL=http://localhost:3002
UNLOCK_TICKETS_URL=http://0.0.0.0:3003
ERC20_CONTRACT_SYMBOL=DAI
ERC20_CONTRACT_ADDRESS=0x591AD9066603f5499d12fF4bC207e2f577448c46
BOOTSTRAP_AMOUNT=15.0
HTTP_PROVIDER_HOST=127.0.0.1
HTTP_PROVIDER_PORT=8545
LOCKSMITH_PURCHASER_ADDRESS=0xe29ec42f0b620b1c9a716f79a02e9dc5a5f5f98a

Make sure you change the value of ETHEREUM_ADDRESS to use your main Ethereum address (the one you use with your Metamask for example). This will let you interract with the application using your regular setup.

  1. Run the docker cluster.

Once docker has been installed on your machine, start the cluster:

$ cd docker && docker-compose -f docker-compose.development.yml up --build

This cluster includes all the required "infrastructure" to run our apps locally (mostly ganache, which is an ethereum dev node.) When starting this script does several things: deploys the unlock smart contract, transfers eth to your address, ... etc

  1. Run the app

This applies to any of our applications, but we'll take unlock-app as an example as it is our "main" dashboard:

cd unlock-app && npm run dev

Thank you

BrowserStack Logo

Thanks to BrowserStack for providing the infrastructure that allows us to test in real browsers.

unlock's People

Contributors

akeem avatar benwerd avatar cellog avatar chriscates avatar chrisvanpatten avatar cnasc avatar fulldecent avatar greenkeeper[bot] avatar hardlydifficult avatar julien51 avatar kphed avatar metjm avatar nfurfaro avatar philmod avatar renovate[bot] avatar rinoc avatar smombartz avatar swkidd avatar vikaskyadav avatar wawhal avatar xhw1 avatar

Watchers

 avatar

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.