How dangvanthanh/remix-turborepo-boilerplate works
Project Type & Purpose
• This is a full-stack monorepo managed by Turborepo and pnpm.
• The core application is a Remix web app (“apps/web”), which bundles both client and server logic.
• The monorepo also contains reusable packages for UI components, shared utilities, internationalization, and configuration.
File Structure
• Top-level directories:
• /apps/web (Remix app)
• /packages/ui (Shadcn-based React UI library)
• /packages/shared (generic hooks & functions)
• /packages/i18n (Lingui integration & locale files)
• /packages/biome-config & /packages/typescript-config (repo-wide lint/TS presets)
• Build/tool config files at root: turbo.json, package.json, pnpm workspace, Biome, Vite, Tailwind, etc.
README Insights
• Confirms:
• pnpm as package manager
• Turborepo for workspace orchestration & remote caching
• TypeScript, Biome, Shadcn UI, Remix, Vite as main technologies
• No external database or microservices—purely front-end/backend in one Remix app.
Main Components & Their Relationships
a. Monorepo Root
• Orchestrator: Turborepo CLI, pnpm workspace, shared configs (biome, TS).
b. apps/web (Remix App)
• Client Bundle (entry.client.tsx → Vite → browser)
• Server Runtime (entry.server.tsx → Remix server → Node)
• Route Handlers (app/routes/*.tsx invoking loaders/actions)
• UI Components imported from packages/ui
• Shared Utilities imported from packages/shared
• i18n Layer (Lingui) via packages/i18n
• Styling: Tailwind CSS config + global/styles.css
c. packages/ui
• React component library with Storybook stories
• Exposed via package imports to apps/web
d. packages/shared
• Utility functions & custom hooks
• Consumed by both server loaders and client code
e. packages/i18n
• Lingui tooling + locale files
• Provides translation loader hooks & Remix route integrations
f. Config Packages
• biome-config: centralized lint/format settings
• typescript-config: TS base/React/Next presets
g. Build & Dev Toolchain
• Turbo: orchestrates pnpm run dev / build, remote caching (Vercel)
• pnpm: physical linking of workspace packages
• Vite: dev server & bundler for the Remix client
• Tailwind: CSS utility framework
• Biome: linting/formatting
Architectural Patterns & Design Principles
• Monorepo Pattern: single repo, multiple packages & apps
• Code Reuse: UI & shared logic abstracted into packages
• Separation of Concerns within the Remix app: client vs. server entrypoints, routes vs. components
• Orchestration: Turborepo’s pipeline for parallel builds & caching