Commit Graph

126 Commits

Author SHA1 Message Date
c5a95edc91 feat: comprehensive UI improvements and new logo design
- Replace old logo with modern dashboard tiles design
- Improve text selection styling using Tailwind selection variant
- Fix session ID display with proper truncation classes
- Clean up temporary logo files and showcase page
- Enhance dark mode support across company settings and sessions pages
- Remove obsolete Alert Configuration from company settings
- Add collapsible filters and mobile-optimized view details buttons
2025-06-28 05:39:13 +02:00
017634f7a8 feat: make filters & sorting section collapsible
- Add collapsible filters section to save space on sessions page
- Show/hide toggle button with chevron icons for better UX
- Filters start collapsed by default for cleaner initial view
- Improves mobile experience by reducing vertical space usage
2025-06-28 04:40:30 +02:00
2a033fe639 fix: improve dark mode compatibility and chart visibility
- Fix TopQuestionsChart with proper dark mode colors using CSS variables and shadcn/ui components
- Enhance ResponseTimeDistribution with thicker bars (maxBarSize: 60)
- Replace GeographicMap with dark/light mode compatible CartoDB tiles
- Add custom text selection background color with primary theme color
- Update all loading states to use proper CSS variables instead of hardcoded colors
- Fix dashboard layout background to use bg-background instead of bg-gray-100
2025-06-28 04:19:39 +02:00
e027dc9565 refactor: enhance Prisma schema with PostgreSQL optimizations and data integrity
- Add PostgreSQL-specific data types (@db.VarChar, @db.Text, @db.Timestamptz, @db.JsonB, @db.Inet)
- Implement comprehensive database constraints via custom migration
- Add detailed field-level documentation and enum descriptions
- Optimize indexes for common query patterns and company-scoped data
- Ensure data integrity with check constraints for positive values and logical time validation
- Add partial indexes for performance optimization on failed/pending processing sessions
2025-06-28 03:22:53 +02:00
3b135a64b5 change playwright ci to use pnpm 2025-06-28 02:45:06 +02:00
7f48a085bf feat: comprehensive security and architecture improvements
- Add Zod validation schemas with strong password requirements (12+ chars, complexity)
- Implement rate limiting for authentication endpoints (registration, password reset)
- Remove duplicate MetricCard component, consolidate to ui/metric-card.tsx
- Update README.md to use pnpm commands consistently
- Enhance authentication security with 12-round bcrypt hashing
- Add comprehensive input validation for all API endpoints
- Fix security vulnerabilities in user registration and password reset flows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 01:52:53 +02:00
192f9497b4 updated deps, added claude.md file 2025-06-28 01:35:40 +02:00
5b22c0f1f8 fix: update gradient classes to use linear gradients for consistency 2025-06-28 00:26:22 +02:00
1be9ce9dd9 Remove Tailwind CSS configuration file 2025-06-28 00:23:23 +02:00
a6632d6dfc fix: escape quotes in initial message display for proper rendering 2025-06-27 23:38:05 +02:00
043aa03534 style: remove unnecessary whitespace in multiple files for cleaner code 2025-06-27 23:32:09 +02:00
7e59567f73 feat: update session processing logic to align with new schema and enhance error handling 2025-06-27 23:28:59 +02:00
9238c9a6af feat: update session metrics and processing to use enums for sentiment and streamline status tracking 2025-06-27 23:23:09 +02:00
8ffd5a7a2c feat: refactor session processing pipeline to implement multi-stage tracking and enhance error handling 2025-06-27 23:12:04 +02:00
2dfc49f840 DB refactor 2025-06-27 23:05:46 +02:00
185bb6da58 Migrate database from SQLite to PostgreSQL
- Replace SQLite with PostgreSQL using Neon as provider
- Add environment-based database URL configuration
- Create separate test database setup with DATABASE_URL_TEST
- Reset migration history and generate fresh PostgreSQL schema
- Add comprehensive migration documentation
- Include database unit tests for connection validation
2025-06-27 21:25:48 +02:00
6f9ac219c2 feat: Refactor data processing pipeline with AI cost tracking and enhanced session management
- Updated environment configuration to include Postgres database settings.
- Enhanced import processing to minimize field copying and rely on AI for analysis.
- Implemented detailed AI processing request tracking, including token usage and costs.
- Added new models for Question and SessionQuestion to manage user inquiries separately.
- Improved session processing scheduler with AI cost reporting functionality.
- Created a test script to validate the refactored pipeline and display processing statistics.
- Updated Prisma schema and migration files to reflect new database structure and relationships.
2025-06-27 21:15:44 +02:00
601e2e4026 feat: enhance environment variable parsing to handle quotes, comments, and whitespace; add transcript parsing utility for structured message extraction 2025-06-27 20:02:16 +02:00
9a3741cd01 feat: enhance date parsing in import processor to handle European format and improve error handling 2025-06-27 19:41:54 +02:00
f3f63943a8 feat: update .env.local.example to use quotes for environment variables
chore: add @vitest/coverage-v8 dependency to package.json

chore: update pnpm-lock.yaml with new dependencies and versions

test: enhance env.test.ts to validate environment variable handling and defaults
2025-06-27 19:27:09 +02:00
49a75f5ede Migrate tests from Jest to Vitest, updating setup and test files accordingly.
- Replace Jest imports and mocks with Vitest equivalents in setup and unit tests.
- Adjust test cases to use async imports and reset modules with Vitest.
- Add Vitest configuration file for test environment setup and coverage reporting.
2025-06-27 19:14:05 +02:00
5c1ced5900 feat: add rawTranscriptContent field to SessionImport model
feat: enhance server initialization with environment validation and import processing scheduler

test: add Jest setup for unit tests and mock console methods

test: implement unit tests for environment management and validation

test: create unit tests for transcript fetcher functionality
2025-06-27 19:00:22 +02:00
50b230aa9b feat: Implement configurable scheduler settings and enhance CSV import functionality 2025-06-27 16:55:25 +02:00
1dd618b666 Refactor transcript fetching and processing scripts
- 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.
2025-06-27 16:38:16 +02:00
d7ac0ba208 feat: Refactor database schema to enhance relationships and data types for Company, User, Session, and Message models 2025-06-27 16:10:33 +02:00
ab2c75b736 feat: Add additional country coordinates for improved geographic mapping 2025-06-26 19:32:53 +02:00
8c43a35632 feat: Enhance session processing and metrics
- 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.
2025-06-26 17:12:42 +02:00
8f3c1e0f7c feat: Enhance dashboard metrics with new calculations and add Top Questions Chart component 2025-06-26 12:04:51 +02:00
0e5ac69d45 feat: Add DateRangePicker component and integrate date range filtering in metrics fetching 2025-06-26 11:42:01 +02:00
f964d6a078 feat: Update session endTime based on the latest message timestamp during message storage 2025-06-26 11:12:06 +02:00
944431fea3 feat: Load environment variables from .env.local and update session processing logic 2025-06-26 10:57:05 +02:00
1afe15df85 feat: Add prisma:push script and remove obsolete migration files 2025-06-25 17:50:55 +02:00
9e095e1a43 Refactor code for improved readability and consistency
- Updated formatting in SessionDetails component for better readability.
- Enhanced documentation in scheduler-fixes.md to clarify issues and solutions.
- Improved error handling and logging in csvFetcher.js and processingScheduler.js.
- Standardized code formatting across various scripts and components for consistency.
- Added validation checks for CSV URLs and transcript content to prevent processing errors.
- Enhanced logging messages for better tracking of processing status and errors.
2025-06-25 17:46:23 +02:00
a9e4145001 feat: Implement structured message parsing and display in MessageViewer component
- 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.
2025-06-25 17:45:08 +02:00
3196dabdf2 feat: Implement session processing and refresh schedulers
- 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.
2025-06-25 16:14:01 +02:00
c9e24298cd Bump node-cron from 4.0.6 to 4.0.7 (#3)
Bumps [node-cron](https://github.com/merencia/node-cron) from 4.0.6 to 4.0.7.
- [Release notes](https://github.com/merencia/node-cron/releases)
- [Commits](https://github.com/merencia/node-cron/compare/v4.0.6...v4.0.7)

---
updated-dependencies:
- dependency-name: node-cron
  dependency-version: 4.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-23 12:37:39 +02:00
a360f461ab Merge pull request #2 from kjanat/feature/sidebar
Feature/sidebar
2025-05-23 00:22:45 +02:00
bbcdff0ffc Update app/dashboard/company/page.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-23 00:21:24 +02:00
940b416563 Revert DonutChart.tsx 2025-05-23 00:19:55 +02:00
cb86d26786 Update components/DonutChart.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-23 00:13:16 +02:00
a265f3236c Update README.md
Typo
2025-05-23 00:10:45 +02:00
be63dba540 Update playwright.yml
renamed step
2025-05-23 00:09:00 +02:00
01f4dd60f9 Update playwright.yml 2025-05-22 23:59:47 +02:00
9fad25e5f9 Update TODO.md with new tasks and enhance README.md with project details and setup instructions 2025-05-22 23:55:30 +02:00
13d0f8ee8d Add markdownlint-cli2 for markdown linting; configure Prettier with Jinja template support and update linting scripts 2025-05-22 22:29:06 +02:00
303226e3a9 Refactor trend calculations and improve WordCloud component responsiveness; remove trend labels for cleaner display 2025-05-22 22:21:40 +02:00
cbbdc8a1dc Enhance dashboard layout and sidebar functionality; improve session metrics calculations and API error handling 2025-05-22 21:53:18 +02:00
8dcb892ae9 Add Playwright testing framework and implement initial tests; update .gitignore and package files 2025-05-22 19:46:04 +02:00
f005b2ec0a Update dashboard metrics and session handling
- Refactor DashboardContent to improve trend calculations for user metrics and session time.
- Modify SessionViewPage to ensure loading state is set before fetching session data.
- Adjust SessionsPage to clean up display of session start time and remove unnecessary comments.
- Enhance DonutChart to handle various data point types and improve percentage calculations.
- Update GeographicMap to utilize @rapideditor/country-coder for country coordinates.
- Improve safeParseDate function in csvFetcher for better date handling and error logging.
- Refactor sessionMetrics to clarify variable names and improve session duration calculations.
- Update next.config.js for better configuration clarity.
- Bump package version to 0.2.0 and update dependencies in package.json and package-lock.json.
- Clean up API handler for dashboard sessions to improve readability and maintainability.
- Adjust tsconfig.json for better module resolution and strict type checking.
2025-05-22 19:21:49 +02:00
ed6e5b0c36 Enhance session handling and improve data parsing; add safe date parsing utility 2025-05-22 16:11:33 +02:00