How worldfishcenter/peskas-next works
Major Components
• Monorepo Orchestrator: At the top, show Turborepo managing the entire monorepo. Indicate that it coordinates builds, caching, and task running based on the turbo.json file.
• Different Applications: Represent each app (isomorphic-i18n, isomorphic-starter, and isomorphic) as independent modules. These are the main Next.js applications hosting various pages, API routes, middleware, and client-side components.
• Shared Packages: Represent packages like isomorphic-core (which provides shared React components, hooks, utilities, and UI pieces), config-tailwind (global Tailwind configuration), and config-typescript (TypeScript settings). They should be shown as libraries that supply core functionality and styling across the apps.
• Infrastructure & Configurations: Include build configurations (package.json scripts, PNPM settings, and Turborepo’s turbo.json) as supporting artifacts that orchestrate the whole development and build process.
Relationships and Dependencies
• Build and orchestration layer through Turborepo, which ties everything together by invoking individual app builds as defined in the turbo.json file.
• For each app, illustrate internal divisions such as pages, API routes, server-side code (e.g., middleware, uploadthing routes), and client-side UI components (organized under layouts, shared, data, config, and validators). This further emphasizes the separation of concerns.
Architectural Patterns and Design Principles
• Next.js’s file-based routing is clearly visible, so show how the apps’ “src/app” directories host different features (e.g., authentication, dashboards, ecommerce, file management, etc.) in a modular fashion.
• Present the MVC or component-based separation: components and widgets (cards, charts, etc.) from isomorphic-core flow into views rendered by the Next.js apps.
• Use of shared configuration and global UI themes, which are centralized in packages (like config-tailwind) to maintain consistency.
Relevant Technologies and Frameworks
• Next.js and React for the frontend and server-side rendering.
• Turborepo to manage the monorepo build orchestration.
• PNPM as the package manager.
• Tailwind CSS for styling (supported by a dedicated package config).
• TypeScript throughout (supported by a configuration package).
• Any notable API services built using Next.js API routes and dedicated server scripts.