{"id":29132145,"url":"https://github.com/reterics/pv1_printer_gateway","last_synced_at":"2026-04-28T15:36:52.836Z","repository":{"id":301718534,"uuid":"1010087457","full_name":"Reterics/pv1_printer_gateway","owner":"Reterics","description":"A gateway between POS (Point of Sale) systems and thermal printers","archived":false,"fork":false,"pushed_at":"2025-06-28T13:58:28.000Z","size":135,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-28T14:21:35.234Z","etag":null,"topics":["gateway-api","nodejs","thermal-printer","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Reterics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-28T10:10:39.000Z","updated_at":"2025-06-28T13:59:29.000Z","dependencies_parsed_at":"2025-06-28T14:21:35.479Z","dependency_job_id":null,"html_url":"https://github.com/Reterics/pv1_printer_gateway","commit_stats":null,"previous_names":["reterics/pv1_pos_gateway","reterics/pv1_printer_gateway"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Reterics/pv1_printer_gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reterics%2Fpv1_printer_gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reterics%2Fpv1_printer_gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reterics%2Fpv1_printer_gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reterics%2Fpv1_printer_gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Reterics","download_url":"https://codeload.github.com/Reterics/pv1_printer_gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reterics%2Fpv1_printer_gateway/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262720750,"owners_count":23353462,"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":["gateway-api","nodejs","thermal-printer","typescript"],"created_at":"2025-06-30T06:16:23.102Z","updated_at":"2026-04-28T15:36:47.799Z","avatar_url":"https://github.com/Reterics.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/Reterics/project_v1\"\u003e\n        \u003cimg src=\"./public/logo.png\" alt=\"Project V1\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eProject V1 Printer Gateway\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![build](https://github.com/Reterics/pv1_printer_gateway/actions/workflows/npm-build-test.yml/badge.svg)](https://github.com/Reterics/pv1_printer_gateway/actions/workflows/npm-build-test.yml) [![codecov](https://codecov.io/github/Reterics/pv1_printer_gateway/graph/badge.svg?token=MZLXTLPJSN)](https://codecov.io/github/Reterics/pv1_printer_gateway) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![maintenance-status](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)\n\n\u003c/div\u003e\nA Node.js service that provides a gateway between POS (Point of Sale) systems and thermal printers. This application allows you to send print jobs to various thermal printer brands over different interfaces (TCP/IP, USB, Serial, Bluetooth).\n\n## Features\n\n- Web-based interface for printer configuration and testing\n- RESTful API for integration with POS systems\n- Support for multiple printer brands (Epson, Star, Tanca)\n- Multiple connection interfaces (TCP/IP, USB, Serial, Bluetooth)\n- Test print functionality\n- Printer status monitoring\n- Configurable via JSON file or environment variables\n- Executable packaging for Windows and Linux\n\n## Installation\n\n### Prerequisites\n\n- Node.js 22.0.0 or higher\n\n### From Source\n\n1. Clone the repository\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Configure the application by editing `config/default.json` or setting environment variables\n\n### As Executable\n\nPre-built executables are available for Windows and Linux:\n\n1. Download the appropriate executable for your platform\n2. Create a `config` folder in the same directory as the executable\n3. Create a `default.json` file in the `config` folder with your configuration\n\n## Configuration\n\n### Configuration File\n\nCreate or modify `config/default.json`:\n\n```json\n{\n  \"server\": {\n    \"port\": 3000\n  },\n  \"printer\": {\n    \"ipAddress\": \"192.168.0.100\",\n    \"type\": \"epson\",\n    \"interfaceType\": \"tcp\",\n    \"logging\": true,\n    \"logFilePath\": \"./logs.log\"\n  }\n}\n```\n\n### Environment Variables\n\nYou can override configuration settings with environment variables:\n\n- `PORT` - Server port\n- `PRINTER_IP` - Printer IP address\n- `PRINTER_TYPE` - Printer brand (epson, star, tanca)\n- `PRINTER_INTERFACE` - Interface type (tcp, usb, serial, bluetooth)\n- `PRINTER_LOGGING` - Enable/disable printer logging (true/false)\n- `PRINTER_LOG_FILE` - Path to printer log file\n\n## Usage\n\n### Running the Server\n\n```bash\n# Development mode\nnpm run dev\n\n# Production mode\nnpm run build\nnpm start\n```\n\n### Web Interface\n\nAccess the web interface at `http://localhost:3000` (or your configured port).\n\nThe web interface allows you to:\n- View printer status\n- Send test prints\n- Configure printer settings\n\n### API Endpoints\n\n#### Print Text\n\n```\nPOST /api/print\n```\n\nRequest body:\n```json\n{\n  \"text\": \"Text to print\",\n  \"ip\": \"192.168.0.100\",\n  \"brand\": \"epson\",\n  \"interface_type\": \"tcp\"\n}\n```\n\nNote: Only the `text` field is required. The `ip`, `brand`, and `interface_type` fields are optional.\n\n#### Get Printer Options\n\n```\nGET /api/options\n```\n\nReturns available printer brands, interface types, and default configuration.\n\n#### Get Printer Status\n\n```\nGET /api/status\n```\n\nQuery parameters:\n- `ip` (optional) - Printer IP address\n- `brand` (optional) - Printer brand\n- `interface_type` (optional) - Interface type\n\n#### Send Test Print\n\n```\nGET /api/test-print\n```\n\nQuery parameters:\n- `ip` (optional) - Printer IP address\n- `brand` (optional) - Printer brand\n- `interface_type` (optional) - Interface type\n\n#### Get Configuration\n\n```\nGET /api/config\n```\n\nReturns the current server and printer configuration.\n\n## Building Executables\n\n```bash\n# Build for Windows\nnpm run pkg:win\n\n# Build for Linux\nnpm run pkg:linux\n\n# Build for both platforms\nnpm run pkg:all\n```\n\nExecutables will be created in the `dist` directory.\n\n## Testing\n\n```bash\n# Run tests\nnpm test\n\n# Run tests in watch mode\nnpm run test:watch\n\n# Generate coverage report\nnpm run coverage\n```\n\n## License\n\n[MIT](./LICENSE)\n\n## Contribute\n\nThere are many ways to [contribute](./CONTRIBUTING.md) to Printer Gateway.\n* [Submit bugs](https://github.com/Reterics/pv1_printer_gateway/issues) and help us verify fixes as they are checked in.\n* Review the [source code changes](https://github.com/Reterics/pv1_printer_gateway/pulls).\n* [Contribute bug fixes](https://github.com/Reterics/pv1_printer_gateway/blob/main/CONTRIBUTING.md).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freterics%2Fpv1_printer_gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freterics%2Fpv1_printer_gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freterics%2Fpv1_printer_gateway/lists"}