Prerequisites
Before you begin, ensure you have the following installed:- Node.js 20+ - Download here
- npm (comes with Node.js)
- Git - Download here
Quick Start
Install dependencies
Install all required npm packages:This will install:
- Next.js 16 (App Router)
- React 19
- Supabase client
- Solana Web3.js
- Jupiter Wallet Adapter
- TailwindCSS v4
- And all other dependencies
Configure environment variables
Create a See Environment Variables for detailed configuration.
.env.local file in the project root with your configuration:Start the development server
Run the Next.js development server:The development server will start on port 3000.
Development Scripts
The following npm scripts are available:Script Details
| Command | Description |
|---|---|
npm run dev | Starts Next.js development server with hot reload |
npm run build | Creates an optimized production build |
npm run start | Runs the production build locally |
npm run lint | Runs ESLint to check code quality |
Project Structure
Once cloned, your project structure will look like:Troubleshooting
Port 3000 is already in use
Port 3000 is already in use
If port 3000 is occupied, you can:
-
Kill the process using port 3000:
-
Or use a different port:
Module not found errors
Module not found errors
If you encounter module resolution errors:
-
Clear npm cache:
-
Delete
node_modulesand reinstall: -
Clear Next.js cache:
Environment variable not loading
Environment variable not loading
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
Supabase connection fails
Supabase connection fails
Verify that:
- Your Supabase project is running
- Environment variables are correctly set:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- Your IP is allowed in Supabase settings
- You have internet connectivity
TypeScript errors during development
TypeScript errors during development
If you see TypeScript errors:
-
Ensure you’re using Node.js 20+:
-
Check your TypeScript version:
- Restart your IDE/editor’s TypeScript server
-
Run type checking manually:
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.
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
