lumina/START_APP.md
2025-11-29 23:13:05 +03:00

4.3 KiB

🚀 How to Start Lumina 3D Modern Stellar Explorer

Prerequisites

  • Docker Desktop installed and running
  • Node.js v20+ installed
  • pnpm installed (npm install -g pnpm)

Step 1: Start Docker Desktop

# macOS
open -a Docker

# Wait for Docker to fully start (check menu bar icon)

Step 2: Start All Services

cd /Users/arhansubasi/lumina/lumina

# Start MongoDB, Elasticsearch, Redis, API, and UI
docker-compose up

Access:


Manual Start (Development Mode)

Step 1: Start Databases with Docker

cd /Users/arhansubasi/lumina/lumina

# Start only databases
docker-compose up mongodb mongodb-archive elasticsearch redis -d

Step 2: Install Dependencies (First Time Only)

API:

cd api
npm install

UI:

cd ui
pnpm install

Step 3: Update React Three Fiber (Fix Compatibility)

cd ui
pnpm remove @react-three/fiber @react-three/drei
pnpm add @react-three/fiber@^7.0.27 @react-three/drei@^8.15.0

Step 4: Start API Server

cd api
npm start

API will run on: http://localhost:3000

Step 5: Start UI Server (New Terminal)

Option A: HTTPS (with self-signed certificate warning)

cd ui
pnpm dev-server

Access: https://localhost:9001 (you'll need to accept the certificate warning)

Option B: HTTP (no certificate needed)

cd ui
DISABLE_HTTPS=true pnpm dev-server

Access: http://localhost:9001

Note: If you see "Your connection is not private" error, see SSL_FIX.md for solutions.


Verify Everything Works

Check Services

# Check Docker containers
docker-compose ps

# Test API
curl http://localhost:3000/explorer/public/ledger/last

# Test UI (should return HTML)
curl -k https://localhost:9001

Access Points


Troubleshooting

Docker Not Running

# Start Docker Desktop
open -a Docker

# Verify Docker is running
docker ps

Port Already in Use

# Find process using port
lsof -i :3000
lsof -i :9001

# Kill process
kill -9 <PID>

React Three Fiber Errors

If you see useId or react-dom/client errors:

cd ui
pnpm remove @react-three/fiber @react-three/drei
pnpm add @react-three/fiber@^7.0.27 @react-three/drei@^8.15.0
pnpm install

MongoDB Connection Issues

Check api/app.config.json has correct MongoDB URLs:

{
  "networks": {
    "public": {
      "db": "mongodb://127.0.0.1:27087/se_pub802",
      "archive": "mongodb://127.0.0.1:40217/se_archive"
    }
  }
}

Clear and Restart

# Stop all services
docker-compose down

# Remove volumes (if needed)
docker-compose down -v

# Restart
docker-compose up

Development Commands

API

cd api
npm start          # Start API server
npm test           # Run tests

UI

cd ui
pnpm dev-server    # Start dev server with hot reload
pnpm build         # Build for production
pnpm test          # Run tests
pnpm lint          # Lint code

Docker

docker-compose up              # Start all services
docker-compose up -d           # Start in background
docker-compose down            # Stop all services
docker-compose logs -f         # View logs
docker-compose restart api     # Restart specific service

Environment Variables

API (api/.env)

MONGODB_URI=mongodb://127.0.0.1:27087/se_pub802
ELASTICSEARCH_URL=http://localhost:9201
HORIZON_URL_PUBLIC=https://horizon.stellar.org

UI (ui/.env)

REACT_APP_API_URL=http://localhost:3000
REACT_APP_OPENROUTER_API_KEY=your_key_here
REACT_APP_OPENROUTER_MODEL=anthropic/claude-3.5-sonnet

Next Steps

  1. ✅ Start Docker Desktop
  2. ✅ Run docker-compose up
  3. ✅ Access https://localhost:9001
  4. ✅ Navigate to 3D view: /graph/3d/public

Need help? Check BUILD_FIXES.md for build issues or DOCKER_TROUBLESHOOTING.md for Docker problems.