# Changelog

All notable changes to **PEOPLEFLOW** are documented in this file by implementation phase.

## [Phase 0] — Project Discovery & Architecture (2026-12-01)
### Added
- Completed requirements analysis for SMC Cement Group (ECC, NCC, SCII).
- Produced core architecture documentation:
  - `README.md` — Project overview, tech stack, planned folder structure, and roadmap.
  - `ARCHITECTURE.md` — Layered modular monolith, multi-company isolation, API contracts, background jobs, and UI design system.
  - `DATABASE.md` — Normalized PostgreSQL/Prisma ERD and group-wide employee identity vs. company-scoped employment assignment model.
  - `RBAC.md` — 9-role granular permission matrix, company scoping, and Philippine Data Privacy Act (RA 10173) PII controls.
  - `WORKFLOWS.md` — Onboarding, Offboarding (standard & emergency), Employee Movement, and Workflow Engine specifications.
  - `INTEGRATIONS.md` — Decoupled adapter architecture for Microsoft Graph, Freshservice, and Ramco ERP.
  - `DEPLOYMENT.md` — Initial phased rollout baseline (ECC pilot → NCC & SCII).
- Identified local environment constraint (PowerShell blocked by Windows Group Policy) and key open business policy questions for stakeholder alignment prior to Phase 1.

## [Phase 1] — Foundation & Enterprise UI/UX Shell (2026-12-01)
### Added
- **Project Setup**: Next.js 15 App Router, strict TypeScript, Tailwind CSS 3.4, shadcn/ui config, security headers (`X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy`), ESLint, and Vitest.
- **Database & Seed**: Full PostgreSQL `prisma/schema.prisma`, initial SQL migration (`prisma/migrations/20261201000000_init/migration.sql`), and idempotent `prisma/seed.ts` covering ECC, NCC, SCII, 9 RBAC roles, granular permissions, departments, positions, 7 default published workflow templates, sample employees, lifecycle requests, tasks, approvals, assets, mock integrations, notifications, and audit logs.
- **Core Server Infrastructure**: Prisma singleton & health check (`/api/v1/health`), PII-redacting structured JSON logger, centralized API error serializer, live dashboard analytics service (`/api/v1/dashboard`) with transparent PostgreSQL Live vs. Dev Preview fallback, and live search endpoint (`/api/v1/search`).
- **Reusable UI Components**: shadcn/ui primitives (`Button`, `Card`, `Badge`, `Input`, `Label`, `Skeleton`, `Dialog`, `DropdownMenu`) and shared enterprise components (`StatusBadge`, `CompanyPill`, `KpiCard`, `PageHeader`, `DataTable`, `EmptyState`, `ErrorState`, `ConfirmDialog`, `ModuleFoundationView`).
- **Enterprise Application Shell**: Collapsible persistent left sidebar (all 13 modules + mobile drawer), sticky topbar with SMC Company Selector (`All SMC` / `ECC` / `NCC` / `SCII`), `Ctrl+K` Global Search modal, interactive Notifications dropdown, Help modal, and User Profile menu.
- **Pages & States**: Enterprise Login page (Entra ID SSO placeholder + Zod-validated Dev Access form), Management Dashboard (8 KPI cards, 8 lifecycle sections, interactive filter bar), Workflow Builder stage blueprint preview (`/workflows`), all 12 navigable module routes, plus global `loading.tsx`, `error.tsx`, and `not-found.tsx`.
- **Unit Tests**: Added `tests/unit/utils.test.ts` and `tests/unit/errors.test.ts`.
