Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:

Quick Start

1

Clone the repository

Clone the Deriverse repository to your local machine:
git clone https://github.com/your-org/deriverse.git
cd deriverse
2

Install dependencies

Install all required npm packages:
npm install
This will install:
  • Next.js 16 (App Router)
  • React 19
  • Supabase client
  • Solana Web3.js
  • Jupiter Wallet Adapter
  • TailwindCSS v4
  • And all other dependencies
3

Configure environment variables

Create a .env.local file in the project root with your configuration:
cp .env.example .env.local
See Environment Variables for detailed configuration.
4

Start the development server

Run the Next.js development server:
npm run dev
The development server will start on port 3000.
5

Access the application

Open your browser and navigate to:
http://localhost:3000
You should see the Deriverse landing page.

Development Scripts

The following npm scripts are available:
npm run dev

Script Details

CommandDescription
npm run devStarts Next.js development server with hot reload
npm run buildCreates an optimized production build
npm run startRuns the production build locally
npm run lintRuns ESLint to check code quality

Project Structure

Once cloned, your project structure will look like:
deriverse/
├── src/
│   ├── app/                    # Next.js App Router pages
│   ├── components/            # React components
│   │   ├── features/         # Feature-specific components
│   │   ├── layout/           # Layout components
│   │   └── ui/               # Reusable UI components
│   ├── lib/                  # Utilities & hooks
│   ├── services/             # API & database clients
│   └── providers.tsx         # Context providers
├── public/                   # Static assets
├── Documents/                # Project documentation
├── package.json
├── tsconfig.json
└── tailwind.config.ts

Troubleshooting

If port 3000 is occupied, you can:
  1. Kill the process using port 3000:
    # Find the process
    lsof -i :3000
    
    # Kill it
    kill -9 <PID>
    
  2. Or use a different port:
    PORT=3001 npm run dev
    
If you encounter module resolution errors:
  1. Clear npm cache:
    npm cache clean --force
    
  2. Delete node_modules and reinstall:
    rm -rf node_modules package-lock.json
    npm install
    
  3. Clear Next.js cache:
    rm -rf .next
    npm run dev
    
Ensure your .env.local file:
  • Is in the project root directory
  • Has proper syntax (no spaces around =)
  • Uses NEXT_PUBLIC_ prefix for client-side variables
Restart the dev server after making changes:
# Stop with Ctrl+C, then:
npm run dev
Verify that:
  1. Your Supabase project is running
  2. Environment variables are correctly set:
    • NEXT_PUBLIC_SUPABASE_URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY
  3. Your IP is allowed in Supabase settings
  4. You have internet connectivity
Check the browser console for detailed error messages.
If you see TypeScript errors:
  1. Ensure you’re using Node.js 20+:
    node --version
    
  2. Check your TypeScript version:
    npx tsc --version
    
  3. Restart your IDE/editor’s TypeScript server
  4. Run type checking manually:
    npx tsc --noEmit
    

Development Modes

Deriverse supports two development modes:

Mock Mode

Uses local mock data for rapid UI testing. No blockchain connection required.

Devnet Mode

Connects to Solana devnet for real trade analysis with test tokens.
To use devnet mode, ensure NEXT_PUBLIC_RPC_HTTP is set to a Solana devnet RPC endpoint.

Next Steps

Environment Variables

Configure all required and optional environment variables

Contributing

Learn how to contribute to Deriverse

Architecture

Understand the system architecture

Service APIs

Explore the service APIs

Build docs developers (and LLMs) love