{"id":50294761,"url":"https://github.com/chrisrobison/invoice","last_synced_at":"2026-05-28T08:04:03.325Z","repository":{"id":186029096,"uuid":"674510672","full_name":"chrisrobison/invoice","owner":"chrisrobison","description":"Simple, light-weight, totally self-contained, no external libraries, client-side invoice creator with all data stored locally in-browser.","archived":false,"fork":false,"pushed_at":"2025-01-29T09:46:47.000Z","size":146,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T10:31:18.732Z","etag":null,"topics":["invoice","invoice-generator","invoice-management","javascript","pdf","zero-dependency"],"latest_commit_sha":null,"homepage":"https://chrisrobison.github.io/invoice/","language":"JavaScript","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/chrisrobison.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}},"created_at":"2023-08-04T05:57:53.000Z","updated_at":"2025-01-29T09:46:51.000Z","dependencies_parsed_at":"2024-12-07T13:31:31.792Z","dependency_job_id":"27a584af-57c4-43a3-b68e-ae9964273a82","html_url":"https://github.com/chrisrobison/invoice","commit_stats":null,"previous_names":["chrisrobison/invoice"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chrisrobison/invoice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Finvoice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Finvoice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Finvoice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Finvoice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisrobison","download_url":"https://codeload.github.com/chrisrobison/invoice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Finvoice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33599495,"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-05-28T02:00:06.440Z","response_time":99,"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":["invoice","invoice-generator","invoice-management","javascript","pdf","zero-dependency"],"created_at":"2026-05-28T08:04:00.352Z","updated_at":"2026-05-28T08:04:03.316Z","avatar_url":"https://github.com/chrisrobison.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Invoice Generator\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=flat\u0026logo=javascript\u0026logoColor=%23F7DF1E)](https://www.javascript.com/)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/chrisrobison/invoice-generator/graphs/commit-activity)\n\nA lightweight, browser-based invoice generation application that works offline and syncs when online. Create, manage, and export professional invoices with no external dependencies.\n\n## 🚀 Features\n\n- 📱 Works offline with local storage\n- 🔄 Automatic server sync when online\n- 📑 PDF generation and export\n- 💾 Local data persistence\n- 🖨️ Print-friendly formatting\n- ⌨️ Keyboard shortcuts\n- 📊 Automatic calculations\n- 🎨 Clean, minimal interface\n\n## 📋 Prerequisites\n\n- Modern web browser (Chrome, Firefox, Safari, Edge)\n- Local web server for development\n- No additional dependencies required\n\n## 🔧 Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/chrisrobison/invoice.git\n```\n\n2. Start a local web server:\n```bash\n# Using Python\npython -m http.server 8000\n\n# Or using Node.js\nnpx http-server\n```\n\n3. Open in your browser:\n```\nhttp://localhost:8000\n```\n\n## 💻 Usage\n\n### Creating an Invoice\n\n1. Click \"New\" to create a blank invoice\n2. Fill in company details\n3. Add line items with the \"+\" button\n4. Edit amounts and descriptions\n5. Save or export when finished\n\n### Keyboard Shortcuts\n\n- `Enter` - Save current edit\n- `Escape` - Cancel current edit\n- `Ctrl + S` - Save invoice\n- `Ctrl + P` - Print/export PDF\n- `Ctrl + N` - New invoice\n\n### Example Code\n\nCreating a new invoice:\n```javascript\nimport { Invoice, LineItem } from './invoice.js';\n\nconst invoice = new Invoice({\n    company: \"Acme Corp\",\n    email: \"billing@acme.com\"\n});\n\ninvoice.addLineItem({\n    Date: new Date(),\n    Service: \"Consulting\",\n    Hours: 8,\n    Rate: 150,\n    Desc: \"Technical consultation\"\n});\n\ninvoice.save();\n```\n\n## 🏗️ Architecture\n\n### File Structure\n```\n├── main.js          # Core application logic\n├── invoice.js       # Business logic classes\n├── invoice.html     # Main application HTML\n└── style.css        # Application styling\n```\n\n### Core Components\n\n#### Main Application (main.js)\nControls application flow and handles:\n- State management\n- Event handling\n- DOM manipulation\n- Data persistence\n- UI updates\n\n#### Business Logic (invoice.js)\nContains three main classes:\n- `LineItem`: Individual invoice entries\n- `Invoice`: Invoice management and calculations\n- `Company`: Company information and validation\n\n## 📦 API Reference\n\n### Invoice Class\n```javascript\nclass Invoice {\n    constructor(obj)              // Create new invoice\n    addLineItem(item)            // Add line item\n    removeLineItem(index)        // Remove line item\n    calculateTotals()            // Update totals\n    validate()                   // Check for errors\n    toJSON()                     // Export as JSON\n}\n```\n\n### LineItem Class\n```javascript\nclass LineItem {\n    constructor(obj)             // Create line item\n    render()                     // Render to DOM\n    update(field?)              // Update fields\n    toJSON()                    // Export as JSON\n}\n```\n\n### Company Class\n```javascript\nclass Company {\n    constructor(obj)             // Create company\n    validate()                   // Validate data\n    getFullAddress()            // Format address\n    toJSON()                    // Export as JSON\n}\n```\n\n## 💾 Data Storage\n\n### Local Storage\n- Automatic saving of changes\n- Offline capability\n- Version tracking\n\n### Server Sync\n- RESTful API integration\n- Conflict resolution\n- Automatic retry\n\n## 🛠️ Development\n\n### Debug Mode\nEnable detailed logging:\n```javascript\napp.state.debug = 1;\n```\n\n### Best Practices\n1. Update state before DOM\n2. Validate all inputs\n3. Handle errors gracefully\n4. Use data attributes for metadata\n5. Maintain accessibility\n\n## 🔜 Roadmap\n\n- [ ] IndexedDB migration\n- [ ] Invoice templates\n- [ ] Multi-currency support\n- [ ] Advanced tax calculations\n- [ ] Customer database\n- [ ] Payment gateway integration\n- [ ] Email capabilities\n- [ ] Batch operations\n\n## 🤝 Contributing\n\n1. Fork the Project\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\n## 📝 License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## 📧 Contact\n\nChristopher Robison - [@thechrisrobison](https://twitter.com/thechrisrobison) - cdr@cdr2.com\n\nProject Link: [https://github.com/chrisrobison/invoice-generator](https://github.com/chrisrobison/invoice)\n\n## 🙏 Acknowledgments\n\n* [html2pdf.js](https://github.com/eKoopmans/html2pdf.js)\n* [Font Awesome](https://fontawesome.com)\n* [Google Fonts](https://fonts.google.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisrobison%2Finvoice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisrobison%2Finvoice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisrobison%2Finvoice/lists"}