{"id":24743419,"url":"https://github.com/layerdynamics/mdx-to-json","last_synced_at":"2025-10-24T07:10:36.268Z","repository":{"id":254188383,"uuid":"845756818","full_name":"LayerDynamics/mdx-to-json","owner":"LayerDynamics","description":"a simple utility to convert and combine mdx to a single json file ","archived":false,"fork":false,"pushed_at":"2025-02-21T06:56:05.000Z","size":506,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T21:45:00.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/LayerDynamics.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-08-21T21:46:50.000Z","updated_at":"2024-10-29T13:40:07.000Z","dependencies_parsed_at":"2024-08-21T23:48:38.147Z","dependency_job_id":"2d7e27d0-b50c-4fe5-8be1-66da6393b932","html_url":"https://github.com/LayerDynamics/mdx-to-json","commit_stats":null,"previous_names":["layerdynamics/mdx-to-json"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LayerDynamics/mdx-to-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fmdx-to-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fmdx-to-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fmdx-to-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fmdx-to-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LayerDynamics","download_url":"https://codeload.github.com/LayerDynamics/mdx-to-json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fmdx-to-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271061254,"owners_count":24692490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-01-28T01:36:08.530Z","updated_at":"2025-10-24T07:10:36.184Z","avatar_url":"https://github.com/LayerDynamics.png","language":"TypeScript","readme":"# MDX-to-JSON\n\n## Overview\n\nMDX-to-JSON is a React-based web application designed to transform MDX (Markdown with JSX) files into structured JSON format. This tool bridges the gap between rich, interactive MDX content and machine-readable JSON data, making it invaluable for content management systems, documentation platforms, and data processing pipelines that need to work with MDX content programmatically.\n\n## Detailed Functionality\n\nMDX-to-JSON operates through several key processes:\n\n1. **File Upload**: Users can drag and drop multiple MDX files onto the application's interface. The app uses react-dropzone to handle file inputs efficiently.\n\n2. **MDX Parsing**: Each uploaded file is processed using a custom MDX parser built with the unified ecosystem (remark and rehype). This parser:\n   - Extracts front matter metadata using gray-matter\n   - Handles custom MDX components and JSX expressions\n   - Manages special syntax and comments within the MDX content\n\n3. **Content Transformation**: The parsed MDX is transformed into a structured JSON format. This process:\n   - Converts MDX content to plain text while preserving essential formatting\n   - Organizes metadata and content into a consistent JSON structure\n   - Handles edge cases and potential syntax issues in the MDX\n\n4. **Preview Generation**: The app generates a preview of the processed content, allowing users to verify the transformation before finalizing.\n\n5. **JSON Compilation**: Users can combine multiple processed MDX files into a single JSON structure, where each MDX file becomes a key-value pair in the JSON object.\n\n6. **JSON Formatting**: A \"Format/Lint JSON\" feature is available to clean up and standardize the JSON output, ensuring consistency and readability.\n\n7. **Export**: The final JSON can be saved as a file, ready for use in other systems or applications.\n\n## Key Features\n\n- Intuitive drag-and-drop interface for file uploading\n- Support for batch processing of multiple MDX files\n- Real-time preview of converted content with syntax highlighting\n- Robust error handling and validation to manage various MDX structures\n- File management capabilities, including the ability to delete uploaded files\n- JSON combination and formatting tools for refined output\n- Exportable JSON data for seamless integration with other systems\n\n## Technology Stack\n\n- React: Provides the foundation for the user interface\n- TypeScript: Ensures type safety and improves code quality\n- Vite: Offers fast build times and efficient development experience\n- Styled Components: Enables component-based styling with CSS-in-JS\n- react-dropzone: Manages file uploads with drag-and-drop functionality\n- unified (remark, rehype): Powers the MDX parsing and transformation pipeline\n- gray-matter: Extracts front matter from MDX files\n\n## Prerequisites\n\nEnsure you have the following installed:\n\n- Node.js (v14.0.0 or later)\n- npm (v6.0.0 or later)\n\n## Installation\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/LayerDynamics/mdx-to-json.git\n   ```\n\n2. Navigate to the project directory:\n   ```\n   cd mdx-to-json\n   ```\n\n3. Install the dependencies:\n   ```\n   npm install\n   ```\n\n## Usage\n\n1. Start the development server:\n   ```\n   npm run dev\n   ```\n\n2. Open your browser and visit `http://localhost:5173` (or the port specified by Vite).\n\n3. Drag and drop your MDX files onto the designated area in the application.\n\n4. The app will process each file and display a preview of the converted content.\n\n5. Use the \"Combine Files\" button to merge all processed files into a unified JSON structure.\n\n6. Click \"Format/Lint JSON\" to clean and standardize the JSON output.\n\n7. Finally, use \"Save JSON\" to download the processed data as a JSON file.\n\n## Building for Production\n\nTo create a production-ready build, run:\n\n```\nnpm run build\n```\n\nThis command generates optimized files in the `dist` directory, ready for deployment to your chosen hosting platform.\n\n## Contributing\n\nWe welcome contributions to MDX-to-JSON. To contribute:\n\n1. Fork the repository.\n2. Create a new branch: `git checkout -b feature/your-feature-name`.\n3. Make your changes and commit them: `git commit -m 'Add some feature'`.\n4. Push to the branch: `git push origin feature/your-feature-name`.\n5. Submit a pull request with a comprehensive description of your changes.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions, feedback, or issues, please open an issue in the GitHub repository.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayerdynamics%2Fmdx-to-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flayerdynamics%2Fmdx-to-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayerdynamics%2Fmdx-to-json/lists"}