{"id":17081503,"url":"https://github.com/benfoster/minvoice","last_synced_at":"2025-03-23T13:22:28.913Z","repository":{"id":43874998,"uuid":"407797360","full_name":"benfoster/minvoice","owner":"benfoster","description":"Minimal PDF invoice generator","archived":false,"fork":false,"pushed_at":"2021-09-21T23:18:07.000Z","size":420,"stargazers_count":16,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T23:49:32.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/benfoster.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}},"created_at":"2021-09-18T08:04:53.000Z","updated_at":"2022-11-15T20:25:13.000Z","dependencies_parsed_at":"2022-09-25T00:01:00.589Z","dependency_job_id":null,"html_url":"https://github.com/benfoster/minvoice","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoster%2Fminvoice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoster%2Fminvoice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoster%2Fminvoice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benfoster%2Fminvoice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benfoster","download_url":"https://codeload.github.com/benfoster/minvoice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245105666,"owners_count":20561566,"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","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":"2024-10-14T12:53:19.508Z","updated_at":"2025-03-23T13:22:28.878Z","avatar_url":"https://github.com/benfoster.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minvoice\n\nMinvoice is a minimal PDF invoice generation API built using ASP.NET Core. It uses [Playwright](https://playwright.dev/) to convert a rendered HTML template to PDF using Chromium.\n\n## Run in Docker\n\nThe fastest way to launch Minvoice is via [Docker](https://hub.docker.com/r/benfoster/minvoice):\n\n```\ndocker run -p 5000:5000 --rm -it benfoster/minvoice:latest\n```\n\n_Note that the image is quite large (~500MB) due to Playwright's dependencies_\n\nYou can override the [default invoice template](./src/Minvoice/invoice-template.html) with your own HTML file:\n\n```\ndocker run --rm -it -p 5000:5000 \\\n    -v $(pwd)/custom-template.html:/app/invoice-template.html benfoster/minvoice:latest\n```\n\nThis will start Minvoice at `http://localhost:5000`. You can then generate your first invoice:\n\n```\nPOST http://localhost:5000/invoices HTTP/1.1\ncontent-type: application/json\n\n{\n  \"invoice_number\": \"123456\",\n  \"company_name\": \"Acme Ltd.\",\n  \"company_address\": {\n    \"line1\": \"Mansfield House\",\n    \"town_city\": \"London\",\n    \"zip\": \"WC12 4HP\"\n  },\n  \"currency\": \"GBP\",\n  \"title\": \"Invoice from Acme\",\n  \"recipient\": {\n    \"name\": \"John Doe\",\n    \"email\": \"johndoh@gmail.com\"\n  },\n  \"items\": [\n    {\n      \"title\": \"Website design\",\n      \"amount\": 300.00\n    },\n    {\n      \"title\": \"Hosting (3 months)\",\n      \"amount\": 75.00\n    },\n    {\n      \"title\": \"Domain name (1 year)\",\n      \"amount\": 10.00\n    }\n  ],\n  \"logo_url\": \"https://upload.wikimedia.org/wikipedia/commons/8/80/Logo_acme.svg\"\n}\n```\n\nThis will return the generated PDF invoice in the response:\n\n![Generating an invoice](/assets/postman.png)\n\n\n## Building and running locally\n\nMinvoice takes advantage of a number of new features in .NET 6 and C# 10. To run locally you'll need to [install .NET 6.0 rc1](https://github.com/dotnet/installer).\n\nTo build and run the application:\n\n```\ndotnet run --project ./src/Minvoice/Minvoice.csproj\n```\n## Built with\n\n- [ASP.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)\n- [Playwright](https://playwright.dev/)\n- [Fluid](https://github.com/sebastienros/fluid)\n- [Invoice Template](https://github.com/sparksuite/simple-html-invoice-template)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenfoster%2Fminvoice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenfoster%2Fminvoice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenfoster%2Fminvoice/lists"}