Development Tooling
Relevant source files
The following files were used as context for generating this wiki page:This project employs a modern suite of development tools to ensure a high-performance, consistent, and type-safe development experience within a TypeScript monorepo. The core tooling revolves around Turborepo for build system orchestration, Biome for code formatting and linting, and pnpm for efficient package management.
The tooling is designed to streamline common development tasks such as running development servers, building for production, type-checking, and maintaining code quality. Each package within the monorepo (api, web, db, etc.) has its own specific scripts and dependencies, which are managed and executed from the root level via Turborepo. This setup provides both centralized control and localized configuration.
Core Tooling
Monorepo Management: Turborepo
Turborepo is the high-performance build system used to manage the JavaScript/TypeScript monorepo. It orchestrates tasks defined in the package.json scripts across all workspaces.
Sources: README.md:10-11, package.json:11-19, turbo.json
Task Configuration
The main configuration for Turborepo is in turbo.json. It defines the pipeline for tasks, specifying dependencies between them and configuring caching behavior.
{
"$schema": "https://turbo.build/schema.json",
"ui": "tui",
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".cache/tsbuildinfo.json", "dist/**"]
},
"type:check": {
"dependsOn": ["^build"],
"outputs": [".cache/tsbuildinfo.json"]
},
"clean": {
"cache": false
},
"dev": {
"cache": false,
"persistent": true
}
}
}
Sources: turbo.json:1-21
The diagram below illustrates the dependency flow for the build and type:check tasks.
Sources: turbo.json:5-14
Root-Level Scripts
The root package.json provides top-level scripts that use Turborepo to run tasks across the entire monorepo.
| Script | Description |
|---|---|
build | Runs the build task in all workspaces, respecting the dependency graph. |
dev | Runs the dev task in all workspaces for local development. |
clean | Executes the clean task to remove build artifacts and caches. |
lint | Lints and auto-fixes files using Biome. |
format | Formats files using Biome. |
check | Runs Biome's linting and formatting checks. |
type:check | Runs TypeScript compiler to check for type errors in all workspaces. |
Sources: package.json:8-16, README.md:102-116
Code Quality: Biome
Biome is used as an all-in-one tool for linting and formatting, replacing the need for ESLint and Prettier. It is configured via biome.json.
Sources: README.md:39-40, biome.json
Configuration
The biome.json file specifies formatting rules, linter settings, and files to be ignored.
| Section | Key | Value | Description |
|---|---|---|---|
formatter | indentStyle | space | Uses spaces for indentation. |
formatter | indentWidth | 2 | Sets indentation width to 2 spaces. |
linter | enabled | true | Enables the linter. |
linter.rules | recommended | true | Enables the recommended set of rules. |
organizeImports | enabled | true | Enables automatic organization of import statements. |
files | ignore | [...] | Specifies files and directories to ignore, such as node_modules, dist, and .turbo. |
Sources: biome.json:1-39
The following diagram shows the workflow when a developer runs the pnpm check command.
Sources: package.json:15, biome.json:20-36
TypeScript Configuration
A base tsconfig.base.json file provides shared TypeScript compiler options for all packages in the monorepo, ensuring consistency.
Key settings include:
"strict": true: Enables all strict type-checking options."noEmit": true: Prevents the compiler from outputting files, as bundling is handled by other tools likevinxiortsx."module": "ES2022": Specifies the module system."moduleResolution": "bundler": Uses the modern module resolution strategy."target": "ES2022": Targets modern JavaScript features.
Sources: tsconfig.base.json:3-26
Application-Specific Tooling
API (apps/api)
The API server uses specific tools for its development and execution environment.
tsx: Used to execute and watch TypeScript files directly without a separate compilation step. Thedevscript usestsx watch src/index.tsto provide a live-reloading development server.dotenv-cli: Loads environment variables from a.envfile into the application's process. Thewith-envscript prefixes commands to ensure variables are available.@scalar/hono-api-reference: Generates and serves interactive API documentation from an OpenAPI specification.
Sources: apps/api/package.json:5-7, apps/api/src/handlers/openapi.ts:4, 29-38
Web (apps/web)
The web frontend has its own set of development tools tailored for a React application.
vinxi: A tool used to run the development server (vinxi dev) and build the application for production (vinxi build).vitest: The testing framework used for running unit and component tests.vite-tsconfig-paths: A Vite plugin that enables the use of TypeScript path aliases (e.g.,@/components) in the application.
Sources: apps/web/package.json:6-12, apps/web/app.config.ts:1-16
Database (packages/db)
The database package uses drizzle-kit for schema management and dotenv-cli to load database connection strings from .env files.
drizzle-kit push: Pushes schema changes to the database.drizzle-kit studio: Opens a local GUI to browse and manage the database.
Sources: packages/db/package.json:14-17
Summary
The development tooling in this monorepo is a carefully selected stack that prioritizes performance, consistency, and developer experience. Turborepo provides a fast and intelligent build system, Biome ensures uniform code quality with minimal configuration, and TypeScript underpins the entire project with static typing. Application-specific tools like tsx, vinxi, and drizzle-kit further tailor the development process for the backend, frontend, and database layers, respectively, creating a cohesive and efficient workflow.
Sources: README.md:8-43