# 🚀 Quick Start Guide

## Prerequisites

- Node.js >= 18.0.0
- pnpm >= 8.0.0

## Installation

### 1. Install pnpm (if not already installed)

```bash
# Using corepack (recommended)
corepack enable
corepack prepare pnpm@latest --activate

# Or using npm
npm install -g pnpm
```

### 2. Install Dependencies

```bash
cd orchestration/portal
pnpm install
```

### 3. Build Project

```bash
pnpm build
```

### 4. Start Server

```bash
# Development mode (with hot reload)
pnpm dev

# Production mode
pnpm start
```

## Access Portals

Once the server is running:

- **Main Dashboard**: http://localhost:5000
- **Health Dashboard**: http://localhost:5000/dashboard/health
- **Cost Dashboard**: http://localhost:5000/dashboard/costs
- **Environment Details**: http://localhost:5000/environment/{name}

## API Endpoints

All API endpoints are available at `/api/*`:

- `GET /api/environments` - List all environments
- `GET /api/environments/:name` - Get environment details
- `POST /api/environments/:name/deploy` - Trigger deployment
- `GET /api/environments/:name/status` - Get status
- `GET /api/environments/:name/metrics` - Get metrics
- `GET /api/environments/:name/alerts` - Get alerts
- `GET /api/costs` - Get cost data
- `GET /api/deployments` - List deployments

## Troubleshooting

### Port Already in Use
```bash
PORT=5001 pnpm start
```

### Build Errors
```bash
rm -rf dist node_modules
pnpm install
pnpm build
```

### Type Errors
```bash
pnpm run type-check
```

## Next Steps

1. Configure environments in `config/environments.yaml`
2. Set up cloud provider credentials
3. Deploy infrastructure using Terraform
4. Start managing deployments through the portal

---

**Ready to go!** 🎉

