# Reactive Resume v4

A free and open-source resume builder.

## Deployment

- **Host:** Calypso (Synology NAS)
- **URL:** https://rxv4access.vishconcord.synology.me
- **Port:** 9751
- **Deployed via:** Portainer Stack

## Services

| Container | Image | Port | Purpose |
|-----------|-------|------|---------|
| Resume-ACCESS | amruthpillai/reactive-resume:latest | 9751:3000 | Main application |
| Resume-DB | postgres:16 | - | PostgreSQL database |
| Resume-MINIO | minio/minio:latest | 9753:9000 | S3-compatible storage |
| Resume-PRINTER | ghcr.io/browserless/chromium:latest | - | PDF generation |

## Data Locations

| Data | Path |
|------|------|
| PostgreSQL | `/volume1/docker/rxv4/db` |
| MinIO/S3 | `/volume1/docker/rxv4/data` |
| Local uploads | `/volume1/docker/rxv4/uploads` |

## Environment Variables

### Required
- `APP_URL` - Public URL (https://rxv4access.vishconcord.synology.me)
- `DATABASE_URL` - PostgreSQL connection string
- `AUTH_SECRET` - JWT secret (generate with `openssl rand -hex 32`)
- `PRINTER_ENDPOINT` - WebSocket URL to printer service

### Email (Gmail SMTP)
- `SMTP_HOST` - smtp.gmail.com
- `SMTP_PORT` - 587
- `SMTP_USER` - your-email@example.com
- `SMTP_PASS` - Gmail app password

### Storage (MinIO)
- `S3_ENDPOINT` - http://minio:9000
- `S3_ACCESS_KEY_ID` - minioadmin
- `S3_SECRET_ACCESS_KEY` - miniopass
- `S3_BUCKET` - default
- `S3_FORCE_PATH_STYLE` - true (required for MinIO)

## Credentials

### MinIO Console
- URL: http://calypso.local:9753
- User: minioadmin
- Password: "REDACTED_PASSWORD"

### PostgreSQL
- Database: resume
- User: resumeuser
- Password: "REDACTED_PASSWORD"

## Updating

```bash
# Via Portainer: Pull and redeploy the stack

# Or manually:
docker compose pull
docker compose up -d
```

## Troubleshooting

### 500 Error / Invalid environment variables
The environment variables changed significantly in v4. Ensure you're using:
- `APP_URL` (not `PUBLIC_URL`)
- `AUTH_SECRET` (not `ACCESS_TOKEN_SECRET`/`REFRESH_TOKEN_SECRET`)
- `PRINTER_ENDPOINT` (not `CHROME_URL`)
- `S3_*` variables (not `STORAGE_*`)

### PDF export not working
Check the printer container:
```bash
docker logs Resume-PRINTER
```

Ensure `PRINTER_ENDPOINT` is set to `ws://printer:3000`

### Database connection issues
Verify the database is healthy:
```bash
docker exec Resume-DB pg_isready -U resumeuser -d resume
```

## AI Integration (Ollama)

Reactive Resume supports AI-assisted features via OpenAI-compatible APIs. Connect to the local Ollama instance on Atlantis.

**Ollama URL:** https://ollama.vishconcord.synology.me

### Setup (per-user in dashboard)

1. Sign in to Reactive Resume
2. Go to **Settings** → **Artificial Intelligence**
3. Configure:
   - **Provider:** OpenAI
   - **Base URL:** `https://ollama.vishconcord.synology.me/v1`
   - **Model:** `neural-chat:7b` (recommended) or `llama3.2:3b` (faster)
   - **API Key:** `ollama` (any text works, Ollama doesn't validate)

### Available Models

| Model | Size | Best For |
|-------|------|----------|
| neural-chat:7b | 7B | General text, recommended |
| llama3.2:3b | 3.2B | Fast responses |
| mistral:7b | 7.2B | High quality |
| phi3:mini | 3.8B | Balanced |
| gemma:2b | 3B | Lightweight |
| codellama:7b | 7B | Code-related |

### AI Features

- Improve resume bullet points
- Generate professional summaries
- Rewrite content for clarity
- Suggest skills and keywords

## Documentation

- [Official Docs](https://docs.rxresu.me/)
- [Self-Hosting Guide](https://docs.rxresu.me/self-hosting/docker)
- [AI Guide](https://docs.rxresu.me/guides/using-ai)
- [GitHub](https://github.com/AmruthPillai/Reactive-Resume)
