This site is driven by two keys, like the machine it came from. Reading: j and k scroll, d and u move half a page, gg goes to the top, G to the bottom, H and L switch windows, ? opens the help. Space is the Neovim leader and handles content: Space then h home, r research, p projects, g gear, a about, / tags, or Space then a digit to jump to that window. Home is the tmux prefix and handles windows: Home then c opens a terminal, Home then & closes a window, Home then space goes to the next one. While focus is on the keyboard, h j k l move between keys and Enter opens one.

ResearchR AboutA Gear — G for gear — keyboard, terminal, editor, homelab.G
    ProjectsP Tags — / as in vim: search./
    ×
    Menu

    test_presence: GPS-Validated Employee Attendance

    An attendance app with geolocation-validated check-in and a leave-request flow. Go + SQLite backend, React front end with a map preview of the office radius.

    Overview

    Attendance management app for tracking employee presence with GPS-based check-in and a leave request flow.

    • Backend: Go with SQLite database
    • Frontend: React with GPS check-in flow

    Features

    • Attendance validation based on office geolocation and a configurable radius
    • Leave request submission for employees
    • Admin dashboard for reports and for approving or rejecting leave requests
    • Role-based authentication for employees and admins
    • Map preview showing the office center point, allowed radius, and the employee’s current GPS position

    Project Structure

    DirectoryDescription
    BE/REST API (Go + SQLite)
    FE/Web app (React + Vite)

    Running the Backend

    cd BE
    go mod tidy
    go run .

    The backend runs at http://localhost:8080.

    Default Users

    UsernamePasswordRole
    andipassword123Employee
    budipassword123Employee
    citrapassword123Admin

    Running the Frontend

    cd FE
    npm install
    npm run dev

    The frontend is available at http://localhost:5173.

    By default, the FE uses /api through the Vite proxy. To change the API endpoint, set:

    VITE_API_BASE=http://localhost:8080/api

    API Endpoints

    Public

    • POST /api/login

    Authenticated

    • GET /api/config
    • POST /api/presence
    • POST /api/holiday-requests
    • GET /api/holiday-requests — employees only see their own requests

    Admin Only

    • GET /api/employees
    • PATCH /api/holiday-requests/{id}
    • GET /api/admin/report

    Docker Setup

    Run the entire stack with a single command:

    docker compose up --build
    • Frontend: http://localhost:5173
    • Backend: http://localhost:8080

    Notes

    • The Dockerized FE proxies /api to the backend container internally, avoiding CORS issues in the browser.
    • The local Vite dev server also proxies /api to http://localhost:8080.
    id en
    rss gh in