Shift-Kanri (シフト管理)
Enterprise Shift & Workforce Management System — Japan
Lead / Sole Backend Developer
Project Overview
Production REST API backend for enterprise shift scheduling, tablet-based attendance punch-in, leave tracking, and Japanese labor compliance for part-time and shift-based workforces. Designed and built from scratch with Express 5, TypeScript, PostgreSQL (Prisma), and Redis—incorporating complex conflict-resolution scheduling, a triple-tier master/transaction/audit data architecture, and LINE push notifications.
Core System Architecture & Components
Shift Scheduling & Conflict Resolution Engine
Automated recurring availability, one-off shift requests & overlap prevention
Core scheduling service managing worker availability submissions, recurring weekday slots, and automated conflict-resolution.
- •Worker shift submissions and recurring weekly availability slots (Sunday=1 to Saturday=7).
- •Conflict-detection algorithm preventing duplicate or overlapping shifts while respecting soft-deleted records.
- •Team leader shift adjustments and administrator bulk approval and rejection workflows.
- •Timezone-safe UTC date persistence with application-layer JST (UTC+9) conversion to eliminate daylight/drift discrepancies.
On-Site Tablet Kiosk Subsystem (/tablet)
Factory & workplace physical entrance punch-in with safety checklist compliance
Dedicated kiosk subsystem engineered for on-site physical tablet entrance stations across factories and business locations.
- •Leader-authorized punch-in and punch-out with digital safety and hygiene checklist verification.
- •Real-time visual color-coded attendance indicators (not_yet [Grey], in [Green], out [Red]).
- •Precise tracking of actual work hours, overtime thresholds, and break durations.
Labor Compliance & Triple-Tier Audit Architecture
Immutable append-only audit tracking and Japanese statutory labor regulation checks
Strict multi-tier data architecture ensuring enterprise audit integrity and automatic compliance with legal hour limits.
- •Triple-tier database design: Master tables (m_*), Transaction tables (t_*), and Immutable append-only audit history tables (h_*).
- •Fiscal-year working hours accumulator and threshold alert triggers to prevent part-time workers from exceeding legal overtime and income caps.
- •Automated leave balance deductions (Paid Leave / Vacation) distinguishing full-day (≥5 hrs) vs half-day (<5 hrs) with required rejection reason tracking.
- •Admin dashboard analytics covering departmental skills matrix coverage, pay master rates, and attendance anomalies.
Backend & Engineering Highlights
- —Architected and developed the entire backend from scratch using Express 5, Node.js 22, TypeScript, and PostgreSQL with Prisma, adhering to strict layered architecture (Routes → Controllers → Services → Repositories).
- —Engineered a conflict-detection and overlap-resolution algorithm in TypeScript preventing duplicate or intersecting shift bookings across recurring weekday and one-off submissions.
- —Built a real-time on-site tablet kiosk punch-in/out subsystem with leader authorization, safety/hygiene checklist enforcement, and color-coded status tracking.
- —Designed a triple-tier database architecture featuring master (`m_*`), operational (`t_*`), and immutable append-only history tables (`h_*`) for Japanese labor law audit compliance.
- —Implemented automated leave balance management and fiscal-year working-hour tracking to prevent workers from exceeding statutory part-time overtime and income caps.
- —Integrated Redis for high-speed session management and LINE Messaging API for real-time shift status broadcasts and push notifications.
- —Integrated OpenTelemetry distributed tracing and structured Pino logging with request-scoped correlation IDs for production observability and auditability.