How productofamerica/turbo-starter works
Main Components
• apps/web: This is the core Next.js 15 application. It represents your frontend (or full-stack if API routes are used) and includes relevant configuration files like next.config.mjs, layout.tsx, and accompanying assets.
• packages/ui: A shared library of UI components built with Shadcn UI and styled using Tailwind CSS, which is consumed by the web app for consistency and reuse.
• packages/typescript-config: A package containing shared TypeScript settings for different use cases (Next.js app, React libraries, etc.), ensuring consistent coding standards across your monorepo.
• Docker & Turborepo: Not “code” components per se, but critical infrastructure pieces. Docker (with docker-compose.yml and Dockerfile references) encapsulates the app for consistent environments, while Turborepo (via turbo.json) orchestrates builds, caching, and task running across the monorepo.
• CI/CD Workflows: The GitHub workflows (under .github/workflows/ci.yml) indicate automated processes for builds and tests.
Relationships & Data Flow
• The apps/web component depends on the shared UI components (from packages/ui) and leverages the consistent TypeScript settings (from packages/typescript-config).
• Docker (docker-compose.yml, Dockerfile in apps/web) provides an encapsulated deployment environment. Show Docker as an outer container wrapping the apps/web and possibly shared packages if they need containerized environments.
Architectural Patterns & Design Principles
• Monorepo Structure: Visually separate the “apps” and “packages” directories to emphasize modularity and reusability.
• Shared Component Library: Clearly outline that apps/web “imports” or “consumes” UI components from packages/ui.
• Consistent Configuration: The shared TypeScript config illustrates a centralized policy, so mark it as a system-wide configuration that influences both the web app and any React libraries.
• Containerization and Automation: Docker for consistent environments and Turborepo for task orchestration are both key to enabling robust CI/CD practices.
Relevant Technologies/Frameworks
• Next.js 15 (with Turbopack if applicable), React, Tailwind CSS, Shadcn UI – Document these within the frontend component.
• Turborepo as the build orchestrator.
• Docker for container management coupled with Docker Compose.
• pnpm Workspaces for dependency management within the monorepo.