Mike (@mikerb95) CodeByMike

Entidades del dominio derivadas directamente de src/db/schema.ts, agrupadas por módulo para mantener cada diagrama legible.

CRM y finanzas

classDiagram
    class Client {
      +int id
      +string name
      +string email
      +string company
      +string notes
    }
    class Project {
      +int id
      +string slug
      +string title
      +string techStack
      +string status
      +bool visible
      +Date startDate
      +Date endDate
    }
    class Message {
      +int id
      +string name
      +string email
      +string body
      +bool read
    }
    class Finance {
      +int id
      +decimal amount
      +string status
      +Date dueDate
    }
    class ProjectService {
      +int id
      +string category
      +string provider
      +decimal cost
      +string billingCycle
      +Date renewalDate
      +string payer
      +decimal billedToClient
      +string secrets~cifrado~
    }
    class ProjectEnvVar {
      +string key
      +string value~cifrado~
      +string environment
    }
    class ProjectContact {
      +string name
      +string role
    }
    class ProjectAdr {
      +string title
      +string status
      +string context
      +string decision
      +string rationale
    }
    class Briefing {
      +string title
      +string status
      +decimal estimatedBudget
      +decimal agreedBudget
      +Date deadline
    }
    class BriefingItem {
      +string kind
      +string content
      +bool done
    }
    class Interaction {
      +string type
      +string title
      +string nextAction
      +Date dueDate
      +bool done
    }

    Client "1" --> "*" Project : posee
    Client "1" --> "*" Message : envía
    Client "1" --> "*" Finance : factura
    Project "1" --> "*" Finance
    Project "1" --> "*" ProjectService : consume
    Project "1" --> "*" ProjectEnvVar
    Project "1" --> "*" ProjectContact
    Project "1" --> "*" ProjectAdr
    Project "1" --> "*" Briefing
    Briefing "1" --> "*" BriefingItem
    Client "1" --> "*" Interaction
    Project "1" --> "*" Interaction
    Briefing "1" --> "*" Interaction

Observabilidad y LAB

classDiagram
    class Monitor {
      +int id
      +string name
      +string url
      +string expectedText
      +int latencyThresholdMs
      +string lastStatus
      +Date sslExpiresAt
    }
    class MonitorCheck {
      +Date at
      +bool ok
      +int statusCode
      +int responseMs
    }
    class MonitorIncident {
      +Date startedAt
      +Date resolvedAt
      +string cause
      +int durationSec
    }
    class CiRun {
      +string sha
      +string branch
      +string conclusion
      +int testsPassed
      +int testsFailed
      +decimal coveragePct
      +bool healthOk
    }
    class Payment {
      +string reference
      +string idempotencyKey
      +int amountCents
      +string status
      +string provider
      +int version
    }
    class PaymentEvent {
      +string type
      +bool duplicate
      +bool outOfOrder
      +bool amountMismatch
    }
    class ChaosFlag {
      +string kind
      +string targetRoute
      +int param
      +Date expiresAt
    }
    class LabExperiment {
      +string kind
      +bool ok
      +string result
    }

    Monitor "1" --> "*" MonitorCheck : registra
    Monitor "1" --> "*" MonitorIncident : agrupa
    Payment "1" --> "*" PaymentEvent : recibe

Seguridad (micro-SIEM)

classDiagram
    class SecurityEvent {
      +Date at
      +string ipHash
      +string path
      +string category
      +string severity
      +string action
      +int hits
    }
    class SecurityRollup {
      +string bucket
      +Date at
      +string category
      +int count
      +int uniqueIps
    }
    class BlockedIp {
      +string ip
      +string reason
      +string source
      +Date expiresAt
    }
    class RateLimitBucket {
      +string key
      +int count
      +Date resetAt
    }
    class SecurityAnomaly {
      +Date at
      +string kind
      +decimal zScore
      +decimal baseline
      +bool notified
      +bool acknowledged
    }
    class AdminSession {
      +string id
      +string login
      +string ip
      +Date lastSeen
      +Date revokedAt
    }

    SecurityEvent "*" --> "1" SecurityRollup : agrega
    SecurityRollup ..> SecurityAnomaly : detecta baseline