monorepo-overview
GROWI monorepo structure, workspace organization, and architectural principles. Auto-invoked for all GROWI development work.
Install
mkdir -p .claude/skills/monorepo-overview && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5351" && unzip -o skill.zip -d .claude/skills/monorepo-overview && rm skill.zipInstalls to .claude/skills/monorepo-overview
About this skill
GROWI Monorepo Overview
GROWI is a team collaboration wiki platform built as a monorepo using pnpm workspace + Turborepo.
Monorepo Structure
growi/
├── apps/ # Applications
│ ├── app/ # Main GROWI application (Next.js + Express + MongoDB)
│ ├── pdf-converter/ # PDF conversion microservice (Ts.ED + Puppeteer)
│ └── slackbot-proxy/ # Slack integration proxy (Ts.ED + TypeORM + MySQL)
├── packages/ # Shared libraries
│ ├── core/ # Core utilities and shared logic
│ ├── core-styles/ # Common styles (SCSS)
│ ├── editor/ # Markdown editor components
│ ├── ui/ # UI component library
│ ├── pluginkit/ # Plugin framework
│ ├── slack/ # Slack integration utilities
│ ├── presentation/ # Presentation mode
│ ├── pdf-converter-client/ # PDF converter client library
│ └── remark-*/ # Markdown plugins (remark-lsx, remark-drawio, etc.)
└── Configuration files
├── pnpm-workspace.yaml
├── turbo.json
├── package.json
└── .changeset/
Workspace Management
pnpm Workspace
All packages are managed via pnpm workspace. Package references use the workspace: protocol:
{
"dependencies": {
"@growi/core": "workspace:^",
"@growi/ui": "workspace:^"
}
}
Turborepo Orchestration
Turborepo handles task orchestration with caching and parallelization:
# Run tasks across all workspaces
turbo run dev
turbo run test
turbo run lint
turbo run build
# Filter to specific package
turbo run test --filter @growi/app
turbo run lint --filter @growi/core
Build Order Management
Build dependencies in this monorepo are not declared with dependsOn: ["^build"] (the automatic workspace-dependency mode). Instead, they are declared explicitly — either in the root turbo.json for legacy entries, or in per-package turbo.json files for newer packages.
When to update: whenever a package gains a new workspace dependency on another buildable package (one that produces a dist/), declare the build-order dependency explicitly. Without it, Turborepo may build in the wrong order, causing missing dist/ files or type errors.
Pattern — per-package turbo.json (preferred for new dependencies):
// packages/my-package/turbo.json
{
"extends": ["//"],
"tasks": {
"build": { "dependsOn": ["@growi/some-dep#build"] },
"dev": { "dependsOn": ["@growi/some-dep#dev"] }
}
}
"extends": ["//"]inherits all root task definitions; only add the extradependsOn- Keep root
turbo.jsonclean — package-level overrides live with the package that owns the dependency - For packages with multiple tasks (watch, lint, test), mirror the dependency in each relevant task
Existing examples:
packages/slack/turbo.json—build/devdepend on@growi/loggerpackages/remark-attachment-refs/turbo.json— all tasks depend on@growi/core,@growi/logger,@growi/remark-growi-directive,@growi/ui- Root
turbo.json—@growi/ui#builddepends on@growi/core#build(pre-dates the per-package pattern)
Architectural Principles
1. Feature-Based Architecture (Recommended)
All packages should prefer feature-based organization:
{package}/src/
├── features/ # Feature modules
│ ├── {feature-name}/
│ │ ├── index.ts # Main export
│ │ ├── interfaces/ # TypeScript types
│ │ ├── server/ # Server-side logic (if applicable)
│ │ ├── client/ # Client-side logic (if applicable)
│ │ └── utils/ # Shared utilities
Benefits:
- Clear boundaries between features
- Easy to locate related code
- Facilitates gradual migration from legacy structure
2. Server-Client Separation
For full-stack packages (like apps/app), separate server and client logic:
- Server code: Node.js runtime, database access, API routes
- Client code: Browser runtime, React components, UI state
This enables better code splitting and prevents server-only code from being bundled into client.
3. Shared Libraries in packages/
Common code should be extracted to packages/:
- core: Domain hub (see below)
- ui: Reusable React components
- editor: Markdown editor
- pluginkit: Plugin system framework
@growi/core — Domain & Utilities Hub
@growi/core is the foundational shared package depended on by all other packages (10 consumers). Its responsibilities:
- Domain type definitions — Single source of truth for cross-package interfaces (
IPage,IUser,IRevision,Ref<T>,HasObjectId, etc.) - Cross-cutting utilities — Pure functions for page path validation, ObjectId checks, serialization (e.g.,
serializeUserSecurely()) - System constants — File types, plugin configs, scope enums
- Global type augmentations — Runtime/polyfill type declarations visible to all consumers (e.g.,
RegExp.escape()viadeclare globalinindex.ts)
Key patterns:
- Shared types and global augmentations go in
@growi/core— Not duplicated per-package.declare globalinindex.tspropagates to all consumers through the module graph. - Subpath exports for granular imports —
@growi/core/dist/utils/page-path-utilsinstead of barrel imports from root. - Minimal runtime dependencies — Only
bson-objectid; ~70% types. Safe to import from both server and client contexts. - Server-specific interfaces are namespaced — Under
interfaces/server/. - Dual format (ESM + CJS) — Built via Vite with
preserveModules: trueandvite-plugin-dts(copyDtsFiles: true).
Version Management with Changeset
GROWI uses Changesets for version management and release notes:
# Add a changeset (after making changes)
npx changeset
# Version bump (generates CHANGELOGs and updates versions)
pnpm run version-subpackages
# Publish packages to npm (for @growi/core, @growi/pluginkit)
pnpm run release-subpackages
Changeset Workflow
- Make code changes
- Run
npx changesetand describe the change - Commit both code and
.changeset/*.mdfile - On release, run
pnpm run version-subpackages - Changesets automatically updates
CHANGELOG.mdandpackage.jsonversions
Version Schemes
- Main app (
apps/app): Manual versioning with RC prereleasespnpm run version:patch,pnpm run version:prerelease
- Shared libraries (
packages/core,packages/pluginkit): Changeset-managed - Microservices (
apps/pdf-converter,apps/slackbot-proxy): Independent versioning
Package Categories
Applications (apps/)
| Package | Description | Tech Stack |
|---|---|---|
| @growi/app | Main wiki application | Next.js (Pages Router), Express, MongoDB, Jotai, SWR |
| @growi/pdf-converter | PDF export service | Ts.ED, Puppeteer |
| @growi/slackbot-proxy | Slack bot proxy | Ts.ED, TypeORM, MySQL |
Core Libraries (packages/)
| Package | Description | Published to npm |
|---|---|---|
| @growi/core | Core utilities | ✅ |
| @growi/pluginkit | Plugin framework | ✅ |
| @growi/ui | UI components | ❌ (internal) |
| @growi/editor | Markdown editor | ❌ (internal) |
| @growi/core-styles | Common styles | ❌ (internal) |
Development Workflow
Initial Setup
# Install dependencies for all packages
pnpm install
# Bootstrap (install + build dependencies)
turbo run bootstrap
Daily Development
# Start all dev servers (apps/app + dependencies)
turbo run dev
# Run a specific test file (from package directory)
pnpm vitest run yjs.integ
# Run ALL tests / lint for a package
turbo run test --filter @growi/app
turbo run lint --filter @growi/core
Cross-Package Development
When modifying shared libraries (packages/*), ensure dependent apps reflect changes:
- Make changes to
packages/core - Turborepo automatically detects changes and rebuilds dependents
- Test in
apps/appto verify
Key Configuration Files
- pnpm-workspace.yaml: Defines workspace packages
- turbo.json: Turborepo pipeline configuration
- .changeset/config.json: Changeset configuration
- tsconfig.base.json: Base TypeScript config for all packages
- vitest.workspace.mts: Vitest workspace config
- biome.json: Biome linter/formatter config
Design Principles Summary
- Feature Isolation: Use feature-based architecture for new code
- Server-Client Separation: Keep server and client code separate
- Shared Libraries: Extract common code to packages/
- Type-Driven Development: Define interfaces before implementation
- Progressive Enhancement: Migrate legacy code gradually
- Version Control: Use Changesets for release management
More by growilabs
View all skills by growilabs →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversSync Trello with Google Calendar easily. Fast, automated Trello workflows, card management & seamless Google Calendar in
Transform your notes with Markdown Mindmap—convert Markdown into interactive mind maps for organized, visual knowledge r
Manage Supabase projects and organizations effortlessly — centralized control, secure access, role management, and real-
Think Tool offers Claude a structured workspace for recording, retrieving, and analyzing thoughts to enhance complex pro
Integrate with Tana's Input API to automate data input and manage structured notes in Tana workspaces effortlessly.
Manage project task dependencies easily. Organize tasks, set priorities, and track progress with a structured API for pr
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.