Getting Started
A quick guide to setting up your environment, running the project locally, and making your first trade.
1. Local Setup
Prerequisites
- Node.js (v18+)
- pnpm (Recommended package manager)
- Docker (for Supabase emulation)
- A Solana wallet (e.g., Phantom)
Installation
Clone the repository and install dependencies:
bash code
git clone https://github.com/kalshchain/kalshchain.git
cd kalshchain
pnpm installEnvironment Variables
Create a .env.local file and populate it with your Supabase credentials:
bash code
NEXT_PUBLIC_SUPABASE_URL=YOUR_SUPABASE_URL
NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY
# Optional: Solana RPC Endpoint
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com2. Run the Project
Start the development server and Supabase services.
Start Supabase
Using the Supabase CLI (if installed) or Docker:
bash code
# Start all Supabase services locally
supabase startAfter starting, update your .env.local with the local Supabase URLs provided in the terminal output.
Run Next.js
bash code
pnpm run devThe application will be accessible at http://localhost:3000.
3. Make Your First Trade
- Connect Wallet: Click the "Connect Wallet" button and select your Solana wallet (e.g., Phantom).
- Find a Market: Navigate to the Explore page and select any active market.
- Trade: Use the trading panel to choose 'BUY' or 'SELL', select 'YES' or 'NO' outcome, and enter a quantity.
- Confirm: Review the trade details and approve the transaction in your wallet.
Congratulations! You've successfully initiated your first decentralized prediction market trade on KalshChain.