# Aphrodite Domain - Dependency Update Plan

> Analysis of Eve codebase dependencies compared with Oshun monorepo's shared
> catalog, with prioritized update recommendations.

**Analysis Date:** January 2026 **Scope:** Eve Platform dependencies vs Oshun
dependency catalog **Package Managers:** Eve (npm 11.6.1) vs Oshun (pnpm
10.25.0)

---

## Executive Summary

The Eve codebase uses npm as its package manager with a traditional workspace
structure, while Oshun uses pnpm with a centralized dependency catalog. Eve has
**significant dependency management challenges** including version mismatches,
outdated packages, and inconsistent versions across services.

| Issue Type            | Count | Severity |
| --------------------- | ----- | -------- |
| Critical mismatches   | 4     | BLOCKING |
| High priority updates | 4     | HIGH     |
| Medium priority       | 8     | MEDIUM   |
| Low priority          | 10+   | LOW      |

---

## Table of Contents

1. [Package Manager Comparison](#1-package-manager-comparison)
2. [Critical Dependency Mismatches](#2-critical-dependency-mismatches)
3. [Dependency Analysis by Category](#3-dependency-analysis-by-category)
4. [Security Concerns](#4-security-concerns)
5. [Dependencies Only in Eve](#5-dependencies-only-in-eve)
6. [Missing Dependencies](#6-missing-dependencies)
7. [Update Plan](#7-update-plan)
8. [Migration Strategy](#8-migration-strategy)

---

## 1. Package Manager Comparison

| Attribute          | Eve               | Oshun               |
| ------------------ | ----------------- | ------------------- |
| Package Manager    | npm 11.6.1        | pnpm 10.25.0        |
| Workspace Type     | npm workspaces    | pnpm + Nx 20.8.3    |
| Build Tool         | Turbo 2.6.1       | Nx                  |
| Lock File          | package-lock.json | pnpm-lock.yaml      |
| Dependency Catalog | None              | pnpm-workspace.yaml |

**Impact:**

- Different dependency resolution strategies
- Different lock file formats
- pnpm catalog system won't work with npm
- pnpm has stricter peer dependency requirements

---

## 2. Critical Dependency Mismatches

### Issue 2.1: Prisma Major Version Split

| Attribute         | Details  |
| ----------------- | -------- |
| **Severity**      | CRITICAL |
| **Eve Root**      | ^7.0.1   |
| **Eve Packages**  | ^5.22.0  |
| **Oshun Catalog** | ^5.20.0  |

**Impact:**

- Incompatible schema formats
- Migration scripts will fail
- Type generation conflicts

**Action Required:**

```bash
# Align all to Oshun's version
pnpm add -D prisma@^5.20.0
pnpm add @prisma/client@^5.20.0
```

---

### Issue 2.2: UUID Major Version Incompatibility

| Attribute         | Details          |
| ----------------- | ---------------- |
| **Severity**      | CRITICAL         |
| **Eve Root**      | ^13.0.0          |
| **Eve Services**  | ^11.0.5, ^10.0.0 |
| **Oshun Catalog** | ^10.0.0          |

**Impact:**

- Breaking API changes across versions
- Inconsistent UUID generation
- Potential data integrity issues

**Action Required:**

```bash
# Standardize to ^10.0.0
pnpm add uuid@^10.0.0 -w
# Update all service package.json files
```

---

### Issue 2.3: Redis Client Major Version

| Attribute         | Details  |
| ----------------- | -------- |
| **Severity**      | CRITICAL |
| **Eve Version**   | ^4.7.0   |
| **Oshun Catalog** | ^5.8.2   |

**Impact:**

- Breaking changes in Redis client API
- Connection handling differences
- Cluster support changes

**Action Required:**

```bash
# Update Redis client
pnpm add redis@^5.8.2
# Review and update all Redis connection code
```

---

### Issue 2.4: Zod Major Version Split

| Attribute         | Details |
| ----------------- | ------- |
| **Severity**      | HIGH    |
| **Eve Root**      | ^4.1.13 |
| **Eve Packages**  | ^3.23.8 |
| **Oshun Catalog** | ^3.23.0 |

**Impact:**

- Validation behavior changes
- Type incompatibilities
- Schema definition differences

**Recommendation:** Downgrade to ^3.23.0 to match Oshun

```bash
# Standardize to Oshun's version
pnpm add zod@^3.23.0 -w
```

---

## 3. Dependency Analysis by Category

### 3.1 Framework Dependencies

| Package      | Eve Version      | Oshun Catalog  | Status       |
| ------------ | ---------------- | -------------- | ------------ |
| fastify      | ^4.27.0, ^4.28.1 | ^4.28.1        | INCONSISTENT |
| express      | ^4.21.2          | Not in catalog | EVE ONLY     |
| hono         | Not used         | ^4.0.0         | MISSING      |
| next         | 14.2.15 (pinned) | Not in catalog | UNCONTROLLED |
| react-native | 0.73.2           | Not in catalog | UNCONTROLLED |

**Notes:**

- Eve uses Express, Oshun uses Hono
- Fastify version inconsistent across Eve services
- Next.js and React Native pinned to specific versions

---

### 3.2 Database & ORM

| Package        | Eve Version     | Oshun Catalog  | Status       |
| -------------- | --------------- | -------------- | ------------ |
| @prisma/client | ^5.22.0, ^7.0.1 | ^5.20.0        | CRITICAL     |
| prisma         | ^5.22.0, ^7.0.1 | ^5.20.0        | CRITICAL     |
| mongodb        | ^6.11.0, ^7.0.0 | Not in catalog | INCONSISTENT |
| ioredis        | ^5.4.1          | ^5.3.2         | MINOR        |
| redis          | ^4.7.0          | ^5.8.2         | CRITICAL     |

---

### 3.3 Security Dependencies

| Package         | Eve Version    | Oshun Catalog | Status         |
| --------------- | -------------- | ------------- | -------------- |
| bcrypt/bcryptjs | ^2.4.3, ^3.0.3 | ^5.1.1        | MAJOR MISMATCH |
| jsonwebtoken    | Not in Eve     | ^9.0.3        | MISSING        |

**Notes:**

- Eve uses bcryptjs (JS implementation)
- Oshun uses bcrypt (native implementation)
- Different performance characteristics

---

### 3.4 Real-time & Messaging

| Package                  | Eve Version | Oshun Catalog  | Status   |
| ------------------------ | ----------- | -------------- | -------- |
| socket.io                | ^4.8.1      | Not in catalog | EVE ONLY |
| kafkajs                  | ^2.2.4      | Not in catalog | EVE ONLY |
| @socket.io/redis-adapter | ^8.3.0      | Not in catalog | EVE ONLY |

---

### 3.5 Testing Dependencies

| Package          | Eve Version     | Oshun Catalog  | Status   |
| ---------------- | --------------- | -------------- | -------- |
| jest             | ^30.2.0         | Not in catalog | MISMATCH |
| vitest           | Not in Eve      | ^1.6.1         | MISSING  |
| @playwright/test | 1.57.0 (pinned) | ^1.48.2        | OUTDATED |

**Notes:**

- Eve uses Jest, Oshun uses Vitest
- Decision needed on test framework unification

---

### 3.6 Build & Compilation

| Package    | Eve Version    | Oshun Catalog | Status       |
| ---------- | -------------- | ------------- | ------------ |
| typescript | ^5.9.3, ^5.3.3 | ~5.6.3        | INCONSISTENT |
| tsx        | ^4.20.6        | ^4.7.0        | MINOR        |
| esbuild    | Not in Eve     | ^0.24.0       | MISSING      |
| tsup       | Not in Eve     | ^8.0.2        | MISSING      |

---

### 3.7 Validation

| Package | Eve Version      | Oshun Catalog | Status   |
| ------- | ---------------- | ------------- | -------- |
| zod     | ^3.23.8, ^4.1.13 | ^3.23.0       | CRITICAL |

---

### 3.8 Utilities

| Package | Eve Version               | Oshun Catalog | Status   |
| ------- | ------------------------- | ------------- | -------- |
| uuid    | ^13.0.0, ^11.0.5, ^10.0.0 | ^10.0.0       | CRITICAL |
| nanoid  | ^5.0.7, ^5.1.6            | ^5.0.0        | MINOR    |
| axios   | ^1.6.5                    | ^1.7.0        | MINOR    |
| lodash  | Not in Eve                | ^4.17.21      | MISSING  |

---

### 3.9 Logging

| Package | Eve Version     | Oshun Catalog | Status         |
| ------- | --------------- | ------------- | -------------- |
| pino    | ^9.5.0, ^10.1.0 | ^9.0.0        | MAJOR MISMATCH |

---

### 3.10 AWS SDK

| Package                    | Eve Version | Oshun Catalog  | Status           |
| -------------------------- | ----------- | -------------- | ---------------- |
| @aws-sdk/client-s3         | ^3.943.0    | ^3.600.0       | VERSION MISMATCH |
| @aws-sdk/client-cloudfront | ^3.695.0    | Not in catalog | EVE ONLY         |

---

### 3.11 Development Tools

| Package  | Eve Version | Oshun Catalog | Status |
| -------- | ----------- | ------------- | ------ |
| eslint   | ^9.39.1     | ^9.0.0        | MINOR  |
| prettier | ^3.7.3      | ^3.2.5        | MINOR  |
| husky    | ^9.1.7      | ^9.0.11       | MINOR  |

---

## 4. Security Concerns

### 4.1 Potentially Vulnerable Packages

| Package        | Eve Version  | Risk   | Notes                                    |
| -------------- | ------------ | ------ | ---------------------------------------- |
| bcryptjs       | ^2.4.3-3.0.3 | MEDIUM | Outdated password hashing implementation |
| firebase-admin | ^12.7.0      | LOW    | Keep current for security patches        |
| socket.io      | ^4.8.1       | LOW    | Monitor for security patches             |
| kafkajs        | ^2.2.4       | LOW    | Kafka client - keep updated              |
| react-native   | 0.73.2       | MEDIUM | Pinned old version with known CVEs       |

### 4.2 Recommended Security Actions

1. Run `npm audit` for Eve to identify current CVEs
2. Prioritize bcrypt upgrade (critical for authentication)
3. Update react-native from 0.73.2 to latest LTS
4. Implement automated dependency update checking

---

## 5. Dependencies Only in Eve

These dependencies are used by Eve but not in Oshun's catalog:

### Framework/Real-time

```
socket.io ^4.8.1
kafkajs ^2.2.4
@socket.io/redis-adapter ^8.3.0
express ^4.21.2
```

### React Native Specific

```
react-native 0.73.2
react-native-* packages
@react-native-firebase/* ^19.0.0
@react-native-community/slider ^4.5.0
```

### Services

```
@sendgrid/mail ^8.1.3
firebase-admin ^12.7.0
@clickhouse/client ^0.2.10
sharp ^0.33.5
```

### Other

```
crypto-js ^4.2.0
@pact-foundation/pact ^16.0.2
p-limit ^3.1.0
clsx ^2.1.1
```

---

## 6. Missing Dependencies

Packages in Oshun catalog not found in Eve:

```
@anthropic-ai/sdk ^0.30.0
@google/generative-ai ^0.21.0
@opentelemetry/* (observability)
@sentry/node ^8.0.0
@tanstack/react-query ^5.0.0
bullmq ^5.0.0 (job queues)
date-fns ^3.6.0
knex ^3.1.0
minio ^8.0.0
openai ^4.0.0
pg ^8.11.3
prom-client ^15.1.3
replicate ^0.34.0
three ^0.169.0
ws ^8.18.3 (WebSockets)
zustand ^4.5.0
```

---

## 7. Update Plan

### Phase 1: Critical Fixes (BLOCKING)

**Estimated Time:** 3-5 days

| Priority | Package        | Current        | Target  | Action                    |
| -------- | -------------- | -------------- | ------- | ------------------------- |
| P0       | prisma         | 5.x/7.x mix    | ^5.20.0 | Align to Oshun version    |
| P0       | @prisma/client | 5.x/7.x mix    | ^5.20.0 | Align to Oshun version    |
| P0       | uuid           | 10.x/11.x/13.x | ^10.0.0 | Standardize               |
| P0       | redis          | ^4.7.0         | ^5.8.2  | Upgrade with code changes |
| P0       | zod            | 3.x/4.x mix    | ^3.23.0 | Downgrade root to match   |

### Phase 2: High Priority Updates

**Estimated Time:** 3-5 days

| Priority | Package    | Current        | Target        | Action          |
| -------- | ---------- | -------------- | ------------- | --------------- |
| P1       | typescript | 5.3.3/5.9.3    | ~5.6.3        | Standardize     |
| P1       | mongodb    | 6.x/7.x        | ^6.11.0       | Standardize     |
| P1       | bcrypt     | bcryptjs 2-3.x | bcrypt ^5.1.1 | Replace library |
| P1       | pino       | 9.5.0/10.1.0   | ^9.0.0        | Downgrade       |

### Phase 3: Package Manager Migration

**Estimated Time:** 1-2 weeks

| Step | Action                                       |
| ---- | -------------------------------------------- |
| 1    | Install pnpm 10.25.0 globally                |
| 2    | Run pnpm import to convert package-lock.json |
| 3    | Generate pnpm-lock.yaml                      |
| 4    | Delete package-lock.json                     |
| 5    | Update CI/CD pipelines                       |
| 6    | Add Eve deps to Oshun's catalog              |

### Phase 4: Minor Optimizations

**Estimated Time:** 2-3 days

| Priority | Package          | Current      | Target  |
| -------- | ---------------- | ------------ | ------- |
| P2       | eslint           | ^9.39.1      | ^9.0.0  |
| P2       | prettier         | ^3.7.3       | ^3.2.5  |
| P2       | @playwright/test | 1.57.0       | ^1.48.2 |
| P2       | tsx              | ^4.20.6      | ^4.7.0  |
| P2       | axios            | ^1.6.5       | ^1.7.0  |
| P2       | ioredis          | ^5.4.1       | ^5.3.2  |
| P2       | nanoid           | ^5.0.7/5.1.6 | ^5.0.0  |
| P2       | fastify          | ^4.27.0      | ^4.28.1 |

---

## 8. Migration Strategy

### Option A: Full Integration

**Difficulty:** Very High **Time:** 2-3 weeks

1. Migrate Eve packages to Oshun's Nx workspace structure
2. Convert all npm to pnpm
3. Align all dependencies with Oshun's catalog
4. Merge CI/CD pipelines
5. Update all scripts and configurations

### Option B: Wrapper/Bridge Approach

**Difficulty:** Medium **Time:** 1-2 weeks

1. Keep Eve as separate npm workspace
2. Create bridge layer for services
3. Gradually migrate to pnpm + Oshun structure
4. Phase out bridge layer

### Option C: Dependency Alignment Only (Recommended First)

**Difficulty:** Low **Time:** 3-5 days

1. Fix critical dependency mismatches within Eve
2. Don't migrate to pnpm yet
3. Align versions where possible
4. Plan full migration in future phase

---

## Summary: All Mismatches

| Category   | Issue           | Eve            | Oshun      | Severity |
| ---------- | --------------- | -------------- | ---------- | -------- |
| Monorepo   | Package Manager | npm            | pnpm       | HIGH     |
| Database   | Prisma Major    | 5.x/7.x mix    | 5.x        | CRITICAL |
| Database   | Redis Client    | 4.7.0          | 5.8.2      | CRITICAL |
| Utils      | UUID Major      | 10.x/11.x/13.x | 10.x       | CRITICAL |
| Validation | Zod Major       | 3.x/4.x mix    | 3.x        | HIGH     |
| Crypto     | Bcrypt          | bcryptjs 2-3.x | bcrypt 5.x | HIGH     |
| Database   | MongoDB         | 6.x/7.x mix    | Not set    | MEDIUM   |
| Language   | TypeScript      | 5.3.3/5.9.3    | 5.6.3      | MEDIUM   |
| Logging    | Pino            | 9.5.0/10.1.0   | 9.0.0      | MEDIUM   |
| Framework  | Web Framework   | Express        | Hono       | MEDIUM   |
| Real-time  | Socket.io       | 4.8.1          | N/A        | MEDIUM   |
| Testing    | Test Framework  | Jest           | Vitest     | MEDIUM   |

---

## Appendix: Catalog Entries to Add

When Eve is migrated to pnpm, add these to Oshun's pnpm-workspace.yaml catalog:

```yaml
catalog:
  # Real-time (from Eve)
  socket.io: ^4.8.1
  '@socket.io/redis-adapter': ^8.3.0
  kafkajs: ^2.2.4

  # Services (from Eve)
  '@sendgrid/mail': ^8.1.3
  firebase-admin: ^12.7.0
  '@clickhouse/client': ^0.2.10
  sharp: ^0.33.5

  # Mobile (from Eve - pinned)
  react-native: 0.73.2
  '@react-native-firebase/app': ^19.0.0
  '@react-native-firebase/auth': ^19.0.0

  # Utilities (from Eve)
  crypto-js: ^4.2.0
  p-limit: ^3.1.0
  clsx: ^2.1.1
```
