Skip to content

Tech Stack

Runtime & Language

TechnologyVersionUsage
Node.js22+Runtime
TypeScript5.xLanguage (strict mode)
pnpm10+Package manager with workspaces

Backend

TechnologyVersionUsage
Fastify5.xHTTP server
tRPC11.xType-safe API layer
TypeORM0.3.xDatabase ORM
PostgreSQL16Primary database (with TimescaleDB + pgvector extensions)
Redis7Caching and sessions
Zod3.xSchema validation
PinoStructured logging
JWTAuthentication + refresh tokens
bcrypt / bcryptjsPassword hashing
FCM + Web PushPush notifications

Frontend

TechnologyVersionUsage
Alpine.js3.14Reactive UI (all apps)
Vite6.xBuild tool and dev server
Tailwind CSS4.0Utility-first CSS
Capacitor8.xMobile app (iOS + Android)
Cropper.js1.6Image cropping (Employee App)
mermaid11.xDiagrams in docs

Docs

TechnologyVersionUsage
VitePress1.6Documentation site
vitepress-plugin-mermaid2.xDiagram rendering

Infrastructure

TechnologyUsage
Docker ComposeContainer orchestration (dev)
nginxDocker reverse proxy + docs hosting
pgAdmin 4Database management UI
HuskyGit hooks
lint-stagedPre-commit formatting
Biome 2.xLinting and formatting

Build & Testing

TechnologyUsage
VitestTest runner
tsupLibrary bundling (SDK, core sub-paths, components)
tscType checking and some builds
Commander.jsCLI framework (hereby command)
turboMonorepo task orchestration

Frontend Architecture

All Alpine.js apps share the same stack:

Alpine.js 3.14 (reactive components)
    + @hereby/sdk (tRPC client)
    + @hereby/components (auth UI + NotificationBell)
    + Tailwind CSS 4.0 (styling)
    + Vite 6.0 (build + HMR)

Custom Vite Plugin

All apps use a custom htmlInclude() Vite plugin that processes <!-- include "path" --> directives for HTML composition, enabling modular view/component templates.

SDK Integration

The SDK is registered as an Alpine.js plugin, creating a $store.hereby store with:

  • Authentication state
  • Timezone-aware formatters (formatDate, formatTime, formatDateISO, todayLocal)
  • SDK client instance
  • Permission checking helpers
  • Login / logout methods

Core Package (@hereby/core)

Browser-safe sub-path exports built with tsup:

  • @hereby/core/date — date formatters (ESM+CJS, zero deps)
  • @hereby/core/constants — permission constants, insurance rates (ESM+CJS)
  • @hereby/core/errors — error classes (ESM+CJS)
  • Root @hereby/core — everything including schemas (CJS only, depends on zod/pino)

TypeScript Configuration

json
{
  "strict": true,
  "experimentalDecorators": true,
  "emitDecoratorMetadata": true,
  "strictPropertyInitialization": false,
  "target": "ES2022",
  "module": "ESNext"
}
  • Strict mode: No implicit any, strict null checks
  • Decorators: Required for TypeORM entities
  • PascalCase: Types, interfaces, classes
  • camelCase: Variables, functions
  • Consistent array syntax: shorthand T[]

Biome Configuration

  • Formatter: 2 spaces, LF line endings, 100-char line width
  • Linter: Strict rules for complexity, correctness, security, style, a11y
  • Sorted imports: Enforced across all packages
  • Auto-fix: pnpm lint:fix
  • Pre-commit hook: via Husky + lint-staged