Skip to content

Tech Stack

Guiding Principles

Principle Contents
Unified on TypeScript The backend, frontend, and Chrome extension are all written in TypeScript so that types are handled the same way everywhere
Schema driven API inputs and outputs are defined once as Zod schemas, from which the OpenAPI document and the frontend API client are generated
Serverless No always-on servers; container images are deployed to AWS Lambda and App Runner

Technologies

Category Technology Version Purpose Why it was chosen
Language TypeScript v5.8.3 backend / frontend / extension Type safety, and shared knowledge across three repositories
Runtime Bun v1.3.11 Running, package management, and tests for backend / frontend Runs TS directly and bundles a test runner, reducing tooling
API framework Hono v4.7.7 The backend web API Lightweight and a good fit for Lambda
API schema @hono/zod-openapi v1.2.4 Validation, types, and OpenAPI generation One Zod definition covers validation, types, and documentation
Validation Zod v4.3.6 Data shape definitions and runtime validation TypeScript types and runtime validation come from one definition
ORM Drizzle ORM v0.45.2 DB access and migration generation SQL-like ergonomics, with types and SQL derived from the schema
DB PostgreSQL v16 Persistence A relational DB fits the complex table relationships of branch conditions
Frontend framework Next.js v15.3.0 Web UI (App Router) Server components and routing out of the box
UI library React v19.0.0 Building screens Required by Next.js
Data fetching TanStack Query v5.95.2 Fetching and caching server data Refetching and cache invalidation need not be hand-written per screen
Authentication next-auth v4.24.13 Google login Authentication can be completed with internal Google accounts
API client generation orval v7.8.0 Generating a react-query client from OpenAPI The frontend follows backend changes, preventing hand-written drift
Styling SCSS (CSS Modules) sass v1.98.0 Styling screens Avoids class name collisions while keeping the existing style
Extension framework Plasmo v0.90.3 Chrome extension Generates the manifest and build config, and allows writing React
Extension UI MUI v5.14.20 Extension UI components Lets the extension screens be built quickly
Infrastructure AWS Lambda - Runtime for the backend API Per-request billing keeps costs down
Infrastructure AWS App Runner - Runtime for the frontend Hosts directly from a container image
Infrastructure Amazon ECR - Container image registry Referenced by both Lambda and App Runner
CI/CD GitHub Actions - Build and deploy Automates ECR push and deployment on push to main
Documentation MkDocs Material v9.7.6 This documentation Written directly in Markdown and mermaid, with ja / en i18n

Main Libraries

Library Version Purpose
@hono/swagger-ui v0.6.1 The /swagger API documentation screen
postgres v3.4.8 PostgreSQL driver
drizzle-kit v0.31.10 Migration SQL generation and Drizzle Studio
react-icons v5.6.0 Frontend icons
Vitest v3.2.4 Frontend / extension tests
Playwright v1.62.1 Integration tests against the dev environment
Storybook v8.6.14 Inspecting UI components in isolation
ESLint / Prettier v9.24.0 / v3.8.1 Linting and formatting
husky / lint-staged v9.1.7 / v16.4.0 Automatic lint and format on commit
hygen v6.2.11 Component scaffolding

Test Setup

Test type Target Tool Location
API tests backend routes bun test heineken-survey-design-backend
Unit tests frontend domain logic Vitest heineken-survey-design-frontend
Unit tests extension CS conversion logic Vitest Lab-web-extension
Integration tests dev environment screens and preview runs Playwright integration-tests

Under Consideration / Deprecated

Technology Status Notes
Score logic Out of scope Exists in Creative Survey but is not used
Randomized destinations Out of scope Same. Only is_random: false is sent to CS
Survival-format questions Out of scope Same. Not added as a question type
Spreadsheet-format export Deprecated Fully replaced by direct SurveyExportPayload handoff on 2026-07-14