# LightTAM LightTAM (Lightweight Time And Attendance Manager) is a free (as in freedom) and open-source, simple tool for managing the attendance of employees or students using RFID cards and readers. LightTAM consists of a server that manages the user database and an RFID card reader that users use to log in and out of the system. The reader's firmware and documentation are located in a [separate repository](https://git.edcs.cz/eduard.dlabal/LightTAM_RFID_Reader). ## Download and Start You can download a pre-built binary file for Linux from the Releases menu, or you can build it from source yourself. For testing functionality on your system, I recommend downloading the test user list from the Releases menu. You will need permission to access the serial port (most likely /dev/ttyUSB0) on your Linux system. On Fedora/RHEL or Ubuntu, you can obtain these permissions by typing the following command in your terminal and then rebooting your system: ```bash sudo usermod -a -G dialout ``` ## Usage To start the program, run it with a single argument specifying the path to the user database file: ```bash ./output/main ``` ### Main Menu After launching, you will see the main administration menu with the following options: 1. **List all employees** Shows a list of all users in the database. Use the arrow keys to navigate, Enter to select a user for more details, and q or Esc to return. 2. **Find employee** Allows you to search for a user by name and surname. Enter the search term and navigate the results as above. 3. **Edit database** Lets you add, remove, or log a time event for a user: - **Add person to database**: Fill in the name, surname, and department to add a new user. - **Remove person from database**: Enter the UUID of the user to remove. - **Back**: Return to the main menu. 4. **Save** Saves the current state of the user database to the specified file. 5. **Export** Allows you to export the current database to a new file. Enter the desired filename and confirm. 6. **Exit** Closes the program. ### User Details When viewing a user's details, you can: - **Print to file**: Export the user's information to a text file. - **Add Time Event**: Manually log a new time event for the user. - **Back**: Return to the previous menu. ### Keyboard Shortcuts - Tab: Move between buttons and menu items. - Arrow keys: Navigate lists and menus. - Enter: Confirm selection or action. - q or Esc: Go back or exit the current menu. ### RFID Usage When the RFID reader is connected and ready, users can log their attendance by simply placing their RFID card on the reader. The system will automatically record the event and update the database. ### Notes - Make sure you have the necessary permissions to access the serial port for the RFID reader. - All actions and errors are logged in the `lighttam_journal` file for troubleshooting and auditing. ## Build from Source To build LightTAM from source, you need a Linux system with `gcc`, `make`, and the development headers for `ncurses` and `pthread`. 1. **Install dependencies** (example for Debian/Ubuntu): ```bash sudo apt-get install build-essential libncurses5-dev libncursesw5-dev ``` 2. **Clone the repository** (if you haven't already): ```bash git clone https://git.edcs.cz/eduard.dlabal/LightTAM cd LightTAM ``` 3. **Build the project**: ```bash make ``` 4. The compiled binary will be located in the `output/` directory as `main`. 5. **Run the program**: ```bash ./output/main ``` If you encounter any errors during compilation, make sure all dependencies are installed and you are running the commands from the project root directory. ## Detailed documataton You can find more detailed information about LightTAM in [docs folder](docs) .