How alejandrojbarellano/examsocial-components works
Main Components
• Core Component Library – This is the “lib” directory, where nearly all of the React components reside. Each subfolder under “lib/components” (such as Button, ExamCard, Dialog, etc.) represents a distinct UI element.
• Illustrations – Located under “lib/Illustrations”. These include logos, placeholders, and other SVG/JSX illustration elements that are shared across components.
• Utility & Core Files – Files such as “lib/utils.ts”, “lib/constants.ts”, “lib/types.ts”, and “lib/index.ts” form the underlying support system for the components.
• Fonts & Design Assets – The “lib/fonts” folder contains multiple font families (Satoshi and Sentient) with their corresponding configuration, CSS, and license files.
• Documentation – The “docs” folder along with files like DOCUMENTATION.md and CODING_STANDARDS.md provide information about the components, usage guidelines, and style guides.
• Development & Testing Tools – Storybook (in the “.storybook” directory), testing files (e.g., *.test.tsx), and configuration files (e.g., tailwind.config.js, postcss.config.js, vite.config.ts) support the development process.
Relationships and Interactions
• The client application consumes the component library by importing components from “examsocial-components”. Therefore, include an external “Consumer Application” block that imports from the Component Library.
• Illustrations and Fonts are shared assets used across multiple UI components. Visually connect these assets to the Core Component Library.
Architectural Patterns and Design Principles
• Modular Design – Each component is isolated in its own directory (with its tests, stories, and index file), supporting composability and reusability.
• Separation of Concerns – The structure clearly separates visuals (components and illustrations) from supporting logic (utility functions, constants, types) and style configurations (Tailwind, fonts).
• Extensibility & Documentation – With comprehensive documentation (Markdown files in “docs”) and an integrated Storybook, the project ensures ease of extension and clear usage guidelines.
Relevant Technologies and Tools
• React – All components are built using React.
• Storybook – For isolated development and testing of UI components.
• Testing Frameworks – (e.g., Vitest) as seen in the configuration files alongside test files in each component directory.
• Tailwind CSS – Identified by the “tailwind.config.js” file, playing a role in styling.
• Vite – Used as the bundler and development server given “vite.config.ts” and related configuration files.
• Code Quality Tools – ESLint (eslint.config.js) and Prettier (.prettierrc) are configured for consistent code quality.
• TypeScript – With multiple tsconfig files (e.g., tsconfig.json, tsconfig.app.json), the project leverages TypeScript for type safety.
Instructing
– “Component Library Core” (encompassing all individual components from “lib/components”).
– “Illustrations” (from lib/Illustrations).
– “Utilities & Core Files” (representing utils.ts, constants.ts, types.ts, etc.).
– “Fonts & Assets” (detailing font directories and related configuration).
– “Documentation & Guidelines” (linking to Markdown files and docs folder).
– “Development Tools” (Storybook, testing frameworks, Vite, ESLint/Prettier configurations).
– “Consumer Application” (to show how an external project would use this library).
– The data/dependency flow between utilities and components.
– The integration of shared assets (illustrations and fonts) across components.
– The demonstration/testing flow from Storybook to each component.