{"id":30290787,"url":"https://github.com/patrickjaja/workoflow-pptx","last_synced_at":"2025-08-16T23:55:30.671Z","repository":{"id":301522905,"uuid":"1009511472","full_name":"patrickjaja/workoflow-pptx","owner":"patrickjaja","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-07T08:13:05.000Z","size":46,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-07T09:26:59.884Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/patrickjaja.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,"zenodo":null}},"created_at":"2025-06-27T08:51:53.000Z","updated_at":"2025-07-07T08:13:09.000Z","dependencies_parsed_at":"2025-06-27T10:20:31.383Z","dependency_job_id":"4d0a543f-383c-4811-a7ca-7406f1162ae5","html_url":"https://github.com/patrickjaja/workoflow-pptx","commit_stats":null,"previous_names":["patrickjaja/workoflow-pptx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patrickjaja/workoflow-pptx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickjaja%2Fworkoflow-pptx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickjaja%2Fworkoflow-pptx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickjaja%2Fworkoflow-pptx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickjaja%2Fworkoflow-pptx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickjaja","download_url":"https://codeload.github.com/patrickjaja/workoflow-pptx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickjaja%2Fworkoflow-pptx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270786441,"owners_count":24644563,"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-16T02:00:11.002Z","response_time":91,"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-08-16T23:55:25.565Z","updated_at":"2025-08-16T23:55:30.649Z","avatar_url":"https://github.com/patrickjaja.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PPTX Generator API\n\nA REST API service for generating PowerPoint presentations programmatically using Node.js and PptxGenJS.\n\n## Features\n\n- Generate PowerPoint presentations via REST API\n- Support for multiple slide types and content\n- Text, images, shapes, tables, and charts\n- Customizable styling and formatting\n- Slide master/layout support for consistent design\n- Docker support for easy deployment\n- Binary response for direct file download\n\n## Quick Start\n\n### Local Development\n\n1. Install dependencies:\n```bash\nnpm install\n```\n\n2. Start the server:\n```bash\nnpm start\n```\n\nFor development with auto-reload:\n```bash\nnpm run dev\n```\n\nThe API will be available at `http://localhost:3000`\n\n### Docker Deployment\n\nUsing Docker Compose:\n```bash\ndocker-compose up -d\n```\n\nOr build and run manually:\n```bash\ndocker build -t pptx-generator-api .\ndocker run -p 3000:3000 pptx-generator-api\n```\n\n## API Documentation\n\n### Health Check\n\n```\nGET /health\n```\n\nReturns the health status of the API.\n\n**Response:**\n```json\n{\n  \"status\": \"healthy\",\n  \"timestamp\": \"2023-12-08T10:30:00.000Z\"\n}\n```\n\n### Generate PowerPoint\n\n```\nPOST /api/generate-pptx\nContent-Type: application/json\n```\n\nGenerates a PowerPoint presentation and returns it as a binary file.\n\n**Request Body:**\n```json\n{\n  \"title\": \"My Presentation\",\n  \"slides\": [\n    {\n      \"background\": { \"color\": \"FFFFFF\" },\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"value\": \"Welcome to My Presentation\",\n          \"options\": {\n            \"x\": 1,\n            \"y\": 1,\n            \"w\": 8,\n            \"h\": 2,\n            \"fontSize\": 36,\n            \"color\": \"363636\",\n            \"bold\": true,\n            \"align\": \"center\"\n          }\n        }\n      ],\n      \"notes\": \"Speaker notes for this slide\"\n    }\n  ],\n  \"options\": {\n    \"author\": \"John Doe\",\n    \"company\": \"ACME Corp\",\n    \"subject\": \"Quarterly Report\",\n    \"layout\": \"16x9\"\n  }\n}\n```\n\n**Response:**\n- Content-Type: `application/vnd.openxmlformats-officedocument.presentationml.presentation`\n- Binary PPTX file\n\n## Content Types\n\n### Slide Masters\n\nSlide masters allow you to define reusable layouts with consistent styling:\n\n```json\n{\n  \"options\": {\n    \"slideMasters\": [\n      {\n        \"name\": \"MASTER_NAME\",\n        \"width\": 10,\n        \"height\": 5.625,\n        \"background\": { \"color\": \"003366\" },\n        \"objects\": [\n          {\n            \"placeholder\": \"title\",\n            \"text\": \"Title Placeholder\",\n            \"x\": 0.5,\n            \"y\": 0.5,\n            \"w\": 9,\n            \"h\": 1.5,\n            \"options\": {\n              \"fontSize\": 36,\n              \"bold\": true,\n              \"color\": \"FFFFFF\"\n            }\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nTo use a slide master, reference it in your slide:\n\n```json\n{\n  \"masterName\": \"MASTER_NAME\",\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"value\": \"This text will appear in the title placeholder\",\n      \"options\": {\n        \"placeholder\": \"title\"\n      }\n    }\n  ]\n}\n```\n\n### Text\n```json\n{\n  \"type\": \"text\",\n  \"value\": \"Hello World\",\n  \"options\": {\n    \"x\": 1,\n    \"y\": 1,\n    \"w\": \"80%\",\n    \"h\": 1,\n    \"fontSize\": 18,\n    \"fontFace\": \"Arial\",\n    \"color\": \"000000\",\n    \"bold\": false,\n    \"italic\": false,\n    \"underline\": false,\n    \"align\": \"left\",\n    \"valign\": \"top\"\n  }\n}\n```\n\n### Image\n```json\n{\n  \"type\": \"image\",\n  \"value\": \"data:image/png;base64,iVBORw0KG...\",\n  \"options\": {\n    \"x\": 1,\n    \"y\": 1,\n    \"w\": 4,\n    \"h\": 3,\n    \"hyperlink\": \"https://example.com\"\n  }\n}\n```\n\n### Shape\n```json\n{\n  \"type\": \"shape\",\n  \"value\": \"rect\",\n  \"options\": {\n    \"x\": 1,\n    \"y\": 1,\n    \"w\": 3,\n    \"h\": 3,\n    \"fill\": { \"color\": \"0088CC\" },\n    \"line\": { \"color\": \"000000\", \"width\": 1 }\n  }\n}\n```\n\n### Table\n```json\n{\n  \"type\": \"table\",\n  \"value\": [\n    [\"Header 1\", \"Header 2\", \"Header 3\"],\n    [\"Row 1 Col 1\", \"Row 1 Col 2\", \"Row 1 Col 3\"],\n    [\"Row 2 Col 1\", \"Row 2 Col 2\", \"Row 2 Col 3\"]\n  ],\n  \"options\": {\n    \"x\": 1,\n    \"y\": 1,\n    \"w\": 8,\n    \"fontSize\": 14,\n    \"border\": true,\n    \"colW\": [2.5, 2.5, 3]\n  }\n}\n```\n\n### Chart\n```json\n{\n  \"type\": \"chart\",\n  \"value\": {\n    \"type\": \"bar\",\n    \"data\": [\n      {\n        \"name\": \"Series 1\",\n        \"values\": [25, 40, 30, 35]\n      }\n    ],\n    \"categories\": [\"Q1\", \"Q2\", \"Q3\", \"Q4\"]\n  },\n  \"options\": {\n    \"x\": 1,\n    \"y\": 1,\n    \"w\": 8,\n    \"h\": 4,\n    \"showLegend\": true,\n    \"title\": \"Quarterly Sales\"\n  }\n}\n```\n\n## Examples\n\n### Simple Text Presentation\n\n```bash\ncurl -X POST http://localhost:3000/api/generate-pptx \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"title\": \"Simple Presentation\",\n    \"slides\": [\n      {\n        \"content\": [\n          {\n            \"type\": \"text\",\n            \"value\": \"Hello World!\",\n            \"options\": {\n              \"x\": \"10%\",\n              \"y\": \"45%\",\n              \"w\": \"80%\",\n              \"fontSize\": 48,\n              \"align\": \"center\"\n            }\n          }\n        ]\n      }\n    ]\n  }' \\\n  --output presentation.pptx\n```\n\n### Presentation with Slide Master\n\n```bash\ncurl -X POST http://localhost:3000/api/generate-pptx \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"title\": \"Corporate Presentation\",\n    \"slides\": [\n      {\n        \"masterName\": \"CORPORATE_MASTER\",\n        \"content\": [\n          {\n            \"type\": \"text\",\n            \"value\": \"Welcome to ACME Corp\",\n            \"options\": {\n              \"placeholder\": \"title\"\n            }\n          }\n        ]\n      },\n      {\n        \"masterName\": \"CORPORATE_MASTER\",\n        \"content\": [\n          {\n            \"type\": \"text\",\n            \"value\": \"Our Vision\",\n            \"options\": {\n              \"placeholder\": \"title\"\n            }\n          },\n          {\n            \"type\": \"text\",\n            \"value\": \"• Innovation and Excellence\\n• Customer First Approach\\n• Sustainable Growth\",\n            \"options\": {\n              \"placeholder\": \"body\"\n            }\n          }\n        ]\n      }\n    ],\n    \"options\": {\n      \"author\": \"John Doe\",\n      \"company\": \"ACME Corporation\",\n      \"slideMasters\": [\n        {\n          \"name\": \"CORPORATE_MASTER\",\n          \"background\": {\n            \"color\": \"003366\"\n          },\n          \"objects\": [\n            {\n              \"placeholder\": \"title\",\n              \"text\": \"Title Placeholder\",\n              \"x\": 0.5,\n              \"y\": 0.5,\n              \"w\": 9,\n              \"h\": 1.5,\n              \"options\": {\n                \"fontSize\": 40,\n                \"bold\": true,\n                \"color\": \"FFFFFF\",\n                \"align\": \"center\"\n              }\n            },\n            {\n              \"placeholder\": \"body\",\n              \"x\": 1,\n              \"y\": 2.5,\n              \"w\": 8,\n              \"h\": 2.5,\n              \"options\": {\n                \"fontSize\": 20,\n                \"color\": \"FFFFFF\"\n              }\n            },\n            {\n              \"shape\": \"rect\",\n              \"x\": 0,\n              \"y\": 5.3,\n              \"w\": 10,\n              \"h\": 0.3,\n              \"fill\": {\n                \"color\": \"FF6600\"\n              }\n            }\n          ]\n        }\n      ]\n    }\n  }' \\\n  --output corporate-presentation.pptx\n```\n\n### Multi-Slide with Mixed Content\n\n```javascript\nconst axios = require('axios');\nconst fs = require('fs');\n\nconst presentationData = {\n  title: \"Company Report\",\n  slides: [\n    {\n      background: { color: \"003366\" },\n      content: [\n        {\n          type: \"text\",\n          value: \"Annual Report 2023\",\n          options: {\n            x: 1,\n            y: 2,\n            w: 8,\n            h: 2,\n            fontSize: 44,\n            color: \"FFFFFF\",\n            bold: true,\n            align: \"center\"\n          }\n        },\n        {\n          type: \"text\",\n          value: \"ACME Corporation\",\n          options: {\n            x: 1,\n            y: 4,\n            w: 8,\n            h: 1,\n            fontSize: 24,\n            color: \"FFFFFF\",\n            align: \"center\"\n          }\n        }\n      ]\n    },\n    {\n      content: [\n        {\n          type: \"text\",\n          value: \"Sales Performance\",\n          options: {\n            x: 1,\n            y: 0.5,\n            fontSize: 32,\n            bold: true\n          }\n        },\n        {\n          type: \"chart\",\n          value: {\n            type: \"bar\",\n            data: [\n              {\n                name: \"2023\",\n                values: [45, 52, 61, 68]\n              },\n              {\n                name: \"2022\",\n                values: [38, 45, 52, 55]\n              }\n            ],\n            categories: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"]\n          },\n          options: {\n            x: 1,\n            y: 1.5,\n            w: 8,\n            h: 4,\n            showLegend: true,\n            title: \"Quarterly Revenue (in millions)\"\n          }\n        }\n      ]\n    }\n  ],\n  options: {\n    author: \"Jane Doe\",\n    company: \"ACME Corporation\"\n  }\n};\n\naxios.post('http://localhost:3000/api/generate-pptx', presentationData, {\n  responseType: 'arraybuffer'\n})\n.then(response =\u003e {\n  fs.writeFileSync('report.pptx', response.data);\n  console.log('Presentation saved as report.pptx');\n})\n.catch(error =\u003e {\n  console.error('Error generating presentation:', error);\n});\n```\n\n## Configuration\n\nDefault configuration can be found in `src/config.js`. You can modify defaults for:\n- Presentation properties\n- Slide backgrounds\n- Text formatting\n- Shape styles\n- Chart colors\n- File size limits\n\n## Environment Variables\n\n- `PORT` - Server port (default: 3000)\n- `NODE_ENV` - Environment mode (development/production)\n\n## Error Handling\n\nThe API returns appropriate HTTP status codes:\n- `200` - Success, returns PPTX file\n- `400` - Bad request (invalid input)\n- `404` - Endpoint not found\n- `500` - Server error\n\nError response format:\n```json\n{\n  \"error\": \"Error type\",\n  \"message\": \"Detailed error message\"\n}\n```\n\n## License\n\nISC","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickjaja%2Fworkoflow-pptx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickjaja%2Fworkoflow-pptx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickjaja%2Fworkoflow-pptx/lists"}