Skip to content

dash-soft/ProjectDesignDocument

Repository files navigation

Monorepo (Turborepo + SvelteKit)

A multi-app monorepo powered by Turborepo and pnpm. It contains multiple SvelteKit applications and shared packages with unified TypeScript, ESLint, and Prettier configuration.

Prerequisites

  • Node.js >= 18
  • pnpm (managed via Corepack; see below)

Package manager: pnpm via Corepack

This repository pins pnpm via the packageManager field in package.json (with an integrity hash). Use pnpm; Corepack will automatically activate the correct version.

  • Corepack is installed alongside Node.js. More info: https://github.com/nodejs/corepack
  • Usually you can run pnpm commands directly and Corepack will take care of the version.
  • If pnpm is not available:
    corepack enable
    corepack prepare pnpm@latest --activate

Corepack will still respect the version pinned in packageManager.

Quick start

  1. Install dependencies:
    pnpm install
  2. Start development (Turborepo orchestrates all dev tasks):
    pnpm dev
  3. Build everything:
    pnpm build
  4. Lint, format, and type-check:
    pnpm lint
    pnpm format
    pnpm check-types

Project structure (high level)

  • apps/
    • web/ — SvelteKit app
    • docs/ — SvelteKit app
    • api/ — service/API app (if applicable)
  • packages/
    • ui/ — shared Svelte component library
    • eslint-config/ — centralized ESLint configuration
    • typescript-config/ — shared tsconfig bases

Turborepo usage

Turborepo runs tasks across workspaces, respects dependency order, and caches results for faster subsequent runs.

Common tasks from the repository root:

  • Development: pnpm dev
  • Build: pnpm build
  • Lint: pnpm lint
  • Format: pnpm format
  • Type-check: pnpm check-types

Filter to a single app/package:

# Using pnpm filter
pnpm --filter ./apps/web dev
pnpm --filter ./apps/docs build
pnpm --filter ./packages/ui lint

# Or call turbo directly
pnpm turbo run dev --filter=./apps/docs
pnpm turbo run build --filter=./apps/web

Environment variables

  • Store env files alongside each app (e.g., apps/<app>/.env, .env.local, etc.).
  • For SvelteKit, prefix publicly exposed variables with PUBLIC_.
  • Do not commit secrets; prefer .env.local for local overrides.
  • Task caches are invalidated when .env* files change.

Working in JetBrains GoLand

Most development for this repository used JetBrains GoLand.

  • Configure a Node.js interpreter (Node >= 18) in Settings/Preferences.
  • Ensure pnpm is used via Corepack (no global pnpm required). If needed, run corepack enable.
  • Use Run/Debug configurations to run root scripts like pnpm dev, pnpm build, or filtered commands.
  • Enable ESLint and Prettier integrations to match repo settings.

Troubleshooting

  • Corepack/pnpm not found:
    corepack enable
    corepack prepare pnpm@latest --activate
  • Clean install:
    rm -rf node_modules
    pnpm install
  • Prune pnpm store (optional):
    pnpm store prune
  • Verbose logs:
    pnpm dev -vv

Useful links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published