Skip to main content

Engineering Handbook

Purpose: This handbook defines the guardrails (non-negotiables) and paved paths (default choices) for how software is designed, written, tested, deployed, secured, and observed across the Soku monorepo. It is intended for humans and LLMs alike. If you are an LLM generating code for this project, follow the instructions in each section's LLM Notes.

Scope: Applies to all packages inside the monorepo unless an ADR explicitly carves out an exception.


Quick Start

pnpm install           # Install all dependencies
pnpm build # Build all apps and packages
pnpm test # Run all tests with coverage
pnpm dev # Start web + functions in parallel
pnpm check # Run lint + typecheck + test (full validation)
  • Deploy web — Automatically via Vercel on merge to protected branches
  • Deploy functionspnpm deploy:functions or via CI on merge

Technology Summary

LayerTechnologyDetails
FrontendNext.js 16, React 19, TypeScriptApp Router, RSC support
StateRedux Toolkit, React Query v5Slices for forms, RQ for server data
StylingTailwind CSS 3.4, Radix UIUtility-first with shadcn/ui components
BackendExpress 5, Node.js 22Firebase Cloud Functions v2
DatabaseCloud FirestoreNative mode, Admin SDK
QueueGoogle Cloud TasksFan-out orchestration
SchemasZodShared via @soku/schema package
TestingJest, Cypress 15Unit + E2E
CI/CDGitHub Actions, TurboLint, typecheck, test, build
LoggingPinoStructured JSON logs
MediaSharp, FFmpegImage optimization, video transcoding

Sections

TopicLink
Repository & WorkflowRepository & Workflow
Languages, Frameworks & StylingStack & Styling
TypeScript PolicyTypeScript Policy
Testing StrategyTesting Strategy
Linting, Formatting & Static AnalysisQuality Tooling
CI/CD — GitHub ActionsCI/CD
Environments, Deployments & Feature FlagsEnvironments & Flags
API Conventions (REST)API Conventions
Frontend Conventions (Next.js)Frontend Conventions
Backend Conventions (Functions & Jobs)Backend Conventions
Secrets & ConfigurationSecrets & Configuration
ObservabilityObservability
Data, Storage & AsyncData, Storage & Async
SecuritySecurity
Developer ExperienceDeveloper Experience
LLM Development GuideLLM Guide
Exceptions & Decision RecordsExceptions & ADRs
AppendicesAppendices

Final note: These guardrails optimize for speed and coherence. If you need to diverge, propose an ADR. Prefer automation over policy — if it matters, enforce it in code or CI.