A scalable and reusable component library, built with React.js, Nx, and TypeScript.
- π React.js Based: Modern and component-driven development.
- π¨ Styled Components: Modular and dynamic CSS-in-JS styling.
- π§© Radix UI Primitives: Accessible, low-level building blocks.
- ποΈ Clean Architecture: Enforces separation of concerns and maintainable code.
- π Storybook Integration: Visualize and test components in isolation.
- β End-to-End Testing: Powered by Cypress for robust application testing.
- π§ TypeScript Support: Ensures strong typing for maintainability.
- π€ Flexible and Extendable: Add new projects using other frameworks or styling tools.
- β‘ Automation:
- GitHub Actions for continuous integration.
- Husky for pre-commit test automation.
- Node.js (>= 14.x)
- Nx CLI: Install with
`npm install -g nx`
- Clone the repository:
git clone https://github.com/BrahimS/e-comerce-uikit.git cd e-comerce-uikit
Install dependencies:
npm installπ οΈ Usage π₯οΈ Development Server Run a development server for a specific app:
npx nx serve [app-name]π¦ Build Applications Build an app for production:
npx nx build [app-name]π§ͺ Run Tests Execute tests for a project:
npx nx test [project-name]π Storybook Launch Storybook to visualize and test components in isolation:
npx nx storybook shared-uiπ§ͺ Cypress Testing Run Cypress for end-to-end tests:
npx nx e2e [project-name]π Project Structure
apps/
admin/ # Admin dashboard app
storefront/ # Customer-facing e-commerce app
libs/
shared-ui/ # Reusable UI components
utils/ # Shared utility functions
storybook/ # Storybook configuration
e2e/ # Cypress end-to-end tests
π§© Radix UI and Custom Components Built using Radix UI for accessibility and extensibility. Create custom components or extend existing ones to fit project-specific needs. π¨ Styling with Styled Components Utilizes Styled Components for dynamic, scoped, and reusable styles. Contributors are free to integrate alternative styling tools like SCSS, Tailwind CSS, or Emotion. ποΈ Clean Architecture The repository adopts a Clean Architecture approach:
Separation of Concerns: Modular and maintainable code. Reusability: Ensures scalability and flexibility. Testability: Isolated layers for robust testing. π€ Contributing We welcome contributions! Follow these steps to contribute:
Fork the repository. Create a feature branch:
git checkout -b feature/your-feature-nameCommit your changes:
git commit -m "Describe your changes"Push the branch:
git push origin feature/your-feature-nameOpen a pull request. π License This project is licensed under the MIT License.