https://github.com/spoje-net/multiflexi-mserver
https://github.com/spoje-net/multiflexi-mserver
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/spoje-net/multiflexi-mserver
- Owner: Spoje-NET
- License: mit
- Created: 2026-01-18T12:09:04.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-05-25T13:39:38.000Z (13 days ago)
- Last Synced: 2026-05-25T15:12:13.713Z (13 days ago)
- Size: 47.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MultiFlexi mServer Credential Prototype


This repository contains the credential prototype for connecting MultiFlexi to Stormware Pohoda mServer API.
## Packages
| Package | Contents |
|---|---|
| `multiflexi-mserver` | Credential prototype JSON, SVG logo, `CredentialProtoType\MServer` PHP class |
| `multiflexi-mserver-ui` | `Ui\CredentialType\MServer` PHP class — web form with live connection test |
## Fields
| Keyword | Type | Required | Description |
|---|---|---|---|
| `POHODA_ICO` | string | yes | Organization Number (IČO) |
| `POHODA_URL` | string | yes | mServer API base URL, e.g. `http://pohoda:40000` |
| `POHODA_USERNAME` | string | yes | mServer API username |
| `POHODA_PASSWORD` | password | yes | mServer API password |
| `POHODA_SECONDARY_USERNAME` | string | no | Secondary account username for December→January data entry |
| `POHODA_SECONDARY_PASSWORD` | password | no | Secondary account password for December→January data entry |
## Smart Credential Prototype (UI)
When `multiflexi-mserver-ui` is installed, the credential form performs a live connection test against `{POHODA_URL}/status` using HTTP Basic Auth. On success it displays:
- **Company** — company name registered in Pohoda
- **Status** — server state (`idle` / `busy`)
- **Processing** — number of requests currently being processed
- **Server** — mServer self-reported URL
Authentication failures and network errors are shown as inline alerts.
## Year-End Data Entry
If data for December is being entered in January, provide the secondary account credentials. That account must have write permissions for the previous fiscal year in Pohoda.
## Installation
```sh
apt install multiflexi-mserver # core fields + JSON prototype
apt install multiflexi-mserver-ui # web form with connection check
```
The postinst script registers the prototype automatically:
```sh
multiflexi-cli credential-prototype:import-json \
--file /usr/lib/multiflexi-mserver/multiflexi/mserver.credprototype.json
```
## License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
## Author
Vítězslav Dvořák
For more information, visit [https://multiflexi.eu/](https://multiflexi.eu/)