{"id":51468846,"url":"https://github.com/yoosuf/docket","last_synced_at":"2026-07-06T14:31:44.036Z","repository":{"id":369399703,"uuid":"1289692192","full_name":"yoosuf/docket","owner":"yoosuf","description":"Generate DOCX/PDF documents from versioned templates and dynamic JSON data. Convention-based template discovery — drop a file, it's live. No code changes. Built with FastAPI.","archived":false,"fork":false,"pushed_at":"2026-07-05T04:48:34.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T06:13:29.693Z","etag":null,"topics":["docker","document-generation","docx","docxtpl","fastapi","jinja2","pdf","python","rest-api","template-engine"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoosuf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-05T04:40:40.000Z","updated_at":"2026-07-05T04:48:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yoosuf/docket","commit_stats":null,"previous_names":["yoosuf/docket"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yoosuf/docket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoosuf%2Fdocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoosuf%2Fdocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoosuf%2Fdocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoosuf%2Fdocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoosuf","download_url":"https://codeload.github.com/yoosuf/docket/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoosuf%2Fdocket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35195590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"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":["docker","document-generation","docx","docxtpl","fastapi","jinja2","pdf","python","rest-api","template-engine"],"created_at":"2026-07-06T14:31:39.252Z","updated_at":"2026-07-06T14:31:43.998Z","avatar_url":"https://github.com/yoosuf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eDocket\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\u003cstrong\u003eDocument Generation Service\u003c/strong\u003e\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    Generate DOCX/PDF from versioned templates and dynamic JSON data.\u003cbr\u003e\n    Convention-based template discovery — drop a file, it's live. No code changes.\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.12%2B-blue?logo=python\" alt=\"Python 3.12+\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/FastAPI-0.115%2B-009688?logo=fastapi\" alt=\"FastAPI\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Docker-ready-2496ED?logo=docker\" alt=\"Docker\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-green\" alt=\"MIT\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/tests-36%20passing-brightgreen\" alt=\"36 tests\"\u003e\n\u003c/p\u003e\n\n---\n\n## ✨ Features\n\n- **Zero-code document types** — Drop `{type}_v{version}.docx` into `templates/` and it's immediately available via the API\n- **Legacy `.doc` support** — Old Word templates auto-convert to `.docx` via LibreOffice\n- **PDF output** — Seamless DOCX→PDF via LibreOffice (baked into the Docker image)\n- **Versioned templates** — Multiple versions coexist; latest is used unless a specific version is requested\n- **RESTful API** — Clean resource model (`documents`, `document-types`) with OpenAPI docs\n- **No database** — Metadata is encoded in filenames; everything lives on disk (swap out for S3/Postgres when you're ready)\n- **Docker-native** — Single `docker compose up` with LibreOffice included\n\n## 🚀 Quick start\n\n```bash\ngit clone https://github.com/yoosuf/docket.git\ncd docket\ndocker compose up --build\n```\n\nOpen **http://127.0.0.1:8000/docs** — interactive API docs are ready.\n\n## 📄 Usage\n\n### Try it in one command:\n\n```bash\n./scripts/try_document.sh                     # invoice, docx\n./scripts/try_document.sh quote pdf           # quote, pdf\n./scripts/try_document.sh purchase_order pdf  # purchase_order, pdf\n```\n\n### Or via curl:\n\n```bash\ncurl -X POST http://127.0.0.1:8000/api/v1/documents \\\n  -H \"Content-Type: application/json\" \\\n  -d @docs/examples/invoice.json\n```\n\n### Adding a new document type:\n\n1. Create a template (`docxtpl`-compatible `.docx` with Jinja2 placeholders)\n2. Name it `{type}_v{version}.docx` and drop it into `templates/`\n3. That's it — no code, no config, no restart\n\n## 📚 Documentation\n\n| Document | What's inside |\n|---|---|\n| [`docs/architecture.md`](docs/architecture.md) | Module layout, component \u0026 sequence diagrams, extension points |\n| [`docs/design-decisions.md`](docs/design-decisions.md) | ADR-style rationale for key architectural choices |\n| [`docs/production-readiness.md`](docs/production-readiness.md) | Migration guide: local disk → S3, no DB → Postgres, sync → job queues |\n| [`docs/examples.md`](docs/examples.md) | Ready-to-run samples for all 5 shipped document types |\n\n## 🧪 Tests\n\n```bash\npytest\n```\n\n36 tests exercising template resolution, service orchestration, REST endpoints, and rendering — no mocks on the DOCX layer.\n\n## 🏗 Architecture\n\nModular monolith — one domain (`documents`) in one folder:\n\n```\napp/\n├── main.py           # Composition root (FastAPI app)\n├── core/             # Config, errors, middleware\n└── modules/\n    └── documents/    # Router, service, repository, models\n```\n\nFull architecture docs at [`docs/architecture.md`](docs/architecture.md).\n\n## 📦 Shipped templates\n\n| Type | Template | Version |\n|---|---|---|\n| Invoice | `invoice_v1.docx` | 1 |\n| Quote | `quote_v1.docx` | 1 |\n| Purchase Order | `purchase_order_v1.docx` | 1 |\n| Contract | `contract_v1.docx` | 1 |\n| Memo | `memo_v1.doc` (legacy) | 1 |\n\n## 🛠 Tech stack\n\n[FastAPI](https://fastapi.tiangolo.com/) · [docxtpl](https://github.com/elapouya/python-docx-template) (Jinja2-in-DOCX) · [LibreOffice](https://www.libreoffice.org/) (PDF conversion) · [Docker](https://www.docker.com/) · [Pydantic](https://docs.pydantic.dev/) · [Uvicorn](https://www.uvicorn.org/)\n\n## 📜 License\n\n[MIT](LICENSE) © 2026 Yoosuf\n\n---\n\n\u003e **Status:** POC — no production dependencies (no DB, no S3, no auth, no queues). Ready to evolve into a full document service — see the [production-readiness guide](docs/production-readiness.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoosuf%2Fdocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoosuf%2Fdocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoosuf%2Fdocket/lists"}