# All 9 product web apps — Deployment + ClusterIP Service + NodePort Service
# Each web: Next.js 16, product-specific NEXT_PUBLIC_* env vars
# ═══════════════════════════════════════════════════════════════════════

# ── LysnrAI Dashboard (:3002) ─────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: lysnrai-dashboard
  namespace: bytelyst-products
  labels:
    app: lysnrai-dashboard
    tier: web
    product: lysnrai
spec:
  replicas: 1
  selector:
    matchLabels:
      app: lysnrai-dashboard
  template:
    metadata:
      labels:
        app: lysnrai-dashboard
        tier: web
        product: lysnrai
    spec:
      containers:
      - name: web
        image: bytelyst/lysnrai-dashboard:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3002
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3002"
        - name: PLATFORM_SERVICE_URL
          value: "http://platform-service.bytelyst-platform.svc:4003"
        - name: ACTIONTRAIL_SERVICE_URL
          value: "http://actiontrail-backend.bytelyst-products.svc:4018"
        - name: NEXT_PUBLIC_PLATFORM_SERVICE_URL
          value: "http://platform-service.bytelyst-platform.svc:4003"
        - name: NEXT_PUBLIC_PRODUCT_ID
          value: "lysnrai"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3002
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3002
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: lysnrai-dashboard
  namespace: bytelyst-products
spec:
  selector:
    app: lysnrai-dashboard
  ports:
  - port: 3002
    targetPort: 3002
---
apiVersion: v1
kind: Service
metadata:
  name: lysnrai-dashboard-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: lysnrai-dashboard
  ports:
  - port: 3002
    targetPort: 3002
    nodePort: 3002

---
# ── ChronoMind Web (:3030) ───────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: chronomind-web
  namespace: bytelyst-products
  labels:
    app: chronomind-web
    tier: web
    product: chronomind
spec:
  replicas: 1
  selector:
    matchLabels:
      app: chronomind-web
  template:
    metadata:
      labels:
        app: chronomind-web
        tier: web
        product: chronomind
    spec:
      containers:
      - name: web
        image: bytelyst/chronomind-web:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3030
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3030"
        - name: NEXT_PUBLIC_BACKEND_URL
          value: "http://chronomind-backend.bytelyst-products.svc:4011"
        - name: NEXT_PUBLIC_PLATFORM_SERVICE_URL
          value: "http://platform-service.bytelyst-platform.svc:4003"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3030
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3030
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: chronomind-web
  namespace: bytelyst-products
spec:
  selector:
    app: chronomind-web
  ports:
  - port: 3030
    targetPort: 3030
---
apiVersion: v1
kind: Service
metadata:
  name: chronomind-web-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: chronomind-web
  ports:
  - port: 3030
    targetPort: 3030
    nodePort: 3030

---
# ── JarvisJr Web (:3035) ─────────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: jarvisjr-web
  namespace: bytelyst-products
  labels:
    app: jarvisjr-web
    tier: web
    product: jarvisjr
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jarvisjr-web
  template:
    metadata:
      labels:
        app: jarvisjr-web
        tier: web
        product: jarvisjr
    spec:
      containers:
      - name: web
        image: bytelyst/jarvisjr-web:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3035
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3035"
        - name: NEXT_PUBLIC_PLATFORM_SERVICE_URL
          value: "http://platform-service.bytelyst-platform.svc:4003"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3035
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3035
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: jarvisjr-web
  namespace: bytelyst-products
spec:
  selector:
    app: jarvisjr-web
  ports:
  - port: 3035
    targetPort: 3035
---
apiVersion: v1
kind: Service
metadata:
  name: jarvisjr-web-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: jarvisjr-web
  ports:
  - port: 3035
    targetPort: 3035
    nodePort: 3035

---
# ── FlowMonk Web (:3040) ─────────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: flowmonk-web
  namespace: bytelyst-products
  labels:
    app: flowmonk-web
    tier: web
    product: flowmonk
spec:
  replicas: 1
  selector:
    matchLabels:
      app: flowmonk-web
  template:
    metadata:
      labels:
        app: flowmonk-web
        tier: web
        product: flowmonk
    spec:
      containers:
      - name: web
        image: bytelyst/flowmonk-web:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3040
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3040"
        - name: NEXT_PUBLIC_API_URL
          value: "http://flowmonk-backend.bytelyst-products.svc:4017"
        - name: NEXT_PUBLIC_PLATFORM_URL
          value: "http://platform-service.bytelyst-platform.svc:4003/api"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3040
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3040
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: flowmonk-web
  namespace: bytelyst-products
spec:
  selector:
    app: flowmonk-web
  ports:
  - port: 3040
    targetPort: 3040
---
apiVersion: v1
kind: Service
metadata:
  name: flowmonk-web-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: flowmonk-web
  ports:
  - port: 3040
    targetPort: 3040
    nodePort: 3040

---
# ── NoteLett Web (:3045) ─────────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: notelett-web
  namespace: bytelyst-products
  labels:
    app: notelett-web
    tier: web
    product: notelett
spec:
  replicas: 1
  selector:
    matchLabels:
      app: notelett-web
  template:
    metadata:
      labels:
        app: notelett-web
        tier: web
        product: notelett
    spec:
      containers:
      - name: web
        image: bytelyst/notelett-web:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3045
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3045"
        - name: NEXT_PUBLIC_NOTES_API_URL
          value: "http://notelett-backend.bytelyst-products.svc:4016/api"
        - name: NEXT_PUBLIC_PLATFORM_SERVICE_URL
          value: "http://platform-service.bytelyst-platform.svc:4003/api"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3045
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3045
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: notelett-web
  namespace: bytelyst-products
spec:
  selector:
    app: notelett-web
  ports:
  - port: 3045
    targetPort: 3045
---
apiVersion: v1
kind: Service
metadata:
  name: notelett-web-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: notelett-web
  ports:
  - port: 3045
    targetPort: 3045
    nodePort: 3045

---
# ── MindLyst Web (:3050) ─────────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mindlyst-web
  namespace: bytelyst-products
  labels:
    app: mindlyst-web
    tier: web
    product: mindlyst
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mindlyst-web
  template:
    metadata:
      labels:
        app: mindlyst-web
        tier: web
        product: mindlyst
    spec:
      containers:
      - name: web
        image: bytelyst/mindlyst-web:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3050
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3050"
        - name: NEXT_PUBLIC_PLATFORM_SERVICE_URL
          value: "http://platform-service.bytelyst-platform.svc:4003"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3050
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3050
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: mindlyst-web
  namespace: bytelyst-products
spec:
  selector:
    app: mindlyst-web
  ports:
  - port: 3050
    targetPort: 3050
---
apiVersion: v1
kind: Service
metadata:
  name: mindlyst-web-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: mindlyst-web
  ports:
  - port: 3050
    targetPort: 3050
    nodePort: 3050

---
# ── NomGap Web (:3055) ───────────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nomgap-web
  namespace: bytelyst-products
  labels:
    app: nomgap-web
    tier: web
    product: nomgap
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nomgap-web
  template:
    metadata:
      labels:
        app: nomgap-web
        tier: web
        product: nomgap
    spec:
      containers:
      - name: web
        image: bytelyst/nomgap-web:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3055
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3055"
        - name: NEXT_PUBLIC_NOMGAP_API_URL
          value: "http://nomgap-backend.bytelyst-products.svc:4013/api"
        - name: NEXT_PUBLIC_PLATFORM_SERVICE_URL
          value: "http://platform-service.bytelyst-platform.svc:4003/api"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3055
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3055
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: nomgap-web
  namespace: bytelyst-products
spec:
  selector:
    app: nomgap-web
  ports:
  - port: 3055
    targetPort: 3055
---
apiVersion: v1
kind: Service
metadata:
  name: nomgap-web-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: nomgap-web
  ports:
  - port: 3055
    targetPort: 3055
    nodePort: 3055

---
# ── ActionTrail Web (:3060) ──────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: actiontrail-web
  namespace: bytelyst-products
  labels:
    app: actiontrail-web
    tier: web
    product: actiontrail
spec:
  replicas: 1
  selector:
    matchLabels:
      app: actiontrail-web
  template:
    metadata:
      labels:
        app: actiontrail-web
        tier: web
        product: actiontrail
    spec:
      containers:
      - name: web
        image: bytelyst/actiontrail-web:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3060
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3060"
        - name: NEXT_PUBLIC_API_URL
          value: "http://actiontrail-backend.bytelyst-products.svc:4018"
        - name: NEXT_PUBLIC_PLATFORM_URL
          value: "http://platform-service.bytelyst-platform.svc:4003"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3060
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3060
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: actiontrail-web
  namespace: bytelyst-products
spec:
  selector:
    app: actiontrail-web
  ports:
  - port: 3060
    targetPort: 3060
---
apiVersion: v1
kind: Service
metadata:
  name: actiontrail-web-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: actiontrail-web
  ports:
  - port: 3060
    targetPort: 3060
    nodePort: 3060

---
# ── LocalMemGPT Web (:3070) ──────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
  name: localmemgpt-web
  namespace: bytelyst-products
  labels:
    app: localmemgpt-web
    tier: web
    product: localmemgpt
spec:
  replicas: 1
  selector:
    matchLabels:
      app: localmemgpt-web
  template:
    metadata:
      labels:
        app: localmemgpt-web
        tier: web
        product: localmemgpt
    spec:
      containers:
      - name: web
        image: bytelyst/localmemgpt-web:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 3070
        env:
        - name: NODE_ENV
          value: "production"
        - name: PORT
          value: "3070"
        - name: NEXT_PUBLIC_BACKEND_URL
          value: "http://localmemgpt-backend.bytelyst-products.svc:4019"
        - name: NEXT_PUBLIC_PLATFORM_URL
          value: "http://platform-service.bytelyst-platform.svc:4003"
        resources:
          requests:
            cpu: "100m"
            memory: "256Mi"
          limits:
            cpu: "500m"
            memory: "512Mi"
        readinessProbe:
          httpGet:
            path: /
            port: 3070
          initialDelaySeconds: 15
          periodSeconds: 10
        livenessProbe:
          httpGet:
            path: /
            port: 3070
          initialDelaySeconds: 30
          periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  name: localmemgpt-web
  namespace: bytelyst-products
spec:
  selector:
    app: localmemgpt-web
  ports:
  - port: 3070
    targetPort: 3070
---
apiVersion: v1
kind: Service
metadata:
  name: localmemgpt-web-ext
  namespace: bytelyst-products
spec:
  type: NodePort
  selector:
    app: localmemgpt-web
  ports:
  - port: 3070
    targetPort: 3070
    nodePort: 3070
