{"id":28297223,"url":"https://github.com/deepansumor/flxyjs","last_synced_at":"2026-02-23T12:51:35.704Z","repository":{"id":270192939,"uuid":"899107984","full_name":"deepansumor/flxyJS","owner":"deepansumor","description":"flxy.js is a lightweight, flexible, and easy-to-use frontend framework built with vanilla JavaScript. Designed to help developers create dynamic and responsive web applications without the overhead of external dependencies, flxy.js provides a minimal yet powerful structure for building reusable components and managing state in an intuitive way.","archived":false,"fork":false,"pushed_at":"2025-03-14T13:54:12.000Z","size":129,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-05-30T01:37:11.035Z","etag":null,"topics":["flxy","framework","javascript","minimal","vanilla-javascript"],"latest_commit_sha":null,"homepage":"https://deepansumor.github.io/flxyJS/","language":"JavaScript","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/deepansumor.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":"2024-12-05T16:27:25.000Z","updated_at":"2025-03-04T09:05:07.000Z","dependencies_parsed_at":"2024-12-29T08:29:44.469Z","dependency_job_id":"e5f421e8-700b-4d38-9416-034062e17989","html_url":"https://github.com/deepansumor/flxyJS","commit_stats":null,"previous_names":["deepansumor/flxyjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deepansumor/flxyJS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepansumor%2FflxyJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepansumor%2FflxyJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepansumor%2FflxyJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepansumor%2FflxyJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepansumor","download_url":"https://codeload.github.com/deepansumor/flxyJS/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepansumor%2FflxyJS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29743372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: 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":["flxy","framework","javascript","minimal","vanilla-javascript"],"created_at":"2025-05-23T01:18:09.902Z","updated_at":"2026-02-23T12:51:35.699Z","avatar_url":"https://github.com/deepansumor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flxy.js - Lightweight Modular JavaScript Framework\n\n## Overview\nFlxy.js is a lightweight, modular JavaScript framework designed for seamless client-side development. It provides **state management, event handling, routing, API utilities, templating, internationalization, device detection, and performance tracking** in a unified and scalable manner.\n\n## Features\n✅ **Modular Architecture** - Includes independent modules for state management, routing, API handling, etc.  \n✅ **Event Delegation** - Efficient event binding for dynamic elements.  \n✅ **State Management** - Persistent and reactive state updates.  \n✅ **Routing System** - Dynamic client-side routing with middleware.  \n✅ **API Middleware** - Flexible API request handling with custom middlewares.  \n✅ **Templating** - Mustache-based templating with caching support.  \n✅ **Internationalization** - Multi-language support with dynamic translations.  \n✅ **Performance Monitoring** - Execution time tracking for app performance.  \n✅ **Geolocation \u0026 Device Detection** - Detects user location and device details.\n\n---\n## Installation\nFlxy.js can be integrated into any JavaScript project.\n\n### **CDN Installation**\nYou can use Flxy.js directly via CDN:\n```html\n\u003cscript src=\"http://cdn.jsdelivr.net/gh/deepansumor/FlxyJS@latest/dist/main.bundle.js\"\u003e\u003c/script\u003e\n```\n\n### **Manual Installation**\nSimply clone or download the repository and include the `flxy.js` file in your project.\n```javascript\nimport Flxy from \"./flxy.js\";\n```\n\n---\n## Getting Started\n### **1. Initialize Flxy.js**\nFlxy.js automatically initializes core modules (Router, Device detection, etc.), but you can manually configure them if needed.\n```javascript\nFlxy.app.setContainer(\"#app\");\nFlxy.events.init(\"#root\");\n```\n\n### **2. Device Detection**\nFlxy.js provides built-in methods to retrieve device details.\n```javascript\nconsole.log(Flxy.device.getId()); // Retrieves unique device ID\nconsole.log(Flxy.device.getBrowserInfo()); // Returns browser details\nconsole.log(Flxy.device.getCapabilities()); // Detects touch support \u0026 screen resolution\nconsole.log(Flxy.device.getNetworkInfo()); // Provides network connection details\nconsole.log(Flxy.device.getDeviceType()); // Identifies device type (mobile, desktop, etc.)\n```\n\n### **3. Auto-Translation of Templates**\nFlxy.js supports inline auto-translation in templates.\n```html\n\u003cp\u003eWelcome to the site, _('greeting')\u003c/p\u003e\n```\nWhen `Flxy.translator.load(\"en\")` is called, this text will be automatically translated.\n\n---\n## Detailed Module Breakdown\n### **1. State Management (`state.js`)**\nHandles application-wide state with persistence.\n#### **Example Use Cases:**\n```javascript\nFlxy.states.set(\"theme\", \"dark\");\nconsole.log(Flxy.states.get(\"theme\")); // Output: 'dark'\nFlxy.states.subscribe(\"theme\", (key, value) =\u003e console.log(`${key} changed to ${value}`));\n```\n\n### **2. Routing (`router.js`)**\nManages client-side routing dynamically.\n#### **Methods:**\n- `Flxy.router.register(route, handler, ...middlewares)` - Registers a route with optional middleware functions.\n- `Flxy.router.navigate(route)` - Navigates to a registered route.\n- `Flxy.router.use(middleware)` - Adds middleware to routes.\n- `Flxy.router.handle(callback)` - Handles route changes dynamically.\n\n#### **Example Use Cases:**\n```javascript\nconst authMiddleware = (request, next) =\u003e {\n    if (!localStorage.getItem(\"token\")) {\n        console.log(\"Unauthorized access\");\n        return;\n    }\n    next();\n};\n\nFlxy.router.register(\"/dashboard\", authMiddleware, (request) =\u003e {\n    console.log(\"Dashboard loaded\", request);\n});\n\nFlxy.router.navigate(\"/dashboard\");\n```\nThe `request` object contains route parameters and query strings that can be used inside the handler function. Middleware functions can modify the request before passing it to the handler.\n\n### **3. API Handling (`api.js`)**\nHandles API requests with middleware support.\n#### **Example Use Cases:**\n```javascript\nFlxy.api.configure({ baseEndpoint: \"https://api.example.com\" });\nFlxy.api.get(\"/users\").then(console.log);\n```\n\n### **4. Event System (`emitter.js`)**\nImplements a pub-sub pattern for event-driven architecture.\n#### **Example Use Cases:**\n```javascript\nFlxy.emitter.on(\"userLoggedIn\", (user) =\u003e console.log(\"User logged in:\", user));\nFlxy.emitter.emit(\"userLoggedIn\", { name: \"John Doe\" });\n```\n\n### **5. Performance Monitoring (`performance.js`)**\nTracks execution time for specific operations.\n#### **Example Use Cases:**\n```javascript\nconst tracker = Flxy.performance.start(\"Database Query\");\nsetTimeout(() =\u003e tracker.end(), 500);\n```\n\n---\n## Example Projects\nFor real-world examples, check out:\n- **BoostX**: [GitHub Repo](https://github.com/deepansumor/BoostX) - Productivity and task management app.\n- **WeatherPro**: [GitHub Repo](https://github.com/deepansumor/WeatherPro) - Weather forecasting application.\n\n---\n## Conclusion\nFlxy.js is a powerful yet lightweight framework designed to make JavaScript development efficient and scalable. It offers **modular components, efficient state management, templating, API handling, routing, and internationalization** in a single package.\n\n### 🚀 **Need Help?**\nFor contributions, bug reports, or feature requests, open an issue on GitHub.\n\n---\n### **Future Enhancements**\n✅ WebSockets support for real-time updates  \n✅ Advanced caching mechanism  \n✅ Plugin system for third-party extensions  \n\n---\n**Developed with ❤️ for modern web applications.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepansumor%2Fflxyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepansumor%2Fflxyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepansumor%2Fflxyjs/lists"}