{"id":30348027,"url":"https://github.com/heysamtexas/rest-mobiledoc","last_synced_at":"2026-05-06T17:34:56.716Z","repository":{"id":258958719,"uuid":"867086271","full_name":"heysamtexas/rest-mobiledoc","owner":"heysamtexas","description":"REST-mobiledoc is an Express.js-based API that converts HTML and Markdown content into the Mobiledoc format.","archived":false,"fork":false,"pushed_at":"2024-10-29T10:39:14.000Z","size":173,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-18T17:45:43.412Z","etag":null,"topics":["expressjs","ghost","ghost-cms","mobiledoc","rest-api"],"latest_commit_sha":null,"homepage":"https://api.joat.tools/mobiledoc/api-docs/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heysamtexas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-10-03T12:32:34.000Z","updated_at":"2024-10-29T10:39:28.000Z","dependencies_parsed_at":"2025-08-18T17:31:45.625Z","dependency_job_id":"3a5afdc8-6225-461b-92ab-00e0ff3287d0","html_url":"https://github.com/heysamtexas/rest-mobiledoc","commit_stats":null,"previous_names":["heysamtexas/rest-mobiledoc"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/heysamtexas/rest-mobiledoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heysamtexas%2Frest-mobiledoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heysamtexas%2Frest-mobiledoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heysamtexas%2Frest-mobiledoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heysamtexas%2Frest-mobiledoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heysamtexas","download_url":"https://codeload.github.com/heysamtexas/rest-mobiledoc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heysamtexas%2Frest-mobiledoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32704582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"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":["expressjs","ghost","ghost-cms","mobiledoc","rest-api"],"created_at":"2025-08-18T17:30:27.113Z","updated_at":"2026-05-06T17:34:56.700Z","avatar_url":"https://github.com/heysamtexas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST-mobiledoc\n\n## Purpose\n\nREST-mobiledoc is an Express.js-based API that converts HTML and Markdown content into the Mobiledoc format. This project provides a simple and efficient way to transform content for use in Mobiledoc-compatible editors or content management systems.\n\n## Why We Made It\n\nWe created REST-mobiledoc to bridge the gap between common content formats (HTML and Markdown) and the Mobiledoc format. This tool is particularly useful for developers and content creators who need to:\n\n1. Migrate existing content to Mobiledoc-based systems\n2. Provide a conversion layer in their content pipeline\n3. Easily transform user-generated content into a Mobiledoc-compatible format\n\nBy offering this as a REST API, we've made it easy to integrate into various \nworkflows and applications, regardless of the programming language or platform \nthey use.\n\n## Running the docker image\nSorry, there is no free docker image hosting. I don't use DockerHub. You can \nbuild the image yourself and run it locally. To run the docker image, you can \nuse the following command:\n\n```bash\ndocker build -t rest-mobiledoc .\ndocker run -p 3000:3000 -d --name rest-mobiledoc ghcr.io/yourusername/rest-mobiledoc:latest\n```\n\n## Features\n\n- Convert HTML to Mobiledoc\n- Convert Markdown to Mobiledoc\n- RESTful API interface\n- Swagger documentation for easy API exploration\n- Comprehensive error handling\n- Fully tested with Jest\n\n## Local Development Setup\n\nTo set up REST-mobiledoc in your local development environment, follow these steps:\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/yourusername/REST-mobiledoc.git\n   cd REST-mobiledoc\n   ```\n\n2. Install dependencies:\n   ```\n   npm install\n   ```\n\n3. Start the development server:\n   ```\n   npm start\n   ```\n\n4. The server will start running at `http://localhost:3000`. You can access the Swagger documentation at `http://localhost:3000/api-docs`.\n\n## Running Tests\n\nTo run the test suite:\n\n```\nnpm test\n```\n\n## API Usage\n\nThe API exposes a single endpoint:\n\n- `POST /`\n\nRequest body:\n\n```json\n{\n  \"source\": \"html\" | \"markdown\",\n  \"payload\": \"Your content here\"\n}\n```\n\nResponse:\n\n```json\n{\n  \"result\": {\n    \"version\": \"0.3.1\",\n    \"markups\": [],\n    \"atoms\": [],\n    \"cards\": [],\n    \"sections\": [\n      // Mobiledoc sections here\n    ]\n  }\n}\n```\n\nFor detailed API documentation, refer to the Swagger UI available at `/api-docs` when running the server.\n\n## API Documentation\n\nOnce the server is running, you can access the API documentation by visiting:\n\n```\nhttp://localhost:3000/api-docs\n```\n\nThis will open the Swagger UI, where you can see detailed information about the API endpoints, try out the API directly from the browser, and see example requests and responses.\n\nThe API has one main endpoint:\n\n- `POST /`: Convert HTML or Markdown to Mobiledoc\n\nTo use the API, send a POST request to the root URL (`/`) with a JSON body containing:\n\n- `source`: Either \"html\" or \"markdown\"\n- `payload`: The content to be converted\n\nExample request body:\n\n```json\n{\n  \"source\": \"markdown\",\n  \"payload\": \"# Hello, world!\\n\\nThis is a test.\"\n}\n```\n\nThe API will respond with the converted Mobiledoc content.\n\n## API Usage Example\n\nHere's an example of how to use the API with curl:\n\n```bash\ncurl -X POST https://api.joat.tools \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n       \"source\": \"markdown\",\n       \"payload\": \"# Welcome to REST-mobiledoc\\n\\nThis is a sample Markdown document.\\n\\n## Features\\n\\n- Converts Markdown to Mobiledoc\\n- Easy to use API\\n- Lightweight and fast\"\n     }'\n```\n\nThis command sends a POST request to the API with a Markdown payload. The API should respond with the converted Mobiledoc content.\n\n\n## Contributing\n\nWe welcome contributions to REST-mobiledoc! Here's how you can contribute:\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nPlease make sure to update tests as appropriate and adhere to the existing coding style.\n\n## Issues\n\nIf you encounter any problems or have feature requests, please file an issue on the GitHub issue tracker.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.\n\n## Acknowledgments\n\n- Express.js for the web framework\n- Marked for Markdown parsing\n- JSDOM for HTML parsing\n- Jest for testing\n- Swagger for API documentation\n\nThank you to all contributors who have helped shape and improve REST-mobiledoc!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheysamtexas%2Frest-mobiledoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheysamtexas%2Frest-mobiledoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheysamtexas%2Frest-mobiledoc/lists"}