Skip to content

InjectiveLabs/pdaas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌟 PDAAS

Perp Dex As A Service - Powered by Injective

✨ Features

🚀 Launch your own DEX in under 5 minutes - No coding required, just clone and run!

  • Modern and intuitive design - Beautiful, responsive UI that users will love
  • Complete customizability - Brand it your way, customize colors, logos, and features
  • Fully integrated with Injective's on-chain order book - Enterprise-grade trading infrastructure
  • No liquidity bootstrapping needed - Start trading immediately with existing on-chain liquidity
  • Earn 40% of all trading fees - Earn revenue from every trade on your DEX

📚 Getting Started

Prerequisites: These instructions assume you have Git installed.

This repository is self‑contained and vendors the shared injective-ui layer, so you can run it without fetching external layers.

🚀 One-Click Setup (Recommended)

Clone the repo and run the setup script - it handles everything automatically!

macOS / Linux:

git clone git@github.com:InjectiveLabs/pdaas.git
cd pdaas
./setup.sh

Then just run:

yarn dev

🎉 That's it! Your dev server will be running at http://127.0.0.1:3000

Other platforms and details

Windows (PowerShell):

git clone git@github.com:InjectiveLabs/pdaas.git
cd pdaas
.\setup.ps1

Alternative (if you already have Node.js installed):

git clone git@github.com:InjectiveLabs/pdaas.git
cd pdaas
npm run setup

The setup script will:

  • ✓ Check and install Node.js 20 (if needed)
  • ✓ Check and install Yarn Classic (if needed)
  • ✓ Copy .env.example to .env
  • ✓ Install all dependencies
  • ✓ Get you ready to code!

📖 Manual Setup (Advanced)

If you prefer to set things up manually or want more control:

Prerequisites

1. Install Node.js 20 LTS

First, check if you already have Node.js:

node --version

If you see a version number starting with v20.x.x, you're good! Skip to step 2.

If you see command not found or a different version, install Node.js 20 using one of these methods:

Method 1: Direct Download (easiest for beginners)
  1. Visit nodejs.org/download
  2. Download the LTS version 20.x installer for your operating system:
    • macOS: Download the .pkg file and run it
    • Windows: Download the .msi file and run it
    • Linux: Use your package manager or download the binary
  3. Follow the installation wizard (accept defaults)
  4. Verify installation:
    node --version
    # Should output: v20.x.x
    npm --version
    # Should output: 10.x.x (npm comes with Node.js)
Method 2: Using nvm (recommended for developers - macOS/Linux)

nvm lets you easily switch between Node.js versions.

  1. Install nvm:
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
  2. Close and reopen your terminal, then run:
    nvm install 20
    nvm use 20
  3. Verify:
    node --version
    # Should output: v20.x.x
Method 3: Using asdf (for multi-language version management)
# Install asdf first if you don't have it
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0

# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.zshrc

# Restart terminal, then install Node.js
asdf plugin add nodejs
asdf install nodejs 20
asdf local nodejs 20
Method 4: Using Volta (cross-platform version manager)
# Install Volta
curl https://get.volta.sh | bash

# Restart terminal, then install Node.js
volta install node@20

2. Install Yarn Classic (v1.22.22)

First, check if you already have Yarn:

yarn --version

If you see a version starting with 1.x.x, you're good! Skip to Installation.

If you see command not found or version 2.x/3.x/4.x, install Yarn Classic:

Method 1: Using Corepack (recommended - built into Node.js 16.9+)
# Enable Corepack
corepack enable

# Install Yarn 1.22.22
corepack prepare yarn@1.22.22 --activate

# Verify
yarn --version
# Should output: 1.22.22

Note: If corepack enable fails with permission errors, try sudo corepack enable (macOS/Linux) or run as Administrator (Windows).

Method 2: Using npm (if Corepack doesn't work)
# Install globally
npm install -g yarn@1.22.22

# Verify
yarn --version
# Should output: 1.22.22

Note: If you get permission errors on macOS/Linux, try sudo npm install -g yarn@1.22.22

Installation

  1. Clone the repository
git clone git@github.com:InjectiveLabs/pdaas.git
cd pdaas
  1. Install dependencies
yarn

Note: If you get yarn: command not found, go back to the Prerequisites section above and install Yarn.

  1. Copy environment variables template and configure for local development
cp .env.example .env

Edit .env and set your configuration. The vendored injective-ui layer is used by default (LOCAL_LAYER=true).

  1. Run the app locally
yarn dev

The dev server will start on http://127.0.0.1:3000 (configurable via PORT and HOST in .env).

Notes:

  • By default, the app uses the vendored injective-ui layer from this repo (faster, offline-capable).
  • To use the remote layer from GitHub instead, set LOCAL_LAYER=false in .env or run yarn dev:remote.
  • For security, the dev server binds to 127.0.0.1 (localhost-only). Use HOST=0.0.0.0 in .env if you need network access.

📖 Documentation

This project is built using Nuxt and TailwindCSS and is powered by the injective-ts monorepo. It vendors the shared injective-ui layer for a smooth, self‑contained local development experience while retaining upstream Injective compatibility.

You can run the app locally without having to set up a relayer. Use the public network in your VITE_NETWORK .env configuration variable and run yarn dev. You can find available networks (predefined endpoint sets) here. Using these endpoints (from the public network) gives 40% of trading fees to the community spend pool. Once you set up private endpoints, you can redirect that 40% to any address you wish.

Deployment & Nuxt3

Deployment

You can deploy this Nuxt 3 app using your preferred provider (Vercel, Netlify, Cloudflare Pages, or AWS S3/CloudFront). For static sites, use yarn generate; for server rendering, use nuxi build and your platform's adapter.

See the official Nuxt docs for deployment guides.

Nuxt3

This project runs on Nuxt 3. You shouldn't need any migration steps; just follow the Getting Started section above.


🔓 License

Copyright © 2021 - 2025 Injective Foundation (https://injectivelabs.org/)

Originally released by Injective Foundation under:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

 

Powering the future of decentralized finance.

About

perp dex as a service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published