How mayursmahajan/anycarousel works
Project Type & Purpose
• This is a Turborepo-powered monorepo containing:
• A React component library (“react-any-carousal” in packages)
• Two Next.js applications under apps:
– docs (documentation/demo playground)
– web (demo site)
• Shared config packages for ESLint and TypeScript
• Purpose: build, test, document, and demo a highly customizable carousel component.
Main Components
• Monorepo Orchestrator (Turborepo)
• Packages Layer
• react-any-carousal (core carousel library)
• eslint-config (shared lint rules)
• typescript-config (shared tsconfig presets)
• Apps Layer
• apps/docs (Next.js 13 “app” directory for docs/demo)
• apps/web (Next.js demo site)
• External Services
• npm registry (for publishing/react installation)
• Dev machine (Node.js runtime, npm/Yarn)
Relationships & Data Flows
• Developer → clones monorepo → runs npm install
• Turborepo reads turbo.json → orchestrates build, lint, test across all packages & apps
• apps/docs & apps/web declare dependencies on:
• react-any-carousal (library code)
• eslint-config & typescript-config (via devDependencies)
• react-any-carousal builds (tsc, jest tests) → outputs JS/CSS → gets consumed by apps
• On publishing: react-any-carousal → npm registry → external consumers
Architectural Patterns & Design Principles
• Monorepo with explicit separation of packages vs apps
• “Single source of truth” for linting and TS settings via package configs
• New Next.js “app” directory structure in both apps (server/client components)
• CI/CD pipelines likely leverage Turborepo’s caching & parallelization
• Component-driven development: core library + live demo (docs, web)
Components
• From Turborepo → each package/app (“build”, “test”, “lint”)
• From apps → react-any-carousal (“imports component library”)
• From react-any-carousal → npm registry (“publish”)
Detail
• Next.js “app” directory in apps to show SSR/edge routes vs client components
• Shared configs to stress “single source of truth” for linting/TS rules