Skip to content

Latest commit

 

History

History
158 lines (117 loc) · 2.67 KB

File metadata and controls

158 lines (117 loc) · 2.67 KB

🚀 Quick Start Guide

1️⃣ First Time Setup (5 minutes)

# Make setup script executable (if not already)
chmod +x scripts/setup.sh

# Run automated setup
./scripts/setup.sh

This will:

  • ✅ Check prerequisites (Bun, Docker, pnpm)
  • ✅ Install all dependencies
  • ✅ Start Docker services (Postgres + Redis)
  • ✅ Wait for services to be healthy

2️⃣ Configure Environment

Edit .env file (already created from template):

# Optional: Add better RPC endpoints for production
HELIUS_API_KEY=your_key_here
QUICKNODE_URL=your_url_here

# Generate secure JWT secret
JWT_SECRET=$(openssl rand -base64 32)

3️⃣ Start Development

# Start all services
pnpm dev

This will start:

  • API Gateway on http://localhost:3000
  • Swagger docs on http://localhost:3000/docs

4️⃣ Verify Installation

# Test API Gateway
curl http://localhost:3000/health

# Should return:
# {"status":"ok","timestamp":1234567890,"uptime":10.5,"version":"1.0.0"}

🎯 Development Workflow

Run specific service

cd apps/api-gateway
bun run dev

View logs

# Docker services logs
docker-compose logs -f

# Specific service
docker-compose logs -f postgres

Access databases

# PostgreSQL (via pgAdmin)
open http://localhost:5050
# Email: admin@trading.local
# Password: admin

# Redis (via Redis Commander)
open http://localhost:8081

Stop services

# Stop Docker services
docker-compose down

# Stop with volume cleanup
docker-compose down -v

📚 Next Steps

  1. Learn Solana (if not familiar yet)

  2. Study Architecture

    • Read: README.md
    • Understand microservices structure
    • Time: 1-2 hours
  3. Start Coding

    • Begin with Price Service
    • Then Order Service
    • Follow 14-day roadmap

🐛 Troubleshooting

Docker services not starting

# Check Docker status
docker ps

# View logs
docker-compose logs

# Restart services
docker-compose restart

Port already in use

# Find process using port 3000
lsof -i :3000

# Kill process
kill -9 <PID>

# Or change port in .env
API_PORT=3001

pnpm install fails

# Clear cache
pnpm store prune

# Try again
pnpm install

Bun not found

# Install Bun
curl -fsSL https://bun.sh/install | bash

# Add to PATH (usually automatic)
source ~/.bashrc  # or ~/.zshrc

📞 Need Help?


Let's coding! 🎉