Setup Guide

Development Setup

Get your development environment ready to contribute to LaserEyes. Follow this guide to set up your workspace and start building.

Prerequisites

Required Tools

  • Node.js
    Version 18 or higher
  • pnpm
    Package manager
  • Git
    Version control
  • VS Code
    Recommended editor

Knowledge Prerequisites

  • TypeScript
    Core language
  • React
    For components
  • Bitcoin
    Basic concepts
  • Testing
    Jest & RTL

Repository Setup

Fork & Clone

# Clone your fork
git clone https://github.com/YOUR_USERNAME/lasereyes.git

# Navigate to the project
cd lasereyes

# Add upstream remote
git remote add upstream https://github.com/omnisat/lasereyes.git

Install Dependencies

pnpm install

This will install all dependencies for the monorepo packages.

Project Structure

Monorepo Layout

lasereyes/
├── packages/
│   ├── core/                 # Core functionality
│   ├── react/                # React integration
│   ├── datasources/          # DataSource implementations
│   │   ├── maestro/          # Maestro DataSource
│   │   ├── sandshrew/        # Sandshrew DataSource
│   │   └── mempool-space/    # Mempool.space DataSource
│   └── utils/                # Shared utilities
├── examples/                 # Example applications
├── docs/                     # Documentation
├── scripts/                  # Build scripts
├── tests/                    # Test suites
└── package.json             # Root package.json

Development Workflow

Build & Watch

# Build all packages
pnpm build

# Watch mode
pnpm dev

Testing

# Run all tests
pnpm test

# Test specific package
pnpm test --filter=@omnisat/lasereyes-core

# Watch mode
pnpm test:watch

Testing Environment

API Keys Setup

# .env.local
MAESTRO_API_KEY=test_key_123
SANDSHREW_API_KEY=test_key_456
Never commit API keys to the repository

Test Networks

  • • Bitcoin Testnet for integration testing
  • • Regtest for local development
  • • Mock DataSources for unit testing

Troubleshooting

Common Issues

  • Clean and rebuild:
    pnpm clean && pnpm install && pnpm build
  • Check dependencies:
    pnpm why package-name
  • Node.js version: Use version in .nvmrc
Need more help? Join our Discord or open a GitHub discussion