Back to App

Changelog

Stay updated with the latest changes and improvements

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[5.7.0] - 2025-09-07

Added

  • Settings Management Consolidation
    • New centralized /settings page with card-based navigation
    • Dedicated Two-factor Authentication (2FA) management page at /settings/2fa
    • Interactive 2FA setup wizard with QR code generation and verification
    • Recovery codes management for 2FA backup access
    • API Keys management page for developer access tokens
    • Integrations page for third-party service connections
    • All administrative tools now consolidated under Settings section

Changed

  • Navigation Restructuring

    • Moved /dashboard/security to /settings/security for better organization
    • Renamed "Security" to "Two-factor Authentication" for clarity
    • Removed "Security" from admin sidebar navigation to reduce clutter
    • Settings page now accessible via bottom-left navigation link
    • All settings-related pages now use /settings/* URL hierarchy
  • UI/UX Improvements

    • Implemented collapsible sidebar with localStorage persistence
    • Added hover-to-expand functionality for collapsed sidebar
    • Removed duplicate navigation items (My Profile, Logout, Settings)
    • Removed dark border from search box for cleaner appearance
    • Standardized section headings and spacing across all dashboard pages
    • Applied consistent left-alignment and removed grey backgrounds
    • Fixed sidebar flash issue on page refresh with opacity transition
    • Added DashboardLayout wrapper to Settings and Profile pages
  • Component Standardization

    • Created reusable PageHeader component for consistent page titles
    • Created TabNavigation component for uniform tab interfaces
    • Standardized padding: px-4 sm:px-6 lg:px-8 py-8 across all pages
    • Applied Tailwind UI design patterns for professional appearance
    • Consistent action button placement and styling

Fixed

  • Authentication & Access Control
    • Fixed /dashboard/users page not loading in development
    • Resolved hydration errors with SSR/client state mismatch
    • Fixed authentication mismatch between client and server
    • Corrected import paths after page reorganization
    • Fixed monitoring and chaos pages import errors after move to settings

Security

  • Role-Based Access Control
    • Security Scanning page restricted to admin users only
    • Monitoring page accessible to admin and dso_admin roles
    • Chaos Engineering page limited to admin access
    • Audit Logs page with admin-only visibility
    • Proper redirects for unauthorized access attempts

Developer Experience

  • Simplified navigation structure reduces cognitive load
  • Centralized settings improve discoverability of features
  • Consistent UI patterns speed up development
  • Clear separation of user vs admin features

Files Added/Modified

  • apps/web/src/app/settings/ - New settings directory structure
  • apps/web/src/app/settings/2fa/page.tsx - Two-factor authentication management
  • apps/web/src/app/settings/api-keys/page.tsx - API keys management interface
  • apps/web/src/app/settings/integrations/page.tsx - Third-party integrations
  • apps/web/src/app/settings/layout.tsx - Settings section layout wrapper
  • apps/web/src/components/ui/page-header.tsx - Reusable page header component
  • apps/web/src/components/ui/tab-navigation.tsx - Standardized tab navigation
  • apps/web/src/components/layout/DashboardLayout.tsx - Updated sidebar navigation

Testing

  • E2E tests verified with Playwright MCP
  • Tested role-based access for admin-only pages
  • Verified sidebar persistence across refreshes
  • Confirmed no hydration errors in production
  • Validated responsive design on mobile devices

Deployment

  • Successfully deployed to staging environment
  • Production deployment completed via GitHub Actions
  • Vercel automatic deployments configured
  • No breaking changes for existing users

[5.6.0] - 2025-09-03

Added

  • User Management Performance Optimization (Story 5.6)
    • Virtual scrolling for handling 10,000+ users with smooth 60fps performance
    • Code splitting and lazy loading for reduced bundle size
    • Service Workers with offline support and enhanced caching strategies
    • WebSocket connection pooling with auto-reconnection and heartbeat monitoring
    • Performance monitoring system with Web Vitals tracking and alerting
    • CDN configuration with image optimization, WebP/AVIF support
    • Comprehensive validation script with 100% implementation success rate

Performance

  • Page loads <2s with 10,000 users
  • Search returns results <500ms
  • Virtual scrolling maintains 60fps with large datasets
  • Cache hit rate >36% on first load, >90% with warm cache
  • Service Workers enable offline functionality
  • WebSocket connections stable with automatic recovery

Files Added

  • apps/web/src/components/user-management/VirtualizedUserTable.tsx
  • apps/web/src/components/user-management/LazyComponents.tsx
  • apps/web/src/lib/performance-monitoring.ts
  • apps/web/src/lib/websocket-pool.ts
  • apps/web/src/lib/cdn-config.ts
  • apps/web/src/app/api/v1/monitoring/alerts/route.ts
  • supabase/migrations/20250903_performance_monitoring.sql
  • scripts/validate-performance-optimizations.js

[5.5.0] - 2025-09-03

Added

  • User Management Analytics & Reporting (Story 5.5)
    • Comprehensive analytics dashboard with real-time metrics
    • User growth analytics with trend visualization
    • Engagement metrics including login patterns and activity heat maps
    • Geographic distribution analysis with interactive maps
    • Security analytics tracking failed logins and MFA adoption
    • Automated report generation with PDF, Excel, and CSV export
    • Real-time activity feed with WebSocket support
    • Report scheduling system with Bull queue and email delivery
    • Custom report builder with metric selection and filtering

Changed

  • Enhanced user analytics service layer with TypeScript interfaces
  • Integrated Redis/memory caching for analytics performance
  • Added SendGrid email service with report templates
  • Implemented Bull queue for background report processing
  • Added Vercel Cron configuration for automated scheduling

Security

  • Fixed SQL injection vulnerability in metrics endpoint
  • Replaced blocking Redis KEYS with non-blocking SCAN
  • Added comprehensive input validation for all parameters
  • Implemented request deduplication to prevent abuse

Files Added

  • 10+ analytics API endpoints in apps/web/src/app/api/v1/user-analytics/
  • 10+ React components in apps/web/src/components/user-analytics/
  • Report generation utilities for PDF, Excel, and CSV formats
  • Caching service with Redis/memory fallback
  • Bull queue integration for scheduled reports
  • Database migrations for scheduling and performance optimization

Testing

  • 32 comprehensive tests across 6 test files
  • Complete validation with automated verification scripts
  • Production deployment verified with Playwright E2E tests

[5.4.0] - 2025-09-02

Added

  • User Management Import/Export Capabilities (Story 5.4)
    • CSV export with custom field selection and format options
    • Six-step import wizard with drag-and-drop file upload
    • Comprehensive field mapping with auto-detection
    • Row-level validation with detailed error reporting
    • Background processing for large files (>1000 records)
    • Email notifications with download links for completed operations
    • Import history tracking with re-download capability
    • Rollback mechanism for failed imports
    • Template management with downloadable CSV templates

Changed

  • Enhanced user management with bulk data operations
  • Added background job processing for scalability
  • Integrated email notification system for large operations
  • Improved error handling with actionable user feedback

Performance

  • Export generates 10,000 records in <30 seconds
  • Import processes 5,000 records in <5 minutes
  • Background processing prevents UI blocking
  • Real-time progress updates via WebSocket

Files Added

  • Import wizard components with step-by-step flow
  • Export service with streaming CSV generation
  • File upload validation and processing
  • Background job queue for large operations
  • Email notification templates and delivery

[5.3.0] - 2025-09-02

Added

  • User Management Advanced Filtering & Bulk Operations (Story 5.3)
    • Advanced filtering system with multiple criteria (role, status, date ranges, location)
    • Smart filter presets for common scenarios (inactive specialists, pending invitations)
    • Enhanced search with history, suggestions, and autocomplete
    • Bulk selection across all users with persistent selection
    • Bulk operations toolbar with 6 actions (export, reset passwords, suspend/activate, assign DSO_ID, send email)
    • 5-minute undo capability for bulk actions with Redis backing
    • Activity dashboard with real-time statistics and click-to-filter
    • WebSocket integration for real-time updates

Changed

  • Filter state management with Zustand store
  • Query optimization with stored procedures and indexes
  • Enhanced user table with bulk selection capabilities
  • Real-time dashboard updates without page refresh

Performance

  • Filter application <200ms with loading indicators
  • Bulk operations handle 5,000+ users efficiently
  • Dashboard updates in real-time using WebSocket
  • Cache hit rate >80% for filtered results

Files Added

  • Advanced filter components with collapsible sidebar
  • Bulk operations toolbar with confirmation flows
  • Activity dashboard with interactive statistics cards
  • WebSocket configuration for real-time updates
  • State management for complex filter combinations

[5.2.0] - 2025-09-01

Added

  • User Management Basic UI (Story 5.2)
    • User Management tab integrated into profile page (DSO Admin only)
    • Paginated user table with server-side pagination (25-50 per page)
    • Real-time search with 300ms debounce across name and email fields
    • Individual user actions: view details, edit, reset password, suspend/activate
    • User details modal with editable fields and form validation
    • Password reset flow with temporary password generation
    • Comprehensive error handling with user-friendly messages
    • Responsive design for desktop and tablet

Changed

  • Enhanced profile page structure to include User Management section
  • Updated authentication middleware for role-based access control
  • Improved loading states with skeleton screens
  • Added toast notifications for user feedback

UI/UX

  • Implemented consistent design patterns with hover states
  • Added keyboard navigation support
  • ARIA labels for accessibility compliance
  • Mobile-responsive table with swipe actions

Files Added

  • apps/web/src/app/profile/user-management/page.tsx
  • apps/web/src/app/profile/user-management/components/UserManagementClient.tsx
  • apps/web/src/app/profile/user-management/components/UserTable.tsx
  • apps/web/src/app/profile/user-management/components/UserSearch.tsx
  • apps/web/src/app/profile/user-management/components/UserDetailsModal.tsx
  • apps/web/src/app/profile/user-management/components/PasswordResetModal.tsx
  • apps/web/src/app/api/v1/users/management/[userId]/route.ts
  • e2e/user-management.spec.ts

[5.1.0] - 2025-09-01

Added

  • User Management Core Infrastructure (Story 5.1)
    • Database schema updates with dso_id column and composite indexes
    • Row-Level Security (RLS) policies for multi-tenant isolation
    • Base API endpoints at /api/v1/users/management/ with authentication
    • Comprehensive audit logging service with real-time event streaming
    • Authentication middleware with session timeout warnings
    • Rate limiting service with user-friendly feedback (100 req/min)
    • WebSocket/Server-Sent Events support for real-time updates
    • Progress tracking service for bulk operations
    • PHI encryption service for user data protection (AES-256-GCM)
    • Saga transaction manager for distributed operations
    • Enhanced health check endpoints with service monitoring
    • Correlation ID tracking for request tracing

Database

  • Added dso_id VARCHAR(50) column to users table
  • Created indexes on (org_id, role, status), (org_id, dso_id)
  • New tables: user_management_logs, saved_searches
  • RLS policies ensuring tenant data isolation
  • Migration files: 20250831211746_user_management_infrastructure.sql

Security

  • Multi-tenant isolation enforced at database level
  • PHI encryption for sensitive user data
  • Audit trail for all user management operations
  • Session management with 30-minute timeout warnings
  • MFA verification for sensitive operations

API Infrastructure

  • RESTful endpoints with consistent error handling
  • Zod schema validation for all requests
  • Rate limiting with Redis backing
  • WebSocket support for real-time notifications
  • Pagination and filtering capabilities

Files Added

  • supabase/migrations/20250831211746_user_management_infrastructure.sql
  • supabase/migrations/20250831211747_user_management_rls_policies.sql
  • apps/web/src/app/api/v1/users/management/route.ts
  • apps/web/src/services/audit-service.ts
  • apps/web/src/services/progress-tracker.ts
  • apps/web/src/services/phi-encryption.ts
  • apps/web/src/services/saga-transaction.ts
  • apps/web/src/middleware/auth-middleware.ts
  • apps/web/src/lib/correlation.ts
  • e2e/user-management-infrastructure.spec.ts

[4.5.0] - 2025-09-01

Added

  • Parent Company Name Feature (Story 4.5)
    • New "Company Information" section on the My Profile page
    • Ability to add/edit parent company name for organizational affiliation
    • Dual storage strategy for maximum compatibility:
      • Organization-level storage for users with organizations
      • User metadata storage for users without organizations
    • Inline editing with save/cancel functionality
    • Real-time validation and success notifications
    • Full audit trail for company name changes
    • Persistence across sessions and page refreshes

Changed

  • Enhanced profile page with dedicated Company Information section
  • Updated /api/v1/profile endpoint to handle parent_company_name
  • Modified profile data loading to check both organization and user metadata
  • Improved profile update flow to fetch complete data after save

Fixed

  • Parent company name not persisting after save
  • Company name disappearing on page refresh
  • Profile state not updating correctly after API save

Database

  • Added parent_company_name column to organizations table
  • Created index idx_organizations_parent_company_name for performance
  • Migration: 20250831104315_add_parent_company_name.sql

Documentation

  • Updated User Management & Authentication Architecture guide
  • Enhanced Profile Feature Documentation with Story 4.5 details
  • Updated Security Review to include parent company name implementation
  • Added troubleshooting guide for parent company name persistence issues

Testing

  • E2E tests for parent company name CRUD operations
  • Verified persistence across saves and refreshes
  • Tested dual storage strategy for different user types
  • Production deployment verified with Playwright MCP

[4.4.0] - 2025-08-31

Added

  • My Profile Page - Complete Implementation (Story 4.4)
    • Comprehensive profile management interface at /profile
    • Inline editing for phone numbers and email addresses
    • Email change verification workflow with dual confirmation
    • Notification preferences management with auto-save
    • Security tab with password management and MFA setup
    • Account lockout protection (5 attempts, exponential backoff)
    • Re-authentication for sensitive operations (5-minute timeout)
    • Session management with device fingerprinting
    • Comprehensive audit logging for all profile changes
    • Password history tracking (prevents reuse of last 12)
    • MFA enrollment with TOTP and backup codes
    • Recovery options including backup codes and admin override
    • Rate limiting on all profile operations (20-30 req/hour)
    • Full HIPAA compliance with PHI protection
    • Responsive design with mobile optimization
    • WCAG 2.1 AA accessibility compliance
    • Performance optimized (<2s load on 3G)

Changed

  • Updated Supabase authentication to use createServerClient for proper SSR
  • Modified RLS policies to use JWT claims preventing infinite recursion
  • Enhanced user metadata storage strategy for phone numbers
  • Improved error handling with categorized responses
  • Optimized profile data caching with Redis (5-minute TTL)

Fixed

  • "Unable to load profile data" error in server components
  • "infinite recursion detected in policy" RLS error
  • Phone number persistence after page refresh
  • Notification preferences not saving properly
  • User authentication errors when updating profile
  • Rate limiting configuration for profile endpoints

Security

  • Implemented password history with bcrypt hashing
  • Added account lockout mechanism with exponential backoff
  • Enforced re-authentication for sensitive operations
  • Created MFA backup codes with single-use verification
  • Added comprehensive audit trail with 7-year retention
  • Integrated security alerts for suspicious activity
  • Implemented token blacklist for session revocation

Database

  • Added password_history table for password tracking
  • Added account_lockout table for failed attempt tracking
  • Added reauth_sessions table for sensitive operations
  • Added mfa_backup_codes table for recovery
  • Added user_sessions table for session management
  • Added profile_audit_log table for audit trails
  • Created JWT Claims Hook for org_id embedding
  • Fixed RLS policies to prevent infinite recursion

Documentation

  • Created comprehensive user management architecture guide
  • Added profile feature consolidated documentation
  • Updated security review with implementation details
  • Added troubleshooting guide for common issues
  • Created test accounts documentation

Performance

  • Page load time: 1.8s on 3G (target <2s)
  • Bundle size: 92KB (target <100KB)
  • API response p50: 180ms, p99: 450ms
  • Cache hit rate: >70% after warm-up
  • Lighthouse score: 100/100 accessibility

Testing

  • 494 lines of E2E test coverage
  • 100% coverage of critical user workflows
  • Security scenarios fully tested
  • Performance benchmarks validated
  • Accessibility compliance verified

[3.2.0] - 2025-08-24

Added

  • Specialist Analytics P3 Hardening Complete
    • Zod validation schemas for all specialist API endpoints
    • Comprehensive test coverage (validation, Redis, accessibility, performance)
    • Consistent error formatting with VALIDATION_ERROR codes
    • Integration tests validating 400 responses for invalid inputs
    • Redis caching tests with fallback behavior
    • Accessibility tests for analytics UI components (ARIA labels, keyboard nav, focus management)
    • Performance smoke tests ensuring P95 < 1000ms for all endpoints
    • Enhanced monitoring with request tracking and cache hit metrics

Changed

  • All specialist routes now use monitoringExt for structured logging
  • Updated routes to validate parameters before processing
  • Improved error responses with detailed validation messages
  • Geographic endpoint now validates k_threshold parameter (5-100 range)

Security

  • Input validation prevents SQL injection and invalid data processing
  • K-anonymity threshold enforcement at both API and database levels
  • Rate limiting properly enforced with Redis-backed counters

Performance

  • Cache hit rate consistently > 70% after warm-up
  • P95 latency < 1000ms across all endpoints
  • P99 latency < 2000ms for complex comparative queries
  • Validation errors return in < 100ms

3.1.1 - 2025-08-23

Fixed

  • Analytics dashboard authentication for admin and DSO admin users
  • Null org_id handling in analytics backend service for admin users viewing aggregated data
  • Database query failures with "invalid input syntax for type uuid: null"

Added

  • Rate limiting on all analytics API endpoints (60 requests per minute)
  • Comprehensive monitoring service with SLO tracking
  • E2E authentication tests in CI pipeline
  • Negative access tests for non-admin users
  • Canary deployment runbook and checklist

Changed

  • Analytics backend service now accepts orgId: string | null
  • Conditional org_id filtering based on user role
  • Improved error handling and performance monitoring

Security

  • Removed debug endpoint /api/v1/auth/debug-user
  • Verified no service role keys exposed in client bundles
  • Implemented rate limiting to prevent API abuse
  • Enhanced cookie security validation

Performance

  • Validated P95 latency: 1723ms (within 2s SLO)
  • Confirmed database indexes on base tables
  • Implemented 5-minute cache TTL for dashboard queries

Documentation

  • Added comprehensive deployment checklist
  • Created canary rollout criteria
  • Documented 7 follow-up improvement tickets
  • Added postmortem timeline to story documentation

Commits

  • 762d203 - fix: complete analytics dashboard authentication fix with comprehensive testing
  • 2a9433d - docs: add production verification results to story 3.1
  • b7478a8 - feat: comprehensive security and operational improvements for analytics dashboard
  • 8f155de - final: complete production hardening for analytics dashboard
  • 19eeeeb - docs: add deployment checklist and follow-up tickets for production rollout

3.1.0 - 2025-08-21

Added

  • Initial analytics dashboard implementation
  • DSO Administrator role support
  • Real-time metrics and visualizations

CRCL Healthcare Platform ยท Version 4.4.0