Skip to content

Commit 3a6017d

Browse files
dzerikclaude
andcommitted
chore: оформление репозитория по лучшим практикам GitHub
- Добавлен LICENSE (MIT) - Добавлен .editorconfig - Добавлены шаблоны issues (bug report, feature request) - Добавлен шаблон Pull Request - Добавлен dependabot.yml для автообновления зависимостей - Обновлён README: бейджи, ссылка на demo, Getting Started, Contributing - Добавлено примечание о совместимости с другими Tuya IR устройствами - Установлены описание, homepage и топики репозитория 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e17dcfc commit 3a6017d

7 files changed

Lines changed: 238 additions & 14 deletions

File tree

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.{ts,tsx,js,jsx}]
12+
indent_size = 2
13+
14+
[*.{json,yml,yaml}]
15+
indent_size = 2
16+
17+
[*.md]
18+
trim_trailing_whitespace = false
19+
20+
[Makefile]
21+
indent_style = tab
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to report a bug!
9+
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: A clear description of the bug
15+
placeholder: What happened?
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: steps
21+
attributes:
22+
label: Steps to reproduce
23+
description: How can we reproduce the issue?
24+
placeholder: |
25+
1. Go to '...'
26+
2. Upload file '...'
27+
3. Click on '...'
28+
4. See error
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: expected
34+
attributes:
35+
label: Expected behavior
36+
description: What did you expect to happen?
37+
validations:
38+
required: true
39+
40+
- type: dropdown
41+
id: browser
42+
attributes:
43+
label: Browser
44+
options:
45+
- Chrome
46+
- Firefox
47+
- Safari
48+
- Edge
49+
- Other
50+
validations:
51+
required: false
52+
53+
- type: textarea
54+
id: input-data
55+
attributes:
56+
label: Input data
57+
description: If applicable, paste the Broadlink code or SmartIR JSON that caused the issue
58+
render: json
59+
validations:
60+
required: false
61+
62+
- type: textarea
63+
id: screenshots
64+
attributes:
65+
label: Screenshots
66+
description: If applicable, add screenshots to help explain the problem
67+
validations:
68+
required: false
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Feature Request
2+
description: Suggest an idea or improvement
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for suggesting an improvement!
9+
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem
14+
description: What problem does this feature solve?
15+
placeholder: I'm frustrated when...
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: solution
21+
attributes:
22+
label: Proposed solution
23+
description: Describe the solution you'd like
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: alternatives
29+
attributes:
30+
label: Alternatives considered
31+
description: Any alternative solutions or features you've considered?
32+
validations:
33+
required: false
34+
35+
- type: textarea
36+
id: context
37+
attributes:
38+
label: Additional context
39+
description: Any other context, screenshots, or examples
40+
validations:
41+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Summary
2+
3+
<!-- Brief description of the changes -->
4+
5+
## Changes
6+
7+
-
8+
9+
## Type of change
10+
11+
- [ ] Bug fix
12+
- [ ] New feature
13+
- [ ] Refactoring
14+
- [ ] Documentation
15+
16+
## Checklist
17+
18+
- [ ] `npm run build` succeeds
19+
- [ ] `npm test` passes
20+
- [ ] `npm run lint` passes
21+
- [ ] Tested in browser manually

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/frontend"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
labels:
9+
- "dependencies"
10+
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
open-pull-requests-limit: 5
16+
labels:
17+
- "dependencies"
18+
- "github-actions"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 dzerik
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
# Broadlink to UFO-R11 IR Code Converter
22

3+
[![Deploy to GitHub Pages](https://github.com/dzerik/Broadlink-UFO-R11/actions/workflows/deploy.yml/badge.svg)](https://github.com/dzerik/Broadlink-UFO-R11/actions/workflows/deploy.yml)
4+
[![Tests](https://github.com/dzerik/Broadlink-UFO-R11/actions/workflows/test.yml/badge.svg)](https://github.com/dzerik/Broadlink-UFO-R11/actions/workflows/test.yml)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6+
[![TypeScript](https://img.shields.io/badge/TypeScript-5.8-blue.svg)](https://www.typescriptlang.org/)
7+
[![Next.js](https://img.shields.io/badge/Next.js-16-black.svg)](https://nextjs.org/)
8+
39
> **Based on the original [broadlinktoUFOR11](https://github.com/arkservertools/broadlinktoUFOR11) by arkservertools.**
410
>
511
> IR codes for conversion can be found at [SmartIR codes repository](https://github.com/smartHomeHub/SmartIR/tree/master/codes).
612
713
---
814

9-
A client-side web application to convert IR codes from Broadlink Base64 format to UFO-R11 MQTT format for MOES UFO-R11 devices used with SmartIR addon in Home Assistant.
15+
A client-side web application to convert IR codes from **Broadlink Base64** format to **UFO-R11 MQTT** format for [MOES UFO-R11](https://www.moeshouse.com/) devices used with [SmartIR](https://github.com/smartHomeHub/SmartIR) addon in [Home Assistant](https://www.home-assistant.io/).
16+
17+
> **Note:** While primarily designed for MOES UFO-R11, this converter may also work with other Tuya-based IR blasters that use the same Tuya IR stream protocol (e.g., Zigbee or Wi-Fi IR remotes with Tuya firmware).
1018
1119
**All conversion runs entirely in the browser — no backend required.**
1220

21+
## Demo
22+
23+
**[Live Demo on GitHub Pages](https://dzerik.github.io/Broadlink-UFO-R11/)**
24+
1325
## Features
1426

1527
- Two-panel JSON editor with syntax highlighting
1628
- Single IR code conversion
1729
- File upload (SmartIR JSON)
1830
- 4 compression levels (LZ77-like Tuya Stream)
19-
- `ir_code_to_send` wrapper option
20-
- English/Russian interface
21-
- Hosted on GitHub Pages
31+
- `ir_code_to_send` wrapper option for MQTT payloads
32+
- English / Russian interface
2233

2334
## Compression Levels
2435

@@ -37,41 +48,64 @@ Broadlink Base64 → hex → timings → uint16 LE → Tuya compress → Base64
3748

3849
All conversion logic is implemented in TypeScript and runs client-side:
3950

40-
- **IRConverter** — Conversion facade
41-
- **BroadlinkDecoder** — Broadlink format decoder
42-
- **TuyaEncoder** — UFO-R11 format encoder
43-
- **TuyaCompressor** — LZ77-like Tuya Stream compression
51+
| Module | Description |
52+
|--------|-------------|
53+
| **IRConverter** | Conversion facade |
54+
| **BroadlinkDecoder** | Broadlink format decoder |
55+
| **TuyaEncoder** | UFO-R11 format encoder |
56+
| **TuyaCompressor** | LZ77-like Tuya Stream compression |
57+
58+
## Getting Started
59+
60+
### Prerequisites
61+
62+
- [Node.js](https://nodejs.org/) 20+
63+
- npm
4464

45-
## Development
65+
### Installation
4666

4767
```bash
48-
cd frontend
68+
git clone https://github.com/dzerik/Broadlink-UFO-R11.git
69+
cd Broadlink-UFO-R11/frontend
4970
npm install
71+
```
72+
73+
### Development
74+
75+
```bash
5076
npm run dev
5177
```
5278

79+
Open [http://localhost:3000](http://localhost:3000) in your browser.
80+
5381
### Testing
5482

5583
```bash
56-
cd frontend
5784
npm test
5885
```
5986

6087
### Build
6188

6289
```bash
63-
cd frontend
6490
npm run build
6591
# Static output in frontend/out/
6692
```
6793

6894
## Deployment
6995

70-
The app auto-deploys to GitHub Pages on push to `main` via GitHub Actions.
96+
The app auto-deploys to GitHub Pages on push to `main` via [GitHub Actions](.github/workflows/deploy.yml).
97+
98+
## Contributing
99+
100+
1. Fork the repository
101+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
102+
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
103+
4. Push to the branch (`git push origin feature/amazing-feature`)
104+
5. Open a Pull Request
71105

72106
## License
73107

74-
MIT License
108+
This project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.
75109

76110
## Credits
77111

0 commit comments

Comments
 (0)