monorepo-structure

Determine file placement and package boundaries in pnpm and Turborepo monorepos.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nizarghribi/hounii-monorepo-first --skill monorepo-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monorepo-structure
Source: https://github.com/nizarghribi/hounii-monorepo-first/tree/main/.claude/skills/monorepo-structure
Command: npx skills add https://github.com/nizarghribi/hounii-monorepo-first --skill monorepo-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Navigating a large monorepo can be daunting, leading to confusion about where to place files, how packages interact, and how to maintain consistency. This Skill provides a clear, comprehensive guide to the Hounii monorepo's architecture, ensuring developers can quickly understand and contribute effectively.

Core Features & Use Cases

  • Clear Directory Mapping: Instantly identifies the correct location for mobile features, web pages, UI components, business logic, and database changes.
  • Workspace Configuration Insights: Explains pnpm and Turborepo setup, including task pipelines and dependency management, for efficient cross-package operations.
  • Decision Tree for File Placement: Offers a structured approach to determine where any new file or component should reside, eliminating guesswork.
  • Use Case: When adding a new shared utility function, use this Skill to quickly determine it belongs in packages/lib/src/, understand how to export it, and how other apps can consume it.

Quick Start

Use the monorepo-structure skill to find out where to add a new shared utility function that formats dates for both mobile and web applications.

Frequently Asked Questions about monorepo-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize files in a pnpm and Turborepo monorepo?

Organize files by workspace type: place shared utilities in `packages/lib/src/`, UI components in designated UI packages, mobile features in the mobile app workspace, web pages in the web app workspace, and database migrations in a dedicated migrations package. This structure aligns with pnpm and Turborepo configurations for efficient dependency management and task pipelines across packages.

Where should I add a new shared utility or component in a multi-app monorepo?

Use a decision tree based on the utility's purpose: shared logic goes in `packages/lib/src/`, UI components in the UI package, internationalization strings in the i18n package, and API utilities in the api package. Each package exports through its designated entry point, allowing mobile, web, and admin apps to consume it consistently.

What's the best way to structure package boundaries and workspace configuration in Turborepo?

Define clear package boundaries by assigning distinct responsibilities: apps (mobile, web, admin) remain independent, shared packages (lib, ui, i18n, api) serve all apps, and utilities are centralized. Configure pnpm workspaces and Turborepo task pipelines to map dependencies, ensuring consistent directory schemas and automated task execution across packages.

Can I maintain consistency across multiple apps in a monorepo without clear guidelines?

No; without structured guidelines, developers place files inconsistently, leading to confusion and maintenance issues. A comprehensive directory mapping and decision tree eliminates guesswork, establishes where mobile features, web pages, UI components, business logic, and migrations belong, and ensures all contributors follow the same organizational standards.

How do pnpm and Turborepo configurations support file placement decisions?

pnpm workspace configuration defines which directories are packages and manages their interdependencies; Turborepo task pipelines orchestrate builds and scripts across packages. Together, they enforce consistent file placement by restricting imports to declared dependencies and automating cross-package operations, preventing orphaned or misplaced files.

Related Skills