Skip to main content

Detailed Commands Reference

Comprehensive explanation of all package.json scripts across Sprout repositories.

sprout_backend

Build & Development

build

bun run build

What it does: Compiles TypeScript to JavaScript using NestJS CLI. Outputs to dist/ directory. When to use: Before deploying to production or running production commands. Output: Compiled JavaScript files in dist/ directory.

start

bun run start

What it does: Starts the NestJS application in production mode (runs compiled code from dist/). When to use: After building, to run the production server. Note: Requires bun run build first.

start:dev

doppler run -- bun run start:dev

What it does: Starts the development server with hot-reload/watch mode. Automatically restarts when files change. When to use: During active development. Port: 3000 (default) Features: Hot reload, source maps, detailed error messages.

start:debug

doppler run -- bun run start:debug

What it does: Starts the server in debug mode with watch. Enables Node.js inspector for debugging. When to use: When you need to debug the application (attach debugger). Debug Port: Usually 9229 (Node.js default) How to debug: Attach debugger to localhost:9229 or use VS Code debugger.

start:prod

doppler run -- bun run start:prod

What it does: Runs the production server directly (uses node dist/main). When to use: Production deployments. Note: Requires bun run build first.

Worker Commands

worker:dev

doppler run -- bun run worker:dev

What it does: Starts the background worker in development mode with watch. Processes BullMQ jobs. When to use: During development when testing background jobs. Port: 4001 (default) Features: Hot reload, processes jobs from Redis queues.

worker:debug

doppler run -- bun run worker:debug

What it does: Starts the worker in debug mode with watch. Enables Node.js inspector. When to use: When debugging background job processing. Debug Port: Usually 9229

worker:prod

doppler run -- bun run worker:prod

What it does: Runs the production worker (uses node dist/worker). When to use: Production deployments. Note: Requires bun run build first.

Code Quality

type:check

bun run type:check

What it does: Runs TypeScript compiler in check-only mode. Validates types without emitting files. When to use: Before committing code, in CI/CD pipelines. Output: Type errors if any, no files generated.

eslint:check

bun run eslint:check

What it does: Runs ESLint to check code quality without fixing issues. When to use: To verify code meets linting standards. Output: Lists linting errors and warnings.

lint

bun run lint

What it does: Runs ESLint with auto-fix enabled. Automatically fixes fixable issues. When to use: Before committing, to clean up code. Note: May modify files automatically.

prettier:check

bun run prettier:check

What it does: Checks if code is formatted according to Prettier rules. Does not modify files. When to use: In CI/CD to verify formatting. Output: Lists files that need formatting.

prettier:write

bun run prettier:write

What it does: Formats code using Prettier. Modifies files to match formatting rules. When to use: Before committing, to ensure consistent formatting. Note: Modifies files automatically.

format

bun run format

What it does: Formats source and test files using Prettier. When to use: General code formatting before commits. Files: src/**/*.ts and test/**/*.ts

Testing

test

bun test

What it does: Runs Jest test suite. Passes even if no tests are found. When to use: To run all tests. Output: Test results and coverage summary.

test:watch

bun run test:watch

What it does: Runs tests in watch mode. Re-runs tests when files change. When to use: During test-driven development. Features: Interactive mode, filters by file name or test name.

test:cov

bun run test:cov

What it does: Runs tests with coverage reporting. When to use: To check test coverage. Output: Coverage report in coverage/ directory and terminal.

test:debug

bun run test:debug

What it does: Runs tests in debug mode with Node.js inspector. When to use: When debugging failing tests. How to debug: Attach debugger to inspector port.

test:e2e

bun run test:e2e

What it does: Runs end-to-end tests. When to use: To test full application workflows. Note: May require services to be running (database, etc.).

Database & Code Generation

postinstall

bun run postinstall

What it does: Generates Prisma client from schema. Runs automatically after bun install. When to use: After schema changes, or manually if needed. Output: Generated Prisma client in node_modules/.prisma/client.

gen:skybox:openapi

bun run gen:skybox:openapi

What it does: Generates TypeScript types from Skybox OpenAPI schema. When to use: When Skybox API schema is updated. Output: src/lib/types/skybox.schema.d.ts

gen:ticketmaster:openapi

bun run gen:ticketmaster:openapi

What it does: Generates TypeScript types from Ticketmaster OpenAPI schema. When to use: When Ticketmaster API schema is updated. Output: src/lib/types/ticketmaster-discovery.schema.d.ts

gen:tickops:openapi

bun run gen:tickops:openapi

What it does: Generates TypeScript types from TickOps OpenAPI schema. When to use: When TickOps API schema is updated. Output: src/lib/types/tickops.schema.d.ts

CLI Commands

cli

doppler run -- bun run cli -- command-name [options]

What it does: Runs CLI commands using compiled code (production build). When to use: In production or after building. Note: Requires bun run build first. Use double dashes (--) before command name.

cli:dev

doppler run -- bun run cli:dev -- command-name [options]

What it does: Runs CLI commands in development mode using ts-node. When to use: During development, no build required. Note: Use double dashes (--) before command name.

sprout_etl

Build & Development

build

bun run build

What it does: Compiles TypeScript to JavaScript using tsc. Outputs to dist/ directory. When to use: Before deploying to production. Output: Compiled JavaScript files in dist/ directory.

start

bun run start

What it does: Starts the ETL service using compiled code (node dist/main.js). When to use: Production deployments. Note: Requires bun run build first.

start:dev

doppler run -- bun run start:dev

What it does: Starts the development server using ts-node. No build required. When to use: During active development. Port: 3001 (default) Features: Hot reload via ts-node, source maps.

start:debug

doppler run -- bun run start:debug

What it does: Starts the server in debug mode with Node.js inspector. When to use: When debugging the ETL service. Debug Port: Usually 9229

start:prod

doppler run -- bun run start:prod

What it does: Runs the production server (node dist/main.js). When to use: Production deployments. Note: Requires bun run build first.

Worker Commands

worker:dev

doppler run -- bun run worker:dev

What it does: Starts the ETL background worker in development mode. When to use: During development when testing background processing. Features: Processes BullMQ jobs, hot reload.

worker:debug

doppler run -- bun run worker:debug

What it does: Starts the worker in debug mode. When to use: When debugging background job processing.

worker:prod

doppler run -- bun run worker:prod

What it does: Runs the production worker (node dist/worker.js). When to use: Production deployments.

Code Quality

All code quality commands are the same as sprout_backend:

  • type:check - Type checking
  • eslint:check - Lint check
  • lint - Lint with auto-fix
  • prettier:check - Prettier check
  • prettier:write - Prettier format
  • format - Format code

Testing

All testing commands are the same as sprout_backend:

  • test - Run tests
  • test:watch - Watch mode
  • test:cov - Coverage
  • test:debug - Debug mode
  • test:e2e - E2E tests

Database & Code Generation

postinstall

bun run postinstall

What it does: Generates Prisma client with custom schema path. When to use: After schema changes. Note: Uses --schema=./prisma/schema.prisma

gen:skybox:openapi

bun run gen:skybox:openapi

What it does: Generates Skybox TypeScript types. Output: src/lib/types/skybox.schema.d.ts

gen:ticketmaster:openapi

bun run gen:ticketmaster:openapi

What it does: Generates Ticketmaster TypeScript types. Output: src/lib/types/ticketmaster-discovery.schema.d.ts

gen:tickops:openapi

bun run gen:tickops:openapi

What it does: Generates TickOps TypeScript types. Output: src/lib/types/tickops.schema.d.ts

CLI Commands

cli

doppler run -- bun run cli -- command-name [options]

What it does: Runs CLI commands (production build). When to use: After building. Note: Requires build first.

cli:dev

doppler run -- bun run cli:dev -- command-name [options]

What it does: Runs CLI commands in development mode. When to use: During development. Note: No build required. See CLI_COMMANDS.md for available commands.

pricing_dashboard

Development

dev

bun run dev

What it does: Starts Vite development server with hot module replacement (HMR). When to use: During frontend development. Port: 5173 (default) Features: Fast HMR, instant updates, source maps.

build

bun run build

What it does: Builds the React application for production. Compiles TypeScript and bundles assets. When to use: Before deploying to production. Output: Production build in dist/ directory.

preview

bun run preview

What it does: Serves the production build locally for testing. When to use: To test production build before deploying. Note: Requires bun run build first.

Code Quality

lint

bun run lint

What it does: Runs ESLint to check code quality. When to use: Before committing code.

cloudflare-workers

Development

dev

bun run dev

What it does: Starts Wrangler local development server for Cloudflare Workers. When to use: During development of Cloudflare Workers. Features: Local testing, hot reload, local KV/D1/Durable Objects.

check

bun run check

What it does: Type checks TypeScript and validates Wrangler configuration (dry-run deploy). When to use: Before deploying, in CI/CD. Output: Type errors and configuration validation.

Deployment

deploy

bun run deploy

What it does: Deploys the worker to Cloudflare. When to use: To deploy to production. Note: Runs predeploy script first.

predeploy

bun run predeploy

What it does: Applies D1 database migrations to remote database. When to use: Automatically before deploy. Note: Runs automatically before deploy.

Database

seedLocalD1

bun run seedLocalD1

What it does: Applies D1 migrations to local D1 database. When to use: When setting up local development or testing migrations.

types

bun run types

What it does: Generates TypeScript types from Wrangler configuration. When to use: After updating Wrangler configuration. Output: Type definitions for Cloudflare bindings.

Testing

test-scraping

bun run test-scraping

What it does: Tests scraping functionality. When to use: To test scraping logic locally.

trigger-scraping

bun run trigger-scraping

What it does: Triggers scraping manually via curl to local server. When to use: To manually trigger scraping during development.

trigger-processor

bun run trigger-processor

What it does: Triggers processor manually via curl to local server. When to use: To manually trigger processing during development.

trigger-prod

bun run trigger-prod

What it does: Triggers scraping in production via curl. When to use: To manually trigger production scraping. Note: Uses production worker URL.

skybox_token_extractor

Development

dev

bun run dev

What it does: Starts development server with nodemon (auto-restart on changes). When to use: During development. Port: 3000 (internal), 3005 (Docker)

start

bun start

What it does: Starts production server. When to use: Production deployments.

Setup

install-browsers

bun run install-browsers

What it does: Installs Playwright browser binaries required for automation. When to use: First time setup, after Playwright updates. Note: Required for the service to work.

overlevered_app

Development

dev

bun run dev

What it does: Starts Vite development server. When to use: During frontend development.

build

bun run build

What it does: Builds React app for production. When to use: Before deploying.

preview

bun run preview

What it does: Serves production build locally. When to use: To test production build.

lint

bun run lint

What it does: Runs ESLint. When to use: Before committing.

overlevered_server

Development

serve

bun run serve

What it does: Starts Firebase emulators with function debugging. When to use: Local development with Firebase emulators.

devStart

bun run devStart

What it does: Starts server with nodemon for auto-restart. When to use: Development with TypeScript watch.

build

bun run build

What it does: Compiles TypeScript to JavaScript. When to use: Before deploying. Output: lib/ directory.

watch

bun run watch

What it does: Compiles TypeScript in watch mode (auto-recompile on changes). When to use: During development.

Deployment

deploy

bun run deploy

What it does: Deploys Firebase Cloud Functions. When to use: To deploy to production.

logs

bun run logs

What it does: Views Firebase Function logs. When to use: To debug production issues.

Stripe

stripe:listen

bun run stripe:listen

What it does: Starts Stripe CLI webhook listener, forwards to local function. When to use: To test Stripe webhooks locally. Note: Requires Stripe CLI installed.

Common Patterns

Running with Doppler

All commands that need environment variables should use:

doppler run -- <command>

Database Migrations

doppler run -- npx prisma migrate dev

Type Checking

Most repos support:

bun run type:check

Building for Production

  1. Install dependencies: bun install
  2. Build: bun run build
  3. Run: doppler run -- bun run start:prod

Next Steps