JHWorks AI Groupware
An independent groupware project connecting leave planning to approval drafts through natural-language consultation and explicit confirmation. The server validates business rules and permission to change data.
Problem
Employees check leave balances, team schedules and policies separately, then re-enter them in an approval. AI guesses or unconfirmed writes can turn convenience into incorrect business data.
Solution
- AI structures intent and dates; the existing domain engine computes candidates from the authenticated employee's balance and calendar.
- The work assistant uses allowlisted read tools scoped to the authenticated employee, without arbitrary employee IDs.
- Policy RAG links active document versions and section IDs, with server-validated citations.
- Exact previews bind the employee, candidate, account version and calendar/policy snapshots to signed confirmation. Changed data invalidates the preview.
- Repeated confirmation returns the same draft. Submission requires separate confirmation and reuses transactional approval and leave reservation services.
Outcome
- Connected natural-language requests, date selection, preview, explicit save and the persisted DRAFT screen using existing domains.
- Automated checks cover normal flow, authorization, duplicate saves, stale versions, insufficient balance and schedule conflicts without paid API calls.
Why I built it
After building enterprise interfaces with React, TypeScript and Electron at work, I designed this independent project to explore the business rules behind APIs and databases and the boundaries of applying AI. It connects employees, organization, approvals, attendance and leave accounts.
No employer source code or internal materials were reused. All people, organizations, policies and business records are synthetic data created independently for this project.
Core user journey
Example request: Find two days off next week that avoid our team schedule and prepare a leave approval draft.
- AI structures intent, period and duration. The server supplies the current Seoul date and checks the interpretation of ‘next week’.
- The existing engine reads the authenticated employee's balance and schedules, returning available, caution and excluded dates with reasons.
- The employee selects a candidate and reviews dates, deduction, available balance, approver and policy evidence.
- Explicit confirmation revalidates current data, saves one DRAFT and opens the persisted document.
- If AI is unavailable, manual date search links to the existing approval form.
Architecture and responsibility
- 01 →Next.js / user confirmation
- 02 →FastAPI / auth and authorization
- 03 →Domain Service / transitions and leave calculation
- 04 PostgreSQL / business data and pgvector
FastAPI adapters connect OpenAI Structured Output and Function Calling. Policy retrieval uses pgvector while source policies remain in the application database. Local checks use SQLite and fake embedding providers.
The LLM does not decide business rules or write permissions. General read tools and confirmed leave capabilities have separate boundaries. The server checks current data again before saving or submitting.
Verification and evidence
On October 15, 2026, pnpm validate passed 111 API tests and Playwright passed eight desktop/mobile tests. API integration tests assert actual state transitions and persistence. Playwright connects the real UI and API while replacing only LLM and embedding adapters, covering login through draft save. The images below show the real UI in that fixture environment.
Live model evaluations run separately and were not rerun during this change. Fake-provider success is not evidence of model accuracy. A manual-versus-assisted study protocol and recording sheet are included; human completion time and improvement rates remain unmeasured.
Limits and next steps
This is a synthetic organization with developer verification, not proof of production adoption or employee productivity gains. Authentication is for demo accounts; public operation needs SSO, CSRF protection and account lifecycle management.
Semantic validation of relative dates beyond ‘next week’ and cross-year search remain limited. PostgreSQL concurrency and live model failure/latency distributions require separate repeated checks. No public demo has been deployed.


Tech Stack
Key Highlights
- Approval state transitions and optimistic concurrency
- Deterministic leave calculation and employee-scoped reads
- Policy RAG, Structured Output and restricted Function Calling
- Explicit confirmation, idempotent saves and separate submit confirmation