How 0xa3k5/web3icons works
Project’s Main Components
• Apps:
• Packages:
• @web3icons/common (packages/common): Holds shared metadata (JSON files defining tokens, networks, wallets, exchanges) used across the ecosystem.
• @web3icons/utils (packages/utils): Contains build scripts, scaffolding, and utility functions for tasks like SVG optimization, metadata generation, and maintaining naming conventions.
• ESLint and configuration packages (packages/eslint-config): Provide consistency and code quality checks across the project.
• Assets and Raw SVGs:
• Build configuration files (e.g., tailwind.config.js, tsconfig.json) that affect styling and type-checking in the apps.
Relationships and Interactions
• The build process (managed by scripts in packages/utils) takes input from raw SVGs and metadata. It processes these assets to generate:
• Optimized SVG modules (in @web3icons/core)
• Updated metadata (in packages/common)
• React component definitions (in @web3icons/react)
• The ESLint and Prettier configuration files ensure consistency in code format across the various packages and apps.
Architectural Patterns and Technologies
• Monorepo Structure: The repository is organized as a monorepo (using TurboRepo as indicated by turbo.json) that shares common configurations and build tools.
• Separation of Concerns:
• UI concerns are managed in the apps (website and Figma plugin).
• Build and maintenance scripts are encapsulated in the utils package.
• Technologies include Next.js for the website, React for component rendering, Tailwind CSS for styling, and TypeScript across packages for type safety.