varvedb 0.4.2

A high-performance, embedded, append-only event store for Rust.
Documentation
.architecture {
  padding: 8rem 0;
  color: #f0f6fc;
}

.section-desc {
  text-align: center;
  max-width: 600px;
  margin: -2rem auto 4rem;
  color: #c9d1d9;
  font-size: 1.1rem;
}

.arch-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.arch-box {
  width: 100%;
  padding: 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

/* Interactive States */
/* Interactive States */
.arch-box.highlight, .arch-component.highlight {
  box-shadow: 0 0 20px var(--highlight-color, #38bdf8);
  transform: scale(1.02);
  border-color: var(--highlight-color, #38bdf8);
  z-index: 10;
  opacity: 1 !important;
  filter: none !important;
  color: #f0f6fc; /* Ensure text is bright white */
}

/* Specific overrides for colored boxes to keep their theme when highlighted, 
   but ensure they are bright */
.arch-box.user.highlight {
  color: #38bdf8;
}

.arch-box.storage.highlight {
  color: #fbbf24;
}

.code-line {
  display: block;
  transition: all 0.3s ease;
  border-radius: 4px;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

.code-line.highlight {
  background: rgba(56, 189, 248, 0.15);
  box-shadow: inset 3px 0 0 var(--highlight-color, #38bdf8);
}

.code-line.dim {
  opacity: 0.3;
}

.arch-box.dim, .arch-component.dim {
  opacity: 0.5;
  filter: grayscale(100%);
}

.arch-box.user {
  background: #0f172a;
  border-color: #38bdf8;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.arch-box.varvedb {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed #94a3b8;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  backdrop-filter: blur(4px);
}

.arch-title {
  font-size: 0.9rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.arch-inner {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.arch-component {
  background: #1e293b;
  color: #f0f6fc;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid #334155;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  cursor: default;
}

.arch-box.storage {
  background: #0f172a;
  border-color: #fbbf24;
  color: #fbbf24;
  margin-top: 0.5rem;
}

.arch-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.9;
}

.arch-flow.internal {
  color: #94a3b8;
}

.arch-icon {
  width: 24px;
  height: 24px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (max-width: 900px) {
  .arch-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Data Flow Animation */
.arch-diagram {
  position: relative;
}

.data-packet {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
  opacity: 0;
  z-index: 20;
  pointer-events: none;
}

.packet-write {
  animation: flow-write 4s infinite ease-in-out;
}

.packet-read {
  animation: flow-read 4s infinite ease-in-out;
  animation-delay: 2s; /* Start halfway through write */
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

@keyframes flow-write {
  0% {
    top: 5%;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, 0) scale(0.5);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  40% {
    top: 45%; /* VarveDB Box */
    left: 50%;
  }
  50% {
    top: 45%;
    left: 30%; /* Writer */
  }
  60% {
    top: 85%; /* Storage */
    left: 50%;
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  70% {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.5);
  }
  100% {
    opacity: 0;
  }
}

@keyframes flow-read {
  0% {
    top: 85%; /* Storage */
    left: 50%;
    opacity: 0;
    transform: translate(-50%, 0) scale(0.5);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  30% {
    top: 45%;
    left: 70%; /* Reader */
  }
  60% {
    top: 5%; /* User */
    left: 50%;
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  70% {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.5);
  }
  100% {
    opacity: 0;
  }
}