fix: remove iobroker mqtt references

This commit is contained in:
2025-11-10 11:15:09 +01:00
parent cf47edb835
commit bf160febee
4 changed files with 9 additions and 9 deletions

2
.env
View File

@@ -1,4 +1,4 @@
# MQTT-Konfiguration # Grundlegende Konfiguration
ADMIN_EMAIL=meikdre@gmx.de ADMIN_EMAIL=meikdre@gmx.de
# Server-Konfiguration # Server-Konfiguration
PORT=3000 PORT=3000

View File

@@ -3,7 +3,7 @@
## Project Structure & Module Organization ## Project Structure & Module Organization
- `src/` holds the React client: `index.js` bootstraps the app, `PickupConfigEditor.js` manages form logic, and sibling files (`App.js`, `*.css`, `*.test.js`) live beside their concerns for easy discovery. - `src/` holds the React client: `index.js` bootstraps the app, `PickupConfigEditor.js` manages form logic, and sibling files (`App.js`, `*.css`, `*.test.js`) live beside their concerns for easy discovery.
- `public/` contains the static shell served during development; only add files that must be copied verbatim into the build output. - `public/` contains the static shell served during development; only add files that must be copied verbatim into the build output.
- `server.js` is the Express + MQTT bridge that serves the built client, exposes `/api/iobroker/pickup-config`, and persists data to `config/pickup-config.json`. - `server.js` is the Express backend that serves the built client, exposes `/api/pickup-config`, and persists data to `config/pickup-config.json`.
- `config/` stores generated runtime state. Keep it writable but untracked so local credentials never leak. - `config/` stores generated runtime state. Keep it writable but untracked so local credentials never leak.
- `build/` is created by `npm run build` and shipped by the Express server or Docker image; never edit files here manually. - `build/` is created by `npm run build` and shipped by the Express server or Docker image; never edit files here manually.
- `docker-compose.yml`, `Dockerfile`, and `rebuildContainer.sh` encapsulate deployment; update them when server ports, env vars, or base images change. - `docker-compose.yml`, `Dockerfile`, and `rebuildContainer.sh` encapsulate deployment; update them when server ports, env vars, or base images change.
@@ -13,24 +13,24 @@
- `npm start` launch the CRA dev server on port 3000 with live reload. - `npm start` launch the CRA dev server on port 3000 with live reload.
- `npm run build` emit the production bundle into `build/`; run before `node server.js` or container builds. - `npm run build` emit the production bundle into `build/`; run before `node server.js` or container builds.
- `npm test` run React Testing Library suites in watch mode; append `-- --watch=false` in CI. - `npm test` run React Testing Library suites in watch mode; append `-- --watch=false` in CI.
- `node server.js` serve the prebuilt UI, REST API, and MQTT sync using values from `.env` (e.g., `MQTT_BROKER`, `MQTT_TOPIC`, `MQTT_USER`, `MQTT_PASSWORD`). - `node server.js` serve the prebuilt UI and REST API using values from `.env` (e.g., `PICKUP_TOPIC`, credentials, ports).
- `docker-compose up --build` rebuild and start the containerized service, syncing the bundled UI and server. - `docker-compose up --build` rebuild and start the containerized service, syncing the bundled UI and server.
## Coding Style & Naming Conventions ## Coding Style & Naming Conventions
- Use 2-space indentation and Standard/Prettier-compatible formatting; rely on the CRA ESLint config (`react-app`, `react-app/jest`) for feedback. - Use 2-space indentation and Standard/Prettier-compatible formatting; rely on the CRA ESLint config (`react-app`, `react-app/jest`) for feedback.
- Favor functional React components with PascalCase filenames (`PickupConfigEditor.js`) and camelCase props/state keys. - Favor functional React components with PascalCase filenames (`PickupConfigEditor.js`) and camelCase props/state keys.
- Keep config schema fields (e.g., `desiredWeekday`, `onlyNotify`) camelCase across client, API payloads, and MQTT messages. - Keep config schema fields (e.g., `desiredWeekday`, `onlyNotify`) camelCase across client and API payloads.
- Prefer descriptive folder-local CSS files rather than global selectors; co-locate assets next to their component whenever possible. - Prefer descriptive folder-local CSS files rather than global selectors; co-locate assets next to their component whenever possible.
## Testing Guidelines ## Testing Guidelines
- React Testing Library + Jest underpin `App.test.js`; add `<Component>.test.js` files alongside components to exercise rendering, validation, and MQTT payload shaping. - React Testing Library + Jest underpin `App.test.js`; add `<Component>.test.js` files alongside components to exercise rendering and validation.
- Initialize helpers inside `setupTests.js` to keep suites lean. - Initialize helpers inside `setupTests.js` to keep suites lean.
- Aim for meaningful edge cases (blank config, duplicate IDs, toggling `onlyNotify`). Pull requests should demonstrate passing `npm test` output or CI logs. - Aim for meaningful edge cases (blank config, duplicate IDs, toggling `onlyNotify`). Pull requests should demonstrate passing `npm test` output or CI logs.
## Commit & Pull Request Guidelines ## Commit & Pull Request Guidelines
- Follow conventional commits (e.g., `feat: add mqtt auth fields`, `fix: debounce config saves`) and keep subjects ≤72 characters. - Follow conventional commits (e.g., `feat: add notification panel`, `fix: debounce config saves`) and keep subjects ≤72 characters.
- After every change, refresh `.commitmessage` with the final commit text and ensure it is staged (e.g., `git add -f .commitmessage`) so tooling can reuse it automatically. - After every change, refresh `.commitmessage` with the final commit text and ensure it is staged (e.g., `git add -f .commitmessage`) so tooling can reuse it automatically.
- Reference issues or MQTT topics impacted inside the body, and describe user-visible changes plus verification steps. - Reference issues or API endpoints impacted inside the body, and describe user-visible changes plus verification steps.
- PRs must include: summary of API/UI changes, screenshots or JSON samples when modifying config shape, notes on new env vars, and confirmation that `npm test` and `npm run build` succeed. - PRs must include: summary of API/UI changes, screenshots or JSON samples when modifying config shape, notes on new env vars, and confirmation that `npm test` and `npm run build` succeed.
## Security & Configuration Tips ## Security & Configuration Tips

View File

@@ -87,7 +87,7 @@ const PickupConfigEditor = () => {
onClick={saveConfig} onClick={saveConfig}
className="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded" className="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded"
> >
In ioBroker speichern Konfiguration speichern
</button> </button>
</div> </div>

View File

@@ -314,7 +314,7 @@ const DashboardView = ({
Zurücksetzen Zurücksetzen
</button> </button>
<button onClick={onSaveConfig} className="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded"> <button onClick={onSaveConfig} className="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded">
In ioBroker speichern Konfiguration speichern
</button> </button>
</div> </div>