How filecoinfoundationweb/filecoin-foundation works
Monorepo and Build System
• At the highest level, show the monorepo’s central control via Turborepo. Label a “Build & Task Runner” component that represents Turborepo, including its remote caching feature (with Vercel) and the commands (dev, build, start).
• Version control and CI/CD integration by including GitHub workflow components (e.g., pull_request_template, dependabot, various CI pipelines).
Applications (the “apps” directory)
• Main applications. For example, you have multiple web sites such as “ff-site” and “ffdweb-site.”
• For each application, indicate that they are Next.js (or similar React-based) projects. You might show separate blocks for client-side code, public assets (assets, images, etc.), routing configurations (next.config.js, page directories), and testing (Cypress tests).
Shared Packages (the “packages” directory)
• ESLint and Typescript configurations (e.g., eslint-config, typescript-config).
• React hooks (e.g., hooks) providing shared state and interface logic.
• UI components (e.g., packages/ui) which encapsulate common components (buttons, navigation, layout, etc.).
• Utility functions and shared tools (e.g., packages/utils) that include functions for markdown processing, image utilities, URL manipulations, schema definitions, etc.
• How these packages are consumed by various applications in the “apps” directory.
Architectural Patterns & Design Principles
• Modularity and reusability. The separation between applications and shared packages shows an adherence to the DRY principle.
• Demonstrate a component-based architecture (reflecting React and Next.js solutions) along with clear separation of concerns (presentation, state management, utility functions).
Data Flow & Interactions
• Build system (Turborepo) with both the applications and the packages to demonstrate how a single developer command (like “npm run dev” or “turbo dev”) triggers all individual apps.
Additional Components
• CI/CD and remote caching: Create a “CI/CD” block that incorporates all configured GitHub workflows and Turborepo’s caching (including Vercel integration).
• Configuration and deployment: Include a configuration node that points to tools like Next.js configuration (next.config.js), postcss.config.js, and package.json build scripts.
• Testing: Mark out the testing modules, especially Cypress, to show that there’s automated end-to-end testing for each application.