Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.91 KB

File metadata and controls

42 lines (33 loc) · 1.91 KB

CodeBoard — Tech Stack

Frontend

Layer Technology
UI Framework React 18 + Vite
Whiteboard Excalidraw (as library)
Code Editor Monaco Editor
State Management Zustand
WebSocket Client Native WebSocket API
Styling Tailwind CSS
Hosting S3 + CloudFront

Backend (AWS Serverless)

Service AWS Resource
WebSocket API API Gateway (WSS)
Connection Handler Lambda ($connect / $disconnect)
Message Handler Lambda ($default)
Session Store DynamoDB
Broadcast API Gateway Management API

DynamoDB Schema

Attribute Type Notes
sessionId String (PK) UUID v4 — crypto.randomUUID()
connectionId String (SK) API Gateway-assigned
userCount Number Enforces 4-user cap (cb-004)
lastActivity Number (epoch) Debounced write every 15 min
ttl Number (epoch) lastActivity + 7200s — auto-expires (cb-005)

No content columns. Whiteboard strokes and code are never written to DynamoDB — broadcast only. (cb-006)

Key Design Decisions

  • Content is broadcast-only — never persisted, lives only in connected clients' memory
  • Cursor updates batched every 100ms — reduces Lambda invocations
  • Session capped at 4 users — enforced at $connect Lambda via DynamoDB userCount
  • Single AWS region — multi-region is premature given free-tier constraints