Changelog
All notable changes to the Akako Learning Management System will be documented in this file.
[1.0.3] - 2025-10-04
Added
- SMTP Email Notification System: Implemented comprehensive email notification functionality for admin actions:
- Professional HTML email templates with brand colors and responsive design
- Email notifications for enrollment approval/rejection with personalized content
- Email notifications for mentor application approval/rejection with detailed feedback
- SMTP configuration with nodemailer for reliable email delivery
- Email service utility with beautiful templates and fallback plain text versions
- Interactive SMTP setup and testing scripts for easy configuration
- Comprehensive cPanel SMTP configuration guide with troubleshooting tips
- Environment variable configuration for SMTP settings and application URLs
- Video Management System: Implemented comprehensive video management functionality for education topics:
- Separate video management modal for uploading, playing, removing, and changing videos per topic
- Video format validation with support for MP4, WebM, OGG, MOV, and AVI formats
- MKV format restriction with clear user guidance and conversion recommendations
- Dynamic MIME type detection in VideoPlayer component based on file extensions
- Video URL storage with topics in database via dedicated API endpoints
- Enhanced error handling for video playback issues including AbortError prevention
- Global error handler for unhandled video errors to prevent runtime crashes
Fixed
- Modal Backdrop Darkness Issue: Fixed admin modal backdrop not getting completely dark by implementing createPortal rendering:
- Updated mentor application modal to use createPortal for proper backdrop rendering
- Fixed enrollment approval/rejection modal backdrop darkness
- Updated user edit modal to use createPortal for consistent behavior
- Applied same solution as working EducationModal to all admin modals
- Ensured modals render outside layout stacking context for proper z-index handling
- Video Management Modal State Persistence: Fixed issue where video URLs from previous topics were incorrectly showing in topics without videos by implementing proper state reset when modal closes
- Video Upload Hook State Management: Resolved infinite loop error caused by incorrect dependency array in useEffect by removing unstable hook object from dependencies
- Video Format Compatibility: Fixed "no video with supported format and MIME type found" error by implementing comprehensive file type validation and restricting uploads to supported formats
- AbortError Handling: Fixed "Unhandled Runtime Error AbortError" by implementing proper error handling in VideoPlayer component to distinguish between navigation-related aborts and actual playback errors
- Video URL Database Storage: Fixed issue where video URLs were not properly saving to topics in database by implementing dedicated API endpoint for video management
[1.0.2] - 2025-10-04
Added
- Document Upload and Management System: Implemented comprehensive document management functionality for education topics:
- Admin document upload with support for PDF, Excel, Word, and other file types
- AWS S3 multipart upload for efficient handling of large documents
- Secure document streaming with role-based access control (admin/mentor or enrolled learners)
- Document management modal with upload, view, and delete capabilities
- Student-facing document access on topic pages with proper enrollment validation
- Database schema extension with JSON field for document metadata storage
- Comprehensive Timezone Support: Added extensive timezone options with GMT offsets for global user coverage, organized by GMT zones from GMT-12 to GMT+12
- Enhanced Onboarding Form Validation: Implemented robust step-by-step validation with visual error indicators, red asterisks for required fields, and comprehensive field validation across all form steps
- Custom Education Level Input: Added support for custom education level entry when "Other" is selected, with proper validation and data storage
- Debug Logging System: Added comprehensive console logging for form submission debugging, validation tracking, and user interaction monitoring
- Manual Form Submission Control: Implemented explicit Finish button control to prevent automatic form submission, giving users full control over when to complete their profile
- Clerk.js Authentication Integration: Complete migration from Keycloak to Clerk.js for user authentication while maintaining PostgreSQL-based role management
- Enhanced Role Management System: Implemented comprehensive role-based access control with effective date management, audit trails, and flexible role assignments
- JWT Token System: Custom JWT implementation for session management with role information embedded in tokens
- User Synchronization Service: Automatic user data synchronization from Clerk to PostgreSQL with role assignment
- Comprehensive Documentation: Added detailed documentation covering authentication migration, API endpoints, database schema, and development setup
- Middleware-Based Authorization: Server-side role validation middleware for protecting API endpoints
- Multi-Role Support: Users can now have multiple roles simultaneously with effective date management
- Role Assignment History: Complete audit trail for role assignments, removals, and changes with admin notes and reasons
Changed
- Onboarding Form Schema: Updated Zod validation schemas to properly handle required enum fields with custom error messages and optional field handling
- Form Field Requirements: Made address, city, country, timezone, learning goals, and preferred learning style required fields while keeping professional background and experience level optional
- Education Level Options: Updated education level dropdown to include Primary School, Secondary School, Undergraduate, Graduate, and Other options
- Form Submission Flow: Changed from automatic form submission to manual Finish button control for better user experience
- Authentication Provider: Migrated from Keycloak + NextAuth.js to Clerk.js for simplified authentication flow
- Role Storage: Moved role management from Keycloak to PostgreSQL for better control and flexibility
- User Data Flow: Streamlined user data synchronization process with automatic role assignment
- API Authorization: Updated all API endpoints to use new role-based access control system
- Client-Side Authentication: Replaced NextAuth hooks with Clerk.js hooks and custom useAuth hook
Fixed
- Topic Content Line Breaks: Fixed topic content display to properly render line breaks from database content by replacing
dangerouslySetInnerHTML with whitespace-pre-line CSS class, ensuring content displays exactly as stored with proper formatting - Form Validation Issues: Resolved TypeScript errors with enum field validation and empty string handling for optional fields
- Finish Button Functionality: Fixed Finish button not responding to clicks by implementing proper form submission control and validation
- Step Navigation Validation: Fixed users being able to proceed to next steps without filling required fields by implementing comprehensive step-by-step validation
- Custom Education Level Input: Fixed typing issues in custom education level field when "Other" is selected
- Form Submission Logic: Resolved form submission failures by fixing Zod schema validation and proper enum handling
- Optional Field Handling: Fixed validation errors for optional enum fields by properly handling undefined values instead of empty strings
Removed
- Keycloak Dependencies: Removed all Keycloak-related code, configuration, and dependencies
- NextAuth.js Integration: Removed NextAuth.js in favor of Clerk.js authentication
- Keycloak Role Management: Removed role management from Keycloak, now handled entirely in PostgreSQL
[1.0.1] - 2025-09-15
Added
- Education Content Uniqueness Constraints: Implemented comprehensive uniqueness validation for education hierarchy to prevent duplicate content creation. Education level names are globally unique, grade names are unique within each education level, subject names are unique within each grade, and topic names are unique within each subject.
- Enhanced Error Handling UI: Added user-friendly error display in education content modals with specific validation messages, form data preservation, dismissible error notifications, and auto-clearing errors when users start typing.
- Effective Date Management: Implemented comprehensive effective date management system for user statuses and roles:
- Time-bound role assignments with automatic activation/expiration
- User status tracking (active, inactive, suspended) with effective dates
- Status history with audit trail (who changed what and when)
- Automatic status updates based on enrollment and subscription status
- Visual indicators for upcoming status changes and expirations
Changed
- Mentor Assignment Scope: Restricted mentor assignment to subject level only, removing mentor assignment functionality from education levels and grades to better align with the system's educational hierarchy.
- User Management Interface: Enhanced admin user management with effective date controls, status history tracking, and improved filtering options.
Fixed
- Admin Dashboard Pending Items: Refined the admin dashboard pending items section to only show actionable items (mentor applications and enrollment requests) that require admin attention, removing informational statistics that don't need action.
- Admin Dashboard Navigation: Made pending items in the admin dashboard clickable with hover effects and navigation arrows, allowing admins to quickly navigate to relevant management pages for mentor applications and enrollment requests.
- Education Content Validation: Fixed TanStack Query mutation handling to use
mutateAsync for proper promise-based error propagation from API to UI components. - Production Database Migration: Successfully resolved duplicate education content in production database and applied uniqueness constraints without data loss.
- Email Issues: Successfully resolved Issues with sending verification and reset password emails.
[1.0.0] - 2025-08-22
Added
- Complete Learning Management System: Full-stack LMS platform built with Next.js 14, featuring modern architecture and responsive design
- Role-Based Access Control: Three-tier user system with Admin, Mentor, and Learner roles, each with specific permissions and dashboards
- Educational Content Management: Hierarchical structure for Education Levels → Grades → Subjects → Topics with full CRUD operations
- Modern UI/UX: Beautiful, responsive interface built with TailwindCSS, featuring mobile-first design and smooth animations
- Authentication & Security: Keycloak integration with NextAuth.js, OIDC support, and reCAPTCHA protection
- File Management & Media: AWS S3 integration for scalable cloud storage, video streaming, and image management
- Database Integration: Prisma ORM with PostgreSQL for type-safe database operations
- State Management: Jotai for lightweight client-side state management
- Form Handling: React Hook Form with Zod validation for type-safe form handling
- API Architecture: RESTful API design with proper error handling and middleware integration
- Performance Optimization: Next.js 14 App Router with server components and efficient data fetching
- Code Quality Tools: ESLint, Prettier, Husky, and conventional commits enforcement
Fixed
- Mentor Dashboard Data Integration: Fixed the mentor/dashboard page to display real-time data from the database instead of placeholder values. Implemented proper data fetching using TanStack Query and Prisma.
- Admin Dashboard Real Data: Fixed the admin/dashboard page to show actual user statistics, course counts, and system metrics. Replaced mock data with live database queries.
- Image Loading Issues: Resolved broken images problem by implementing proper error handling and fallback mechanisms for failed image loads.
- Fallback Image System: Added comprehensive fallback images for user avatars, course thumbnails, and other media assets to ensure consistent UI experience.
- AWS S3 Configuration: Fixed AWS S3 bucket configuration issues including proper CORS settings, bucket policies, and access permissions for file uploads and retrievals.
- Course Card Styling: Fixed course cards layout and styling issues, ensuring proper responsive design and consistent visual appearance across different screen sizes.
- Email Service: Fixed email sending functionality by resolving SMTP configuration issues and implementing proper error handling for failed email deliveries.
[Previous Versions]
This changelog was started with the current development cycle. Previous changes are not documented here.