Project 02 — PKD

From the greenhouse row
to the timesheet.

PKD is an employee platform for a vegetable grower. Staff track their time by scanning an NFC tag or QR code at the greenhouse row, even offline. The scans feed time records, workflow diagrams and timesheets. The platform also includes team chat and calls, training videos in each worker's language, a camera-based pack counter with AI, and company phones in kiosk mode. Server, web app, Android and iOS — built by one developer.

By Abbas Hoseiny· Web, Android, iOS· Proprietary

A horticultural business employs permanent and seasonal staff who speak different languages. Work at the greenhouse rows was recorded on clipboards, the payroll software has no integration interface, and Wi-Fi coverage is patchy. PKD replaces paper notes with scans of the NFC tags at each row and turns those scans into what the office and management need: working hours, timesheets and a clear view of the workday.

PKD administration on the desktop: workflow diagram of one working day, people on the left, activities in the middle, departments on the right, connected by coloured bands
Fig. 1 — the working day as a diagramEmployees → Working time → Workflow

Each band represents a person, each node an activity, and the band width shows recorded minutes. The diagram shows who worked where, what they did, for how long, and what still needs review.

Workflow diagram in row view: people, activities and the rows of one department with minutes and times per row
Fig. 2 — down to each rowOne department, “Rows” view

For each row, the diagram shows minutes worked, time windows and how often work took place there that day. Rows are sorted by their first scan, so the view follows the day's sequence from top to bottom.

PKD app on a phone, screen “Now”: clocked in, running activity with department and row
PKD app, screen “Today”: working time of the day and the list of scans with time, activity, row and duration
PKD app, section “Learn”: short videos on arriving, the working day, changing rows and breaks
Fig. 3 — the employees' appNow · Today · Learn

Three questions: Am I clocked in? What am I working on? What have I done today? Chat, photos and training videos are available from the bottom bar.

PKD app in Ukrainian: screen “Now” with presence and last activity
PKD app in Polish: section “Learn” with the first steps
PKD app in Ukrainian: screen “Today” with working time and scans
Fig. 4 — in each worker's languageGerman, Polish, Ukrainian, Romanian

The account determines the language of the interface, training videos and messages; it does not depend on the device.

What the platform does

Track, analyse, communicate.

Time tracking at each row
Staff clock in, clock out and record activities by scanning the NFC tag at the row or a QR code. The server sets the recorded time. Offline scans wait on the device for upload.
Workflow, history, today
A diagram of the day by department or row, days shown side by side, transitions from yesterday to today, and a live view of who is present and what work is under way.
Timesheet and payroll
A monthly timesheet for each person, covering every calendar day. Every change requires a comment. Approval, PDF and Excel export, and reconciliation with payroll software.
Team chat and calls
One-to-one and group chats, voice messages, files and internet calls. Key contacts appear at the top: management, team lead and support.
Training in each worker's language
Short videos covering first steps and essential information, available in every language supported by the app.
Camera-based pack counter
A camera above the conveyor belt counts packs, uses AI to classify them by size and flags defects. Results appear live, in historical views and in photo reports.
Locations and chips
A site plan shows departments and rows. A card with an NFC tag hangs at each row; administrators can program the tags through the management interface.
Company phones and operations
Company phones in kiosk mode, staged updates and one account per phone. A server provides daily backups, with a copy held by a second provider.
Fig. 5 — the pack counterScreen recording, no sound

The camera records packs on the conveyor belt. A nearby computer counts and classifies them, and the server stores the results. Captured images remain in the archive as a record and can be reclassified later.

Pack counter, one-month history: key figures, daily bar chart and table showing total, large, small and defective packs
Site plan: greenhouse rows drawn as a plan with departments and a filter by scan point type
Fig. 6 — history and site planPacks counted each day · site plan with NFC tags at each row
Timesheet of one month for one person: per calendar day status, clock in, clock out, present, working time, activities, hints and remarks
Fig. 7 — the monthly sheetEmployees → Working time → Hours

Each calendar day has its own row. Only entries that need review are flagged: a missing clock-out, an unusual scan or a late entry. A weekend is not an error.

Technology

How the platform is built

A central server holds the authoritative record. Lightweight clients run on phones and PCs. The data model never reinterprets a scan.

1. One server, many devices

The hub is a Go service backed by PostgreSQL. A Caddy proxy serves the API and web interface from one domain. External access goes through a tunnel.

Devices
Android, iOS, kiosk, browser, camera-side computer
  • One web app for phone and administration
  • Native app wrappers: NFC, push, calls, updates
  • Kiosk app on the company phones
⇄HTTPS
one domain
Hub · Go
API, reporting, push, mail, background jobs
  • Permissions per person and area
  • Computes working time, workflow, timesheet
  • Push, e-mails, reports, payroll reconciliation
⇄SQL
PostgreSQL
One database, one truth
  • All modules in one database
  • Daily dumps, copy at a second provider

The admin interface and phone app share the same web app. Native wrappers add capabilities the browser does not provide. One web deployment serves every platform.

2. The scan model

An NFC tag carries no business meaning, only an identifier: the slot. Its meaning is stored in a definition with an effective date. Every scan is an immutable event.

  1. The phone sends the slot, event ID and its local timestamp. The server sets the authoritative time.
  2. The hub writes the event with person, slot, definition, time and source.
  3. Durations are calculated when records are queried. If a row is repurposed, earlier events retain their original meaning.
  4. If the same scan arrives twice, it counts once.

3. Without a network

QueueEvery scan is saved on the device first and appears complete there immediately. Upload happens later, in scan order.
TimesThe server checks the device clock, bounds implausible timestamps and flags them for review.
Cold startThe app starts and scans even after days without a network. An automated test checks this on every change.
CatalogueActivities, locations and translations are stored on the device. Administrators can see each device's catalogue version and pending scans.

4. Evaluation

The hub handles all calculations. Workflow diagrams, history, timesheets and emailed reports use the same functions.

WorkflowA Sankey diagram connects people, activities and departments or rows. Details are shown at each node. Multiple days appear side by side, never merged into one diagram.
HistoryWhere did work on an activity end, and did it resume in the same row? A continuation means the same activity in the same row.
TimesheetWorking days from the employment period or the company rule, public holidays from a table. Every correction needs a comment and stays visible.
Payroll softwareIt has no usable integration interface. A small computer on the company network reads its database and processes write requests from the hub.

5. Chat, calls, learning

ChatOne-to-one and group chats, read receipts, voice messages, files. Attachments live in an object store and are scanned for viruses.
CallsVoice calls over WebRTC, encrypted between the devices. If the direct connection fails, a self-hosted TURN relay steps in.
PushCalls and important messages wake the device. If push fails, the app detects calls by polling.
LearningShort explainer videos, automatically narrated in each language.
MessagesTime-correction notices go out in the worker's language; replies are translated on the way back. An AI assistant can call to resolve questions.

6. Devices

Kiosk modeA dedicated kiosk app as device owner: only PKD and approved apps, battery and volume monitored, updates staged.
One account per phoneSwitching phones uses a QR code and signs out the old device. Spare sheets of QR codes are available.
Device keysEvery device is paired once and receives its own key. The administration can block it at any time.

7. Operations

ContainersHub, database, proxy, object store, virus scanner, TURN relay, tunnel and backup in one Docker Compose stack.
BackupA daily database dump on the server and an encrypted copy at a second provider.
MigrationA signed notice informs the apps when the server address changes. Devices then switch automatically.

8. Fact sheet

RoleConcept, architecture, implementation, operation and support
UsersSeasonal and permanent staff, foremen, office, management; German, Polish, Ukrainian, Romanian
ServerGo, PostgreSQL, Caddy, Docker Compose, tunnel, object store, virus scanner, TURN relay
FrontendAstro, TypeScript, service worker, d3-sankey, PDF and Excel export
AppsAndroid and iOS in a native shell, a dedicated kiosk app; NFC chips at the rows, QR codes as fallback
ModulesTime tracking, workflow, history, timesheet, payroll reconciliation, chat and calls, learning, pack counter, locations, control check, greenhouse, notices, mailbox, file explorer
CodeProprietary, not public