- Implement repository pattern for data access layer
- Add comprehensive service layer for business logic
- Create scheduler management system with health monitoring
- Add bounded buffer utility for memory management
- Enhance security audit logging with retention policies
Major code quality overhaul addressing 58% of all linting issues:
• Type Safety Improvements:
- Replace all any types with proper TypeScript interfaces
- Fix Map component shadowing (renamed to CountryMap)
- Add comprehensive custom error classes system
- Enhance API route type safety
• Accessibility Enhancements:
- Add explicit button types to all interactive elements
- Implement useId() hooks for form element accessibility
- Add SVG title attributes for screen readers
- Fix static element interactions with keyboard handlers
• React Best Practices:
- Resolve exhaustive dependencies warnings with useCallback
- Extract nested component definitions to top level
- Fix array index keys with proper unique identifiers
- Improve component organization and prop typing
• Code Organization:
- Automatic import organization and type import optimization
- Fix unused function parameters and variables
- Enhanced error handling with structured error responses
- Improve component reusability and maintainability
Results: 248 → 104 total issues (58% reduction)
- Fixed all critical type safety and security issues
- Enhanced accessibility compliance significantly
- Improved code maintainability and performance
- Introduced a new function `fetchTranscriptContent` to handle fetching transcripts with optional authentication.
- Enhanced error handling and logging for transcript fetching.
- Updated the `parseTranscriptToMessages` function to improve message parsing logic.
- Replaced the old session processing logic with a new approach that utilizes `SessionImport` records.
- Removed obsolete scripts related to manual triggers and whitespace fixing.
- Updated the server initialization to remove direct server handling, transitioning to a more modular approach.
- Improved overall code structure and readability across various scripts.
- Updated session processing commands in documentation for clarity.
- Removed transcript content fetching from session processing, allowing on-demand retrieval.
- Improved session metrics calculations and added new metrics for dashboard.
- Refactored processing scheduler to handle sessions in parallel with concurrency limits.
- Added manual trigger API for processing unprocessed sessions with admin checks.
- Implemented scripts for fetching and parsing transcripts, checking transcript content, and testing processing status.
- Updated Prisma schema to enforce default values for processed sessions.
- Added error handling and logging improvements throughout the processing workflow.
- Added MessageViewer component to display parsed messages in a chat-like format.
- Introduced new Message table in the database to store individual messages with timestamps, roles, and content.
- Updated Session model to include a relation to parsed messages.
- Created transcript parsing logic to convert raw transcripts into structured messages.
- Enhanced processing scheduler to handle sessions with parsed messages.
- Updated API endpoints to return parsed messages alongside session details.
- Added manual trigger commands for session refresh, transcript parsing, and processing.
- Improved user experience with color-coded message roles and timestamps in the UI.
- Documented the new scheduler workflow and transcript parsing implementation.
- Added processingScheduler.js and processingScheduler.ts to handle session transcript processing using OpenAI API.
- Implemented a new scheduler (scheduler.js and schedulers.ts) for refreshing sessions every 15 minutes.
- Updated Prisma migrations to add new fields for processed sessions, including questions, sentimentCategory, and summary.
- Created scripts (process_sessions.mjs and process_sessions.ts) for manual processing of unprocessed sessions.
- Enhanced server.js and server.mjs to initialize schedulers on server start.
- Update access denied messages to use HTML entities.
- Add autoComplete attributes to forms for better user experience.
- Improve trend calculations in sessionMetrics function.
- Update MetricCard props to accept React nodes for icons.
- Integrate Next.js Image component in Sidebar for optimization.
- Adjust ESLint rules for better code quality.
- Add new properties for trends in MetricsResult interface.
- Bump version to 0.2.0 in package.json.
Refactors dashboard to use actual metrics for country data,
removing dummy data for improved accuracy. Integrates the
country-code-lookup package for geographic mapping, adding
comprehensive country coordinates. Increases performance and
data validation across API endpoints and adjusts WordCloud
component size for better visualization.
Enhances session handling with improved validation logic,
and updates configuration for allowed origins.
Adds Markdown rendering to the transcript viewer for enhanced formatting.
This change integrates `react-markdown` to parse and render transcript content, allowing for richer text formatting, including links and other Markdown elements. It also adds a toggle to switch between raw and formatted text, and displays a message when transcript content is unavailable. The UI of the transcript viewer has been improved to be more user-friendly with titles and descriptions.
Adds a transcript viewer component to display transcript content within the session details page.
This change introduces a new `TranscriptViewer` component that renders the transcript content if available. It also adds logic to fetch and store transcript content from the provided URL during session data refresh. The existing link-based transcript view is now used as a fallback when only the transcript URL is available. It also fixes an issue where session ID was not properly displayed.
Uses `Intl.DisplayNames` to display localized language names in the language pie chart, enhancing user experience and readability.
Also converts country and language values from the CSV data to ISO codes for standardization and improved data handling.
Adds tooltip to display ISO language code.
Enhances the dashboard with new key performance indicators (KPIs) and visualizations.
Introduces a new stat card component for displaying metrics with trends and icons.
Adds sentiment analysis, language distribution, and token usage charts to provide a more comprehensive overview of session data.
These additions provide deeper insights into user interactions and platform performance.
Refactors the dashboard to improve data fetching, error handling, and overall user experience.
- Prevents errors on refresh by validating company ID.
- Improves date handling from CSV by using a `safeParseDate` function to avoid "Invalid Date" errors.
- Adds a timestamp for when metrics were last updated.
- Fixes a bug where the refresh was failing silently.
- Improves settings page by wrapping form elements with form tags.
- Adds autocomplete attributes on settings page.
- Adds database files to `.gitignore`.
refactor: improve refresh-sessions API handler for better readability and error handling
fix: enhance NextAuth configuration with session token handling and cookie settings
chore: update dashboard API handlers for consistency and improved error responses
style: format dashboard API routes for better readability
feat: implement forgot password and reset password functionality with security improvements
feat: add user registration API with email existence check and initial company creation
chore: create initial database migration and seed script for demo data
style: clean up PostCSS and Tailwind CSS configuration files
fix: update TypeScript configuration for stricter type checking
chore: add development environment variables for NextAuth
feat: create Providers component for session management in the app
chore: initialize Prisma migration and seed files for database setup
- Added @tailwindcss/postcss to devDependencies for better PostCSS integration.
- Enhanced session import logic in refresh-sessions.ts to ensure proper data mapping and type safety.
- Updated postcss.config.js to use the correct plugin name for Tailwind CSS.
- Modified tsconfig.json to temporarily disable strict mode and allow implicit any types for smoother development.
- Add package.json with dependencies and scripts for Next.js and Prisma
- Implement API routes for session management, user authentication, and company configuration
- Create database schema for Company, User, and Session models in Prisma
- Set up authentication with NextAuth and JWT
- Add password reset functionality and user registration endpoint
- Configure Tailwind CSS and PostCSS for styling
- Implement metrics and dashboard settings API endpoints