Skip to content

Repository files navigation

Keues Counter

Version Status: MVP Electron React TypeScript Vite Mantine License: MIT

Counter (service desk) frontend for the Keues queue management system. Official website and documentation: https://www.keues.dev

Keues Counter is the app that runs at each attended counter (butcher, fishmonger, greengrocer, etc.). The operator uses it to call the next ticket, finish an attendance, notify that the counter is free or make manual calls. It writes to the backend — the action counterpart of the read-only Keues-Monitors screens.

⚠️ This project does not work standalone. It requires the Keues backend to connect to and manage tickets.


Requirements

  • Node.js and pnpm
  • The Keues backend (REST API + SignalR hub) deployed and reachable from the same network as the counters.

Note: some write endpoints (set-free, call-manual-ticket) are still stubs in the backend. If they return 404, that is expected in the current stage of the backend.


How it works

  1. Choose the server, a location, a flow and your counter.
  2. Give the counter a name to identify the desk.
  3. Save: the app connects via SignalR and shows the panel that matches the flow type.

The flow type determines which panel is displayed:

Flow type Panel Actions
0 — TicketMachine CallTicket Call next ticket / Finish attendance
1 — SetFree SetFree Mark the counter as free
2 — ManualCall ManualCall Manual number: +1 / −1 / +10 / −10

Features

  • Call the next ticket and finish the attendance.
  • Free counter notification.
  • Manual number calls with +1 / −1 / +10 / −10.
  • Real-time connection status badge and counter name badge.
  • Persisted configuration (electron-store) at ~/.config/keues-counter/config.json, with an auto-generated UUID deviceId.

Install & run

pnpm install
pnpm start
  • pnpm start launches Vite (renderer on http://localhost:11220) and the Electron window together.
  • On first launch, the configuration screen opens (server URL, location, flow, counter name).

On some Linux environments Electron requires ELECTRON_DISABLE_SANDBOX=1 or --no-sandbox to run.


Build (Windows)

pnpm dist

Builds the renderer and the Electron main process and packages a Windows NSIS installer via electron-builder.

Windows installer: every GitHub release includes a ready-to-install .exe for Windows. Download it, run it and follow the installer steps — no build tools required.


API endpoints used

Read:

Endpoint Purpose
GET /api/locations List of establishments
GET /api/counters?locationId=X Counters of a location
GET /api/flows?locationId=X List of flows for a location
GET /api/flows/{id} Fresh flow JSON

Write:

Endpoint Purpose
POST /api/counters/{counterId}/call-next-ticket Call the next ticket (body: { counterId, flowId })
POST /api/counters/{counterId}/attend-ticket Finish the attendance (body: { counterId, ticketId, flowId })
POST /api/counters/{counterId}/set-free Notify the counter is free — stub, may return 404
POST /api/counters/{counterId}/call-manual-ticket Manual call (body: { code, flowId, locationId, counterId }) — stub, may return 404

SignalR

The counter establishes the SignalR connection to the hub /devices?deviceId=...&name=...&locationId=...&flowId=...&type=Counter to be registered as a connected device. Domain events are not consumed yet.


Stack

  • Electron 43
  • React 19
  • Vite 8
  • TypeScript 6
  • Mantine 9 + @tabler/icons-react
  • @microsoft/signalr 10
  • electron-store 11

Project structure

electron/
  main.ts          # Electron main process, config store, deviceId UUID
  preload.cjs      # contextBridge: save/load config

src/
  main.tsx         # App entry, Mantine provider
  App.tsx          # Loads config → CounterPanel or ConfigScreen
  api/
    keuesApi.ts        # REST calls (read + write)
    signalRService.ts  # SignalR connection + status
  components/
    config/ConfigScreen.tsx  # Server → location → flow → counter
    flows/                 # CounterPanel + CallTicket/SetFree/ManualCall panels
  types/             # Config, models and app definitions

License

Released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages