{"id":26047711,"url":"https://github.com/m-housni/themed-react-components-using-abstract-factory-pattern","last_synced_at":"2026-05-08T00:45:24.441Z","repository":{"id":281098123,"uuid":"944190021","full_name":"m-housni/themed-react-components-using-abstract-factory-pattern","owner":"m-housni","description":"This project demonstrates how to create themed React components using the Abstract Factory Pattern.","archived":false,"fork":false,"pushed_at":"2025-03-07T00:52:30.000Z","size":129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T05:04:08.993Z","etag":null,"topics":["abstract-factory-pattern","dark-light-mode","react","usecontext-hook"],"latest_commit_sha":null,"homepage":"https://m-housni.github.io/themed-react-components-using-abstract-factory-pattern/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-housni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-06T23:47:39.000Z","updated_at":"2025-03-07T00:52:34.000Z","dependencies_parsed_at":"2025-03-07T01:36:21.210Z","dependency_job_id":null,"html_url":"https://github.com/m-housni/themed-react-components-using-abstract-factory-pattern","commit_stats":null,"previous_names":["m-housni/themed-react-components-using-abstract-factory-pattern"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/m-housni/themed-react-components-using-abstract-factory-pattern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-housni%2Fthemed-react-components-using-abstract-factory-pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-housni%2Fthemed-react-components-using-abstract-factory-pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-housni%2Fthemed-react-components-using-abstract-factory-pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-housni%2Fthemed-react-components-using-abstract-factory-pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-housni","download_url":"https://codeload.github.com/m-housni/themed-react-components-using-abstract-factory-pattern/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-housni%2Fthemed-react-components-using-abstract-factory-pattern/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32762284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abstract-factory-pattern","dark-light-mode","react","usecontext-hook"],"created_at":"2025-03-07T23:13:18.846Z","updated_at":"2026-05-08T00:45:24.425Z","avatar_url":"https://github.com/m-housni.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Themed React Components using Abstract Factory Pattern\n\nThis project demonstrates how to create themed React components using the Abstract Factory Pattern. The Abstract Factory Pattern is a creational design pattern that provides an interface for creating families of related or dependent objects without specifying their concrete classes.\n\n![image](https://github.com/user-attachments/assets/ce0648bc-b329-42da-82be-1a35e2914b6c)\n\n## Demo\n\nView a live demo of the project [here](https://m-housni.github.io/themed-react-components-using-abstract-factory-pattern/).\n\n### **Explanation**\n- **Abstract Factory (`ButtonFactory`)** defines a contract for creating button variations.\n- **Concrete Factories (`LightThemeFactory`, `DarkThemeFactory`)** provide specific button implementations.\n- **Context (`ThemeContext`)** dynamically switches factories based on the selected theme.\n- **Reusable Component (`ThemedButton`)** calls the factory to create buttons dynamically.\n\n### **Benefits**\n✅ Ensures scalability by allowing easy addition of new themes or variations.  \n✅ Decouples UI components from their specific implementations.  \n✅ Enhances reusability and maintainability in large applications.\n\n## Installation\n\nTo get started with this project, clone the repository and install the dependencies:\n\n```bash\ngit clone https://github.com/your-username/themed-react-components-using-abstract-factory-pattern.git\ncd themed-react-components-using-abstract-factory-pattern\nnpm install\n```\n\n## Usage\n\nTo run the application, use the following command:\n\n```bash\nnpm run dev\n```\n\nThis will start the development server and open the application in your default web browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-housni%2Fthemed-react-components-using-abstract-factory-pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-housni%2Fthemed-react-components-using-abstract-factory-pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-housni%2Fthemed-react-components-using-abstract-factory-pattern/lists"}