First off — thank you for considering contributing to ESC/POS Printer Server! Your help makes this project better for the community and ensures that point-of-sale systems remain open, reliable, and cross-platform.
This document outlines the process for contributing code, reporting issues, improving documentation, and submitting feature requests.
- Code of Conduct
- How to Contribute
- Reporting Bugs
- Requesting Features
- Development Setup
- Code Style & Standards
- Testing
- Pull Request Guidelines
- Release & Build Process
- Community
This project follows the Contributor Covenant. All contributors are expected to adhere to respectful, inclusive communication and behavior.
By participating, you agree to uphold this code of conduct.
There are several ways you can contribute:
- Report a bug or suggest improvements.
- Fix a bug and submit a pull request.
- Add new printer interfaces or templates.
- Improve documentation, examples, or comments.
- Enhance the WebSocket or HTTP server logic.
- Create integrations for new POS front-ends.
If you’re new to open source, you can start by checking the good first issue label.
Before submitting a new bug report:
-
Search existing issues to see if the problem has already been reported.
-
If not found, open a new issue with the following details:
- A clear title describing the problem.
- Steps to reproduce the issue.
- Expected vs. actual behavior.
- System details: OS, PHP version, and interface used (CUPS, Ethernet, etc.).
- Relevant log output or screenshots.
Example issue title:
[Bug] Printing over SMB fails on Windows Server 2022
Feature requests are welcome! Please include:
- A short description of the feature.
- Why it’s valuable (e.g., improves compatibility or UX).
- Any example usage or code reference if available.
Example:
[Feature] Add WebSocket authentication using API tokens
- PHP >= 8.1
- Extension should enabled:
- sockets
- intl
- openssl
- Extension should enabled:
- Composer
- Workerman (auto-installed via Composer)
- ESC/POS-PHP library (mike42/escpos-php)
- Box (for PHAR builds)
git clone https://github.com/darkterminal/escpos-printer-server.git
cd escpos-printer-server
composer installWindows
Windows doesn't support multi-worker.
php eps --role ws # terminal 1
php eps --role http # terminal 2Linux/MacOS
php epsAccess the Web GUI:
http://localhost:1100
Logs:
logs/workerman.log
This project follows PSR-12 coding standards.
Please ensure your code adheres to:
- Strict typing (
declare(strict_types=1);) - Meaningful class and method names
- Proper namespace organization (
Darkterminal\EscposPrinterServer) - Consistent indentation and spacing (4 spaces)
- Docblocks for all public methods
Run the linter before committing:
composer run lintTests are written using PestPHP for simplicity and readability.
Run all tests:
composer testIf you add or modify features, include corresponding tests in the tests/ directory.
-
Fork the repository and create your branch:
git checkout -b feature/add-new-interface
-
Commit clearly and logically:
git commit -m "feat: add SMB printer support for Linux hosts" -
Run tests and ensure your code builds successfully:
composer test -
Submit a pull request to the
mainbranch. -
Describe the changes and reference any related issues (
#issue-number).
Your PR will be reviewed for:
- Code clarity and maintainability
- Backward compatibility
- Proper error handling and logging
- Documentation updates
Releases are automatically handled via GitHub Actions:
-
On each tagged release, the workflow:
- Builds the PHAR archive (
eps.phar) - Packages the Windows bundle with PHP runtime and NSSM
- Uploads both ZIP files to GitHub Releases
- Builds the PHAR archive (
You can also build locally:
composer run create:pharWindows bundle:
composer run create:bundleJoin the discussion or follow updates:
- GitHub: @darkterminal
- Discussions: GitHub Discussions
- Issue tracker: Issues Page
We appreciate your contribution — even small fixes make a big difference.
Thank you for helping improve ESC/POS Printer Server! Together we can make cross-platform receipt printing simpler, faster, and more open.