• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    JavaScript
  • License
    Other
  • Created almost 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🏛️ Decentraland's LAND Marketplace

Marketplace

Decentraland's LAND Marketplace

Running the project

The core technologies of the marketplace are:

Once those dependencies are installed you can configure each part of the project.

The backend lives on the /src folder and the front on the /webapp folder.

Keep in mind that both sides use dotenv via decentraland-commons to configure the environment. As such, you'll need to create your own .env files, following the .env.examples located on each folder.

First of all, you'll need to run npm install on both directories. Once that's done, you can move to configuring each part:

Back-end

  • Creating the DB user
    Create a PostgreSQL named marketplace. You can do it running $ createuser marketplace on the terminal or by running the query CREATE USER marketplace;
  • Creating the database
    You'll need to create a marketplace database. You can do it running $ createdb -O marketplace marketplace on the terminal or by running the query CREATE DATABASE marketplace OWNER marketplace;. You can create a marketplace_test database if you want to run tests against it.
  • Adding the .env files
    Create a .env file on the /src folder and fill it following the .env.example file found there. You can skip most variables as they have a default value. There are some notable exceptions like CONNECTION_STRING which might look something like CONNECTION_STRING="postgres://localhost:5432/marketplace"
  • Migrate the database
    Once you have your database you can go ahead and run the database migrations. To do it, simply run npm run migrate up. We use node-pg-migrate behind the scenes and every argument after migrate will be forwarded to it. You environment will be picked up automatically from the /src/.env file, but you can override the CONNECTION_STRING by explicitly adding it like this CONNECTION_STRING='' npm run migrate up
  • Running the initialize script
    Just run npm run init-db. Once it finishes seeding the database, the script will prompt you to add the latest data from the Blockchain to the database. You'll need to have a Ethereum node for this to work (see below). If you want to run that later, you can use npm run renew-blockchain-data.
  • Running an Ethereum node
    If you want to be able to get data from the Ethereum blockchain, you'll need to have a node running on http://localhost:8545. You can use Parity, geth, etc.
  • Running the server
    To run the server, go to the /src folder and run the server.js script like this babel-node server.js
  • Run watchers
    If you want to keep your database up-to-date with the blockchain, you need to run this watcher: npm run monitor-blockchain. Keep in mind that the address you use for each contract will determine the network. For more information in event watching, check here.

If you don't want to install babel-node globally, you can use npx and install it locally.

Front-end

  • Adding the .env files
    Create an .env file on the /webapp folder and fill it following the .env.example file found there. You will need to specify NODE_PATH to be src/, REACT_APP_API_URL to be http://localhost:5000/v1 (unless you changed the default server configuration, if so point to the right host:port) and REACT_APP_MANA_TOKEN_CONTRACT_ADDRESS to Ropsten's MANAToken address: 0x2a8fd99c19271f4f04b1b7b9c4f7cf264b626edb.
  • Running the front-end
    You will need to first have the server running (see above). After that just jump into the webapp folder $ cd webapp and start the local development $ npm start

Shared code

There's a /shared directory where some of the logic shared between backend and frontend lives (i.e. everything related to rendering the map). We have symlinks that point to this directory from the src directories of the server and the UI (src/shared and webapp/src/shared). This symlinks have been versioned in this repo, but if for some reason they don't work (Windows?) you will need to recreate them in order to npm start or npm build this project.

Tests

To run the backend tests simply run npm run test or npm run watch:test. You'll need to create your own .env file for the /specs file mimicking the .env.example file that's in there. We do this so you can for example use a dedicated database CONNECTION_STRING="postgres://localhost:5432/marketplace_test". Remember that if you're using a test database, you'll need to migrate it. You can run CONNECTION_STRING="postgres://localhost:5432/marketplace_test" npm run migrate up to do so.

Migrations

To keep your database up to date, you'll need to run npm run migrate up each time a new migration is introduced. Your database version lives on the pgmigrations. Check node-pg-migrate for more info.

Seed

If you need some test data to test the marketplace, you can use the seed for quick features. Run npm run seed generate MODEL_NAME -- --amount NUMBER, (which will look something like this npm run seed generate Publication -- --amount 2) and follow the prompts

Translate

You can translate automatically from English to the other locales by running the command npm run translate, this command will compare all the other locales to en.json and if it finds any missing translation it will use Google Translate to add it to the corresponding locale.

API

We have documentation for our HTTP API that can be found here.

More Repositories

1

marketplace

🏛️ Decentraland's NFT Marketplace
TypeScript
1,025
star
2

dappeteer

🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
CSS
240
star
3

ui

🦄 Decentraland UI
TypeScript
204
star
4

marketplace-contracts

🔖 Decentraland Marketplace Contracts
JavaScript
158
star
5

mana

⏣ Solidity Contracts for the Decentraland MANA Token
Solidity
148
star
6

builder

🍉 Build scenes for Decentraland
TypeScript
144
star
7

unity-renderer

Unity implementation of Decentraland Client
C#
137
star
8

land

⛰ Contract for LAND
Solidity
117
star
9

districts

Proposals for Community Districts for the Terraform event
115
star
10

decentraland-dapps

🛠 Common modules for dApps
TypeScript
108
star
11

bronzeage-node

DEPRECATED: This codebase will not be mantained anymore, and formats are going to change when we move to the Decentraland Iron Age
JavaScript
104
star
12

erc721

📜 Distinguishable Assets Registry (ERC 721)
JavaScript
94
star
13

avatar-assets

👔 Collection of 3D models for Decentraland avatars
TypeScript
85
star
14

explorer

🌎 Explore Decentraland from a web browser
TypeScript
79
star
15

cli

💻 Decentraland command-line interface
TypeScript
67
star
16

wearables-contracts

📜 🎭 Set of Wearables NFT contracts
JavaScript
62
star
17

ethalarm

⏰ Get notifications whenever an Ethereum smart contract triggers an event.
JavaScript
57
star
18

bronzeage-editor

DEPRECATED: Unity editor and browser for Decentraland Bronze Age
C#
57
star
19

editor-legacy

📝 Collaborative real-time edition of parcel scenes, with IPFS uploading. Based on aframe-inspector
JavaScript
54
star
20

catalyst

🐧 Content server for Decentraland
TypeScript
52
star
21

governance

🏢 Governance platform of the Decentraland DAO
TypeScript
45
star
22

proposals

Review of community proposals for Decentraland's art and applications
45
star
23

eth-connect

🔌 Ethereum connector for Decentraland scenes and applications
TypeScript
43
star
24

old-documentation

📖 What is Decentraland?
HTML
41
star
25

js-sdk-toolchain

Toolchain to build JS & TS scenes for Decentraland
TypeScript
37
star
26

explorer-desktop

Desktop client for Decentraland, coming soon
C#
35
star
27

sample-scenes

🏗 Examples of different experiences built for Decentraland
32
star
28

decentraland-ecs-utils

TypeScript
32
star
29

stoneage-browser

🥉 Browser for Decentraland Stone Age
JavaScript
32
star
30

auction

🌅 Source code for Decentraland's Terraform Auction
JavaScript
31
star
31

webrtc-broker

🔌WebRTC message broker
Go
25
star
32

ipfs-node

💽 A proxy to connect to the IPFS network
JavaScript
24
star
33

contracts

📝 Decentraland contract addresses
HTML
24
star
34

architecture

This repository aims to have the main Decentraland Architecture
Makefile
22
star
35

stoneage-node

Node for Decentraland Stone Age
JavaScript
22
star
36

builder-server

Builder app backend
TypeScript
21
star
37

adr

Architecture Decisions Records
SCSS
21
star
38

kernel-legacy

🌎 Explore Decentraland from a web browser
TypeScript
20
star
39

smart-items

💡Smart item examples
TypeScript
19
star
40

atlas-server

🗺 A server for the atlas map
TypeScript
19
star
41

kernel

Kernel is the glue code between the OS, comms and the Renderer of Decentraland
TypeScript
19
star
42

builder-assets

🎲 Builder asset packs
TypeScript
18
star
43

nft-server

NFT Server
TypeScript
18
star
44

issues

Main entry point for user's feedback
17
star
45

decentraland-commons

🛠 Set of common functionality across Decentraland projects.
TypeScript
17
star
46

dapp-boilerplate

Decentraland's ÐApps Boilerplate
JavaScript
17
star
47

decentraland-l2-utils

TypeScript
17
star
48

decentraland-npc-utils

NPC tools for conversational NPCs
TypeScript
16
star
49

agora

📝Agora is an off-chain governance tool for decentralized communities.
TypeScript
16
star
50

decentraland-ui-utils

TypeScript
16
star
51

decentraland-eth

DEPRECATED - Ethereum common helpers for Decentraland
TypeScript
15
star
52

ecs-reference

ECS API Reference
JavaScript
15
star
53

nft-schema

Open API Specification for the NFT APIs
TypeScript
13
star
54

explorer-desktop-launcher

TypeScript
13
star
55

decentraland-gatsby

Opinionated All-in-one Web Framework
TypeScript
11
star
56

decentraland-crypto-utils

TypeScript
11
star
57

MANA-community-fund-learning-content

Offer bounties in MANA to developers that create educational content: tutorials & scene samples
TypeScript
11
star
58

catalyst-owner

Everything necessary for catalyst owners to deploy their own node
Shell
11
star
59

avatars-contract

Avatars smart contract
Solidity
11
star
60

l2-airdrop

Collection of command line tools to do massive Airdrops of Decentraland Wearables on Matic
TypeScript
10
star
61

documentation

Mathematica
9
star
62

gate

🚪 Manage invitations to access the client
JavaScript
9
star
63

sdk7-goerli-plaza

TypeScript
9
star
64

sdk7-scene-template

ECS 7 Template
TypeScript
9
star
65

godot-explorer

Rust
9
star
66

bid-contract

JavaScript
8
star
67

unity-explorer

JavaScript
8
star
68

rentals-contract

TypeScript
8
star
69

tile-map

🗺 Tile Map
TypeScript
8
star
70

land-auction

Contracts for the LAND auction
Solidity
8
star
71

catalyst-client

A client to query and perform changes on Decentraland's catalyst servers
TypeScript
7
star
72

matrix-client

📡 Interact with Decentraland's users, send private messages and add friends.
TypeScript
7
star
73

explorer-website

This is the repository for the website served in play.decentraland.org
TypeScript
7
star
74

rendezvous

📞 WebRTC Signalling Server that uses Server-Sent Events
JavaScript
7
star
75

decentraland-connect

Connect your Ethereum wallet from different providers
TypeScript
7
star
76

collections-graph

🎽 Decentraland Collections Graph
TypeScript
7
star
77

decentraland-server

Set of common functionality accross Decentraland projects servers
TypeScript
6
star
78

canilla

🚰 Faucet for all things related to Decentraland
JavaScript
6
star
79

catalyst-api-specs

API definition for the Catalyst Server implementation
TypeScript
6
star
80

web

Decentraland websites
CSS
6
star
81

transactions-server

Proxy server that relays transactions to Biconomy, using some restrictions
TypeScript
6
star
82

wearable-preview

Render an interactive preview of a wearable
TypeScript
6
star
83

protocol

Shell
6
star
84

rpc-rust

Decentraland RPC - Rust implementation
Rust
6
star
85

events

This website hosts a dApp used to upload and see what others are organizing inside the Decentraland virtual world.
TypeScript
6
star
86

decentraland-rpc

📡 Sandboxed code execution + Plugins + JSON-RPC engine
TypeScript
6
star
87

standards

📜 At Decentraland, we put a lot of effort into improving both the Software itself and the Software Process. The pillars of the Software Process are the standards we define to organize our work.
6
star
88

bevy-explorer

Rust
5
star
89

hammurabi

Repository to host the reference implementation made in Babylon.js by the Protocol Squad
TypeScript
5
star
90

schemas

Common schemas for Decentraland
TypeScript
5
star
91

decentraland-crypto-fetch

TypeScript
5
star
92

smart-contract-audits

Smart Contract Audit Reports
5
star
93

avatar-asset-test-tool

👚 Tools to help testing wearables for Decentraland
TypeScript
5
star
94

dcl-sprites

Helper functions to create sprites using Decentraland's SDK
TypeScript
5
star
95

decentraland-crypto-middleware

A multi framework middleware to authenticate request signed with @decentraland/SignedFetch
TypeScript
5
star
96

decentraland-transactions

Create transactions to be relayed
TypeScript
5
star
97

vr-client

5
star
98

tap-decentraland-thegraph

Exports data from Decentraland's subgraphs at https://thegraph.com/
Python
5
star
99

whitelist-sale

Contract for the Whitelist sale for Decentraland
JavaScript
4
star
100

voting

🗳ERC-20 Based Off-chain Voting
JavaScript
4
star