Skip to content

jcar787/key-value-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Week 3 - Key-Value Store (Go + React)

Motivation: Implement ByteByteGo-style system design projects to practice building scalable distributed systems from scratch while writing clean, production-ready Go code and React frontends.

Goal: Build a simple key-value store with an in-memory data model, append-only log for durability, and a minimal React/TypeScript UI to interact with it.


System Design Concepts

  • In-Memory KV Store – Thread-safe hash map protected by RWMutex for concurrent reads/writes.
  • API Design – Simple RESTful endpoints: PUT /kv/{key}, GET /kv/{key}, DELETE /kv/{key}, GET /healthz.
  • Frontend Integration – React + Vite frontend calling the Go API via /api proxy, with typed API client and minimal UI.
  • CORS Middleware – Global middleware ensures proper cross-origin support between frontend and backend.

Architecture

flowchart LR
    UI[React UI] --> | fetch /api/kv/:key | API(Go HTTP Server)
    UI --> | PUT /api/kv/:key | API
    UI --> | DELETE /api/kv/:key | API
    API --> | in-mem calls | Store[(Store: KV Pairs)]
    API --> | JSON | UI
    classDef dim fill:#eee,stroke:#bbb,color:#777;
Loading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published