Skip to content
alekajiya
Open menu
All projects

RCP: Time Tracking System

3 min readProgramowanie

An RFID card reader data importer and attendance list, request, and report application for a public institution. Without a new system: data goes to an intranet already used by the office.

Technologies

  • SvelteKit
  • TypeScript
  • Tailwind v4
  • Flowbite Svelte
  • Directus
  • Python
  • Nodemailer
  • Docker

The institution I work for has had an RFID card reader for work time registration for years. The problem was that the check-ins were stored in text files, and the HR team had to manually compile attendance lists from them.

Instead of buying a new system, I added two things to the existing reader: an importer that transfers the records to the intranet and an application where HR, supervisors, and employees can see attendance in their browser.

Diagram: Reception Counter Reader (RCR) reflections are processed via a Python importer into the intranet's Directus, and from there to the RCP Dashboard application with attendance lists, logs, requests, and reports(enlarge)
The path from swiping a card to the attendance list

Importer: Text files to database

The reader writes each day to a separate file. Each line has 24 characters: the date, time without seconds, card number and event type - entry, exit, duty exit or return.

Python hourly importer:

  • checks a directory with new files,
  • parses lines and skips those already in the database, so re-reading the file doesn't duplicate anything,
  • links the card number to an employee record,
  • records events in the intranet's Directus system,
  • moves the processed file to an archive and logs everything.

A separate script transfers files from the computer to which the reader is connected. No one needs to copy them manually anymore.

One source of truth

The data goes to the same Directus instance used by the office's intranet. It includes employees, organizational structure, positions, RFID cards, the absence dictionary, and types of requests. The RCP Dashboard doesn't have its own database; it simply builds an interface on top of these existing data sources.

RCP Dashboard

The application has separate views for different roles:

  • daily attendance with switching between days using arrows,
  • event log with manual timecard corrections by HR staff,
  • conclusions: leave requests, official and private exits, overtime, requiring approval first from the supervisor and then from the office management,
  • employee lists with export to CSV,
  • reports: daily attendance list, monthly summary and employee card,
  • my presence - the view for each employee with their own check-ins.

Permissions are derived from roles and the organizational structure. HR can see everyone, a supervisor can see their team, and an employee can only see themselves. Logging in is done via the intranet account, and security events are logged separately.

Simplified Mode

Implementing electronic time tracking in an office is also about people, not just technology. The administrator can temporarily hide the clocking-in times and tardiness markers in the application views. The data in the database remains unchanged, and HR continues to see and correct the actual values.

Why No Screen Shots

This is a system that records the attendance of specific individuals, so instead of screenshots, I'm showing a diagram.

Stack

  • SvelteKit with a Node adapter and TypeScript
  • Tailwind v4 and Flowbite Svelte (admin dashboard template),
  • Direct access to the intranet through official SDK,
  • file import and synchronization in Python,
  • email notifications using Nodemailer,
  • Docker.

Was this useful?

New posts by e-mail

Every now and then, when a new post or project goes up. No ads.

Got an idea, a question or a comment? Write to me:Enable JavaScript to see the e-mail address

Comments

No comments yet. Be the first.

Click or scroll to zoom in. Drag to move around.Double tap or pinch to zoom in.

More projects

Local law register: five thousand acts in one search engine

Orders and resolutions were scattered across the BIP public information bulletin, signed packages from the document management system, a network drive and a paper archive. I built a register that joins these sources, shows each act's status, electronic signature and Official Journal publication, and points out gaps in the numbering.

SMS panel: notifications sent from the browser

A web front end for my SMS gateway: sending to numbers, contacts and groups, scheduled sending, conversations, a shared inbox and notification sign-ups confirmed with an SMS code. One codebase runs as two instances, each with its own SIM card and look.

My own SMS gateway: a GSM modem, two SIM cards and an API for many systems

My systems send text messages about interrupted streams, failing information boards and changes spotted by backups. Instead of paying for a commercial gateway, I built my own: a Quectel M95 modem, two SIM cards, a Python API, signed webhooks, delivery reports and a panel with two-factor login.