HRoot

Report Tracker

Report Tracker

A role-based web app to track employee client visits, generate daily Excel reports, and automate email updates to admins. Built with Next.js, PostgreSQL, and secure authentication, it streamlines reporting for efficient operational oversight.

Released/Created At 2024/9/03

Employee Visit Tracking Web Application

This web application, built with Next.js, PostgreSQL, TailwindCSS with ShadCN UI, Lucia for secure authentication, and tools like xlsx and Nodemailer, enables companies to track employee visits to clients and streamline reporting workflows. Employees can record visit details, generate daily reports, and send them automatically to admins, helping businesses maintain organized, accessible records.

Key Application Features

  1. Role-Based Access Control

    • The application uses three roles User, Admin, and Root to establish specific permissions:

      • User: Can create visit records with details such as company name, visit reason, and additional notes. They can also send a daily report of their visits to admins.

      • Admin: Has the authority to manage companies, view all user records, and receive daily reports.

      • Root: Has full administrative rights, including managing users, creating companies, and viewing all logs and records.

  2. Excel Report Generation with xlsx

    • The app uses the xlsx library to compile daily records into an Excel report, which contains details of client visits. This feature allows users to generate their reports quickly, reducing the need for manual data entry and ensuring that admins receive a standardized report format.

  3. Automated Email Reporting with Nodemailer

    • To streamline reporting, the application uses Nodemailer to send automated emails containing the daily Excel report as an attachment to admins. This setup ensures that admins have timely access to daily activity summaries, keeping them informed without additional manual processing.

  4. Responsive, User-Friendly UI

    • Designed with TailwindCSS and ShadCN UI, the interface is intuitive and responsive, allowing users to easily log visits, navigate records, and interact with the app on both desktop and mobile devices.

  5. Secure Authentication and Role-Based Permissions

    • Lucia manages user authentication and session handling, providing a secure login experience. The role-based permissions system restricts access based on user roles, protecting sensitive data and limiting administrative functions to authorized users.

Core Functionalities

1. Logging Visits and Notes

2. Excel Report Generation

3. Emailing of Reports

Technology Stack Overview

Implementation Flow

  1. User Workflow

    • Users log in, record client visits, add notes, and generate a daily report, which is automatically emailed to admins.

  2. Admin Workflow

    • Admins can manage client companies, review all user logs, and receive daily Excel reports from all users.

  3. Root Workflow

    • The root user has access to all functions, including managing user roles, creating companies, and generating or viewing comprehensive reports.

Conclusion

This employee visit tracking app provides an efficient, automated solution for managing client visits. The role-based access, daily reporting, and automated email system minimize manual work, enhance visibility, and offer a clear, organized view of employee-client interactions. This scalable, secure application is a valuable tool for optimizing operational oversight and data management.