How glasshouseventurestudio/glasshouse-stack works
Project Type and Purpose
• This is a frontend-focused monorepo (Turborepo) that hosts:
• A React component library (@glasshouse/components)
• Shared utilities (@glasshouse/utils)
• Shared style/config packages (@glasshouse/style-guide)
• A Storybook-powered docs site (apps/docs)
• (Optionally) a demo Next.js app (mentioned in README)
• It’s intended to be the single source of truth for Glasshouse UI building blocks, developer tools, and documentation, all orchestrated by Turborepo, Changesets, pnpm, and GitHub Actions.
Top-Level System Components
• Version Control & CI/CD Platform
• GitHub (main branch)
• GitHub Actions workflows (quality/lint, Chromatic, release)
• Changesets (semantic versioning & release orchestration)
• Monorepo Orchestrator
• Turborepo (task runner + caching)
• pnpm workspace (dependency manager)
• Packages (internal modules)
• style-guide: ESLint/Prettier/StyleLint/TS configs
• utils: shared React hooks & utilities
• components: UI primitives & patterns
• Applications
• docs: Storybook site that:
– Imports components + utils + style-guide configs
– Serves documentation & visual regression (Chromatic)
• (demo): Next.js demo site that imports published packages
• External Services
• npm registry (public publishing)
• GitHub Packages (optional)
• Chromatic (storybook visual tests)
Relationships & Data Flows
• Developer commits → GitHub → triggers CI pipelines
• “changeset” CLI → generates version bump PR → merge → GitHub Actions release → publishes to npm
• Turborepo coordinates build/test/lint across packages & apps
• docs site depends on local packages (via pnpm workspace links) during dev, and on published packages in CI for Chromatic
• apps/docs → Storybook → Chromatic
• apps/demo (Next.js) → imports published packages from npm / GitHub Packages
Architectural Patterns & Design Principles
• Monorepo with clear package boundaries
• Task orchestration & remote cache (Turborepo)
• Semantic versioning via Changesets
• CI pipeline per concern: lint/test/build, visual test, release
• Code sharing via workspaces (pnpm) and peer dependencies
• Documentation as first-class citizen (Storybook)