How noahm/ddrcarddraw works
Main components of the system
• Frontend (User Interface)
• All files under the src/ directory form the core of the React application.
• Subcomponents/directories such as controls, eligible-charts, song-card, song-search, tournament-mode, etc.
• Assets like jacket images and internationalization files (i18n.json) that support styling and localization.
• Incorporate state management (e.g., Zustand-related files) and common hooks that manage component state.
• Data Management & Import Pipelines
• The scripts/ directory contains a series of Node scripts that import and update song data from different sources (e.g., DDR, ITG, Pump it Up, SMX). These include both data ingestion and scraping tools.
• The JSON song data stored in src/songs indicates the persistence of game data.
• Build & Deployment Infrastructure
• Files like webpack.config.js, tsconfig.json, package.json, and .yarn files define build configuration, dependency management, and bundling.
• GitHub workflows (in .github/workflows) illustrate the CI/CD process.
• Documentation & Community
• The docs/ folder along with CONTRIBUTING and networking guides support the project’s broader community interaction although these are not part of the runtime design.
Relationships and Data Flow
• The build and deployment system (Yarn, Webpack, GitHub actions) is responsible for compiling the app, running validations (such as the JSON format check via “yarn validate:json”), and producing the final offline-app package.
Architectural Patterns and Principles
• Component-based architecture in the React app – each directory under src/ (for example, controls, song-card, tournament-mode) represents a distinct UI module.
• Separation of concerns – clear division between the UI (React front end) and the data ingestion workflows (scripts/).
• State management using a central store (Zustand) to share state between components, emphasizing maintainability.
• The project also leverages automated CI/CD pipelines for testing and deployment, as indicated by workflow configurations in .github/workflows.
Relevant Technologies and Frameworks
• React (with TypeScript) for the UI.
• Zustand for state management.
• Node.js (with Yarn as package manager) for scripting and build processes.
• Webpack for bundling the application.
• Various libraries to support internationalization, styling (CSS files), and possibly data validation (the JSON schema file).
• GitHub Actions for CI/CD integration.