Developer Guide
This section provides a practical guide for developers who want to run, inspect, or extend Zoryu Trade locally. It focuses on clarity, reproducibility, and minimal setup friction.
Project Structure Overview
Zoryu Trade uses a monorepo structure to separate concerns while allowing shared types and schemas.
High-level layout:
Web app — frontend trading interface
API service — backend state and execution coordination
Shared package — schemas and type contracts
Database layer — position and signal persistence
This structure allows frontend and backend to evolve independently while maintaining strict type alignment.
Prerequisites
Before starting, ensure the following are installed:
Node.js (v18 or newer)
npm / pnpm / yarn
PostgreSQL-compatible database (e.g. Neon)
A Solana wallet for testing execution
Environment Configuration
Create an environment file based on the provided example.
Required environment variables:
Notes:
Environment variables are required only by the backend
No secrets are exposed to the frontend
Wallet keys are never required or accepted by the system
Install Dependencies
From the project root:
or, if using pnpm:
Database Setup & Migrations
Zoryu uses a relational database to store signals, positions, and metrics.
Typical workflow:
Configure
DATABASE_URLRun database migrations
Verify schema initialization
Example:
This creates the required tables without storing any sensitive data.
Running the Application Locally
Start the development server:
This command:
Starts the backend API
Serves the frontend application
Enables hot reload for development
Default access:
Frontend:
http://localhost:5000API:
http://localhost:5000/api
Local Development Notes
Market data is fetched periodically by the backend
AI signal generation requires a valid OpenAI API key
Wallet execution requires user interaction via a supported Solana wallet
All executions occur on-chain and are fully verifiable
For development without execution, modules can be inspected independently without signing transactions.
Extending Zoryu
Zoryu is designed to be extended in a modular fashion.
Common extension points:
Adding new market data providers
Enhancing signal generation logic
Introducing additional execution routes
Expanding performance metrics
When extending the system:
Maintain non-custodial guarantees
Preserve backend state authority
Avoid embedding execution logic in the frontend
Last updated