npm i @unlock-protocol/ui


Ʉnlock is a protocol for memberships built on a blockchain.

by unlock-protocol

0.2.1 (see all)TypeScript:Built-In
npm i @unlock-protocol/ui

Unlock 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


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, but against the Goerli test network.


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

The code

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

# get the code
git clone https://github.com/unlock-protocol/unlock
cd unlock

You'll need yarn installed globally.

# install all dependencies (...may take a while)

Build all packages:

yarn build

To execute commands inside the repo, we use the pattern yarn workspace <workspace name> <command>

# build the contracts
yarn workspace @unlock-protocol/smart-contracts build

# validate lint for paywall
yarn workspace @unlock-protocol/paywall lint

# etc.

The protocol

You can run a local version of the protocol using Docker.

cd docker && docker-compose up --build

This will create the required infrastructure (database, local ethereum test network, subgraph...) and start core services such as the Locksmith API and a Wedlocks mailing service for debug purposes.

NB: config is defined in both docker-compose.yml and docker-compose.override.yml.

Deploy and provision the contracts

The following script will deploy the contracts, create some dummy locks and send you some local tokens for development.

cd docker
docker-compose exec eth-node yarn provision

Run one of the app

The main dashboard lives in the unlock-app folder of this repo.

To launch it locally:

# install deps

# start Unlock main app
yarn workspace @unlock-protocol/unlock-app start

This will start

  • http://localhost:3000/locks to start using the application and deploy locks locally.
  • http://localhost:3002 our static landing page site.

Config and environment variables

If you run the app locally on your machine, you will have to create a file called .env.dev.local at the root of the repo, containing variables for the different apps :

# your wallet address to the first line
ETHEREUM_ADDRESS=<your ethereum address>

# the ETH node

# core service URLs

# other optional services

# deployment

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 interact with the application using your regular setup.

NB: The environments config files for the infrastructure are located inside the ./docker folder.

Thank you

BrowserStack Logo

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

Thank you to all the Members of our lock as well! You can easily join this list by clicking on the ❤️ Sponsor button (it's free!) at the top of this page too.


No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

No reviews found
Be the first to rate