WIP: integrate-old-refactors-of-github #1

Draft
hdh20267 wants to merge 140 commits from integrate-old-refactors-of-github into main

140 Commits

Author SHA1 Message Date
salirezav
9bcb5c203e Refactor Experiment and Phase components for improved state management and UI consistency
- Resolved merge conflicts and cleaned up code in ExperimentForm, enhancing initial state handling and validation logic.
- Updated PhaseForm to reflect correct placeholder text for descriptions.
- Simplified Sidebar component by removing unused props and ensuring consistent behavior across expanded and collapsed states.
- Adjusted Scheduling component to streamline repetition management and improve user experience.
2026-03-09 13:53:03 -04:00
Alireza Vaezi
97ded48d54 gitignore updates 2026-03-09 13:10:12 -04:00
Alireza Vaezi
cd55dda295 Merge remote-tracking branch 'old-github/main' into integrate-old-refactors-of-github 2026-03-09 13:10:08 -04:00
Alireza Vaezi
9e97893c89 Merge pull request #3 from salirezav/db-fixes-and-patches
Db fixes and patches
2026-03-09 12:51:23 -04:00
Alireza Vaezi
0882d8d484 Merge branch 'main' into db-fixes-and-patches 2026-03-09 12:50:57 -04:00
salirezav
0a2b24fdbf Refactor Experiment components to support new experiment book structure
- Updated ExperimentForm to handle additional phase parameters and improved initial state management.
- Modified ExperimentModal to fetch experiment data with phase configuration and ensure unique experiment numbers within the same phase.
- Renamed references from "phases" to "books" across ExperimentPhases, PhaseExperiments, and related components for consistency with the new terminology.
- Enhanced error handling and validation for new shelling parameters in ExperimentForm.
- Updated Supabase interface definitions to reflect changes in experiment and phase data structures.
2026-03-09 12:43:23 -04:00
salirezav
38a7846e7b Update .gitignore and refactor docker-compose.sh for improved host IP detection
- Added .host-ip to .gitignore to prevent tracking of host IP configurations.
- Enhanced docker-compose.sh to prioritize HOST_IP environment variable, fallback to .host-ip file, and finally auto-detect the host IP, improving robustness in various environments.
- Updated documentation to reflect changes in Supabase migration paths and removed references to deprecated management-dashboard-web-app directory.
2026-02-09 13:21:08 -05:00
salirezav
6a8f238bee fixed scheduling not loading unless logged 2026-02-09 13:20:40 -05:00
salirezav
1452a42ef4 Merge branch 'main' of https://github.com/salirezav/usda-vision 2026-02-02 13:05:29 -05:00
salirezav
5da5347443 Merge branch 'fix/scheduling-ui-ux' 2026-02-02 12:38:21 -05:00
salirezav
c8cd95361a Update README.md to reflect new services and development setup
- Added descriptions for new services: media-api, video-remote, vision-system-remote, and scheduling-remote.
- Updated development instructions to use docker-compose for starting the stack.
- Changed web port from 5173 to 8080 and clarified development commands.
- Removed MQTT broker details and updated service sections accordingly.
2026-02-02 12:34:59 -05:00
salirezav
309659c65d Update .gitignore to exclude Supabase CLI temporary files
- Added entries to ignore the Supabase CLI temporary files located in management-dashboard-web-app/supabase/.temp/cli-latest and supabase/.temp/cli-latest, preventing unnecessary clutter in version control.
2026-02-02 11:30:43 -05:00
salirezav
df6c849ca4 db fixes and patches: phase data tables and unified phase executions migrations, database entities doc 2026-02-02 11:27:53 -05:00
salirezav
49ddcfd002 Refactor docker-compose setup and enhance scheduling components
- Re-enabled Vision API and Media API services in docker-compose.yml, providing necessary configurations for development.
- Improved scheduling logic in HorizontalTimelineCalendar and Scheduling components to better manage repetition visibility and database scheduling status.
- Updated docker-compose-reset.sh to conditionally wait for Supabase services, enhancing the setup process for local development.
- Added isScheduledInDb prop to manage UI states for scheduled repetitions, improving user experience in the scheduling interface.
2026-02-02 11:25:37 -05:00
Hunter Halloran
065e5f368f fix: Move ragenix to externally managed, and ask for env file references 2026-01-30 12:48:48 -05:00
Hunter
3434082584 Merge pull request #2 from salirezav/feat/nix-package
feat: Add flake and ragenix package generation and dev environment
2026-01-30 12:20:19 -05:00
Hunter Halloran
cfa31347c6 feat: Add flake and ragenix package generation and dev environment 2026-01-30 12:05:35 -05:00
Hunter
8cb234e959 Merge pull request #1 from salirezav/oauth2-login
feat: Add Oauth2 login support
2026-01-30 11:52:14 -05:00
salirezav
780a95549b Enhance ErrorBoundary and improve repetition placement logic in scheduling components
- Updated ErrorBoundary to include auto-retry functionality with configurable retry parameters.
- Refined repetition placement logic in HorizontalTimelineCalendar to handle overlaps more accurately, ensuring better visual representation of scheduling data.
- Added comments for clarity on sorting and overlap checks within the repetition handling process.
2026-01-14 16:41:10 -05:00
salirezav
c54385a90c Enhance ErrorBoundary component with auto-retry functionality
- Added auto-retry feature to ErrorBoundary for handling errors during module federation loading.
- Introduced props for configuring retry behavior: autoRetry, retryDelay, and maxRetries.
- Implemented retry count management and UI feedback for ongoing retries.
- Updated component lifecycle methods to manage retries and cleanup effectively.
- Refactored handleRetry method to reset retry count upon manual retry.
2026-01-14 16:41:03 -05:00
salirezav
afefd32c3b Refactor development workflow for scheduling-remote
- Updated dev:watch script in package.json to streamline the build and serve process.
- Removed start-dev.sh script as its functionality is now integrated into the npm command.
2026-01-14 16:28:07 -05:00
salirezav
325dc89c51 Enhance HorizontalTimelineCalendar and Scheduling components with repetition metadata and improved interaction
- Added RepetitionMetadata interface to manage phase details for repetitions.
- Implemented onScrollToRepetition and onScheduleRepetition callbacks for better user navigation and scheduling.
- Updated HorizontalTimelineCalendar to display phase names, experiment numbers, and repetition numbers in the timeline.
- Removed locked state management from Scheduling component, simplifying repetition handling.
- Improved conductor assignment visibility and interaction within the scheduling interface.
2026-01-14 16:04:51 -05:00
salirezav
0a4df9073c Refactor Sidebar component to remove hover state management and adjust expansion logic
- Removed isHovered and setIsHovered props from SidebarProps.
- Updated sidebar expansion logic to rely solely on isExpanded and isMobileOpen.
- Simplified rendering conditions for menu items and submenus based on the new state management.
2026-01-14 16:04:45 -05:00
salirezav
87ff14705e Disable Vision API and Media API services in docker-compose.yml for development; add start-dev.sh script for scheduling-remote to streamline development workflow. 2026-01-14 16:04:39 -05:00
salirezav
3eeaa72145 Implement sidebar state persistence in DashboardLayout
- Changed initial state of sidebar expansion to false.
- Added functions to save and retrieve sidebar state from localStorage.
- Updated useEffect to load saved sidebar state on component mount.
- Modified toggleSidebar function to save the new state after toggling.
2026-01-14 16:04:28 -05:00
salirezav
17619dce47 Merge remote-tracking branch 'origin/main' into fix/scheduling-ui-ux 2026-01-13 14:46:11 -05:00
salirezav
0c434e7e7f Refactor HorizontalTimelineCalendar and Scheduling components for improved functionality
- Updated HorizontalTimelineCalendar to support full 24-hour scheduling with enhanced marker positioning and dragging capabilities.
- Introduced extendLeft and extendRight properties in RepetitionBorder for better visual representation of markers extending beyond their borders.
- Enhanced tooltip functionality for vertical lines in the timeline, providing clearer time information.
- Modified Scheduling component to allow scheduling from midnight to midnight, improving user experience in time selection.
- Adjusted Docker script permissions for better execution control.
2026-01-13 14:41:48 -05:00
Hunter Halloran
83084158b5 feat: Enable UGA SSO with Microsoft Entra 2026-01-13 13:47:33 -05:00
Hunter Halloran
32504f7196 feat: Add Azure external auth provider 2026-01-09 12:52:42 -05:00
Hunter Halloran
94e618bf91 feat: Begin support for OIDC login 2026-01-09 12:17:00 -05:00
UGA Innovation Factory
3c24900e15 update 2025-12-19 18:35:42 -05:00
UGA Innovation Factory
199b7dc123 round bottom border on password 2025-12-19 18:20:11 -05:00
UGA Innovation Factory
b1e93f7d08 round bottom border on password 2025-12-19 18:14:59 -05:00
UGA Innovation Factory
c6c3677c54 fix for password too 2025-12-19 18:11:33 -05:00
UGA Innovation Factory
d6774a751b actually fix text color 2025-12-19 18:07:57 -05:00
UGA Innovation Factory
5ffb4a3cfc apply text color to body 2025-12-19 17:52:45 -05:00
UGA Innovation Factory
460403bde2 respect font import better with safari 2025-12-19 17:40:41 -05:00
UGA Innovation Factory
bac8bdec90 updated dark color scheme to show text on login 2025-12-19 17:29:28 -05:00
UGA Innovation Factory
35ab2e79ce add external url to allowed hosts 2025-12-19 16:05:48 -05:00
salirezav
11e65e4694 feat: Add local Supabase configuration for Vite development
- Introduced a new backup environment file containing local Supabase and Vision API configurations.
- Configured environment variables for Supabase URL, anonymous key, and various Vision API settings.
- Enabled modules for video, vision system, and scheduling in the development environment.
2025-12-18 20:17:14 -05:00
salirezav
8cbb2d7f00 feat: Add dynamic host IP detection for Docker Compose and Supabase config
- Add docker-compose.sh wrapper script that auto-detects host IP
- Update docker-compose.yml to use environment variable substitution
- Update Supabase config.toml files to use HOST_SITE_URL and SUPABASE_API_URL env vars
- Add scripts/get-host-ip.sh for IP detection
- Add scripts/set-host-env.sh for environment setup
- Add scripts/supabase-with-env.sh wrapper for Supabase CLI
- Add documentation for Docker Compose environment setup
- Update README.md with new usage instructions
- Replace hardcoded URLs with dynamic environment variables
2025-12-18 19:57:27 -05:00
salirezav
a52f3fbf24 Refactor Supabase services in docker-compose.yml for better organization and testing
- Commented out all Supabase services to facilitate testing with Supabase CLI.
- Updated README to include Supabase directory in project structure.
- Adjusted documentation for migration paths in Supabase Docker Compose guide.
- Enhanced docker-compose-reset.sh to explicitly remove Supabase volumes and wait for migrations to complete.
2025-12-18 18:27:04 -05:00
salirezav
79f475348e feat: Integrate Supabase containers into main docker-compose
- Add all Supabase services (db, rest, auth, realtime, storage, studio, meta, inbucket)
- Add migration runner service to automatically run migrations on startup
- Configure all services to use shared network for inter-service communication
- Add documentation for Supabase docker-compose integration
- Add helper script for generating Supabase secrets
- Update web service to connect to Supabase via network
2025-12-18 15:59:24 -05:00
salirezav
a3f18b2186 Enhance AvailabilityCalendar component with loading state, toast notifications, and delete confirmation modal
- Added loading state to indicate data fetching progress.
- Implemented toast notifications for success and error messages during availability operations.
- Introduced a delete confirmation modal for improved user experience when removing availability slots.
- Enhanced TimeSlotModal with validation error handling and loading indicators for adding time slots.
2025-12-18 15:56:20 -05:00
salirezav
0ef87a9aea Commit changes before merging to main 2025-12-18 14:33:05 -05:00
salirezav
68e8c90ad7 Remove CalendarStyles.css and Scheduling.tsx components, updating the project structure for improved maintainability. Update Supabase CLI version and modify experiment_repetitions SQL migration to include scheduled_date. Enhance scheduling component in the remote app with improved drag-and-drop functionality and UI adjustments for better user experience. 2025-12-12 12:53:52 -05:00
salirezav
23d20d0ac3 Enhance scheduling component and improve data handling
- Added conductorsExpanded state to manage the visibility of the conductors list in the scheduling component.
- Updated color assignment logic for conductors to ensure consistent coloring based on their position in the array.
- Modified spawnSingleRepetition function to accept an updated set of selected IDs for accurate stagger calculations.
- Refactored soaking and airdrying data retrieval to map results from a unified experiment_phase_executions table, improving data consistency.
- Enhanced UI for conductor selection, including a collapsible list and improved availability indicators.
2025-12-05 11:10:21 -05:00
salirezav
5d52183d8e Update Docker configuration, enhance error handling, and improve logging
- Added health check to the camera management API service in docker-compose.yml for better container reliability.
- Updated installation scripts in Dockerfile to check for existing dependencies before installation, improving efficiency.
- Enhanced error handling in the USDAVisionSystem class to allow partial operation if some components fail to start, preventing immediate shutdown.
- Improved logging throughout the application, including more detailed error messages and critical error handling in the main loop.
- Refactored WebSocketManager and CameraMonitor classes to use debug logging for connection events, reducing log noise.
2025-12-03 17:23:31 -05:00
salirezav
b0f84811bd Enhance media API with video file validation and Docker configuration update
- Added a function to check if video files are complete and valid using ffprobe, preventing errors during thumbnail generation.
- Updated thumbnail generation logic to skip incomplete or corrupted files, improving robustness.
- Modified docker-compose.yml to include a restart policy for the camera management API service, ensuring better container reliability.
2025-12-03 14:56:18 -05:00
salirezav
322eceed10 Add background thumbnail generator to media API
- Implemented a background worker for generating video thumbnails, enhancing media processing capabilities.
- Added startup and shutdown events to manage the thumbnail generator's lifecycle.
- Refactored thumbnail generation logic to handle file processing more robustly, including checks for existing thumbnails and file accessibility.
- Updated existing functions to integrate with the new background processing approach, ensuring seamless thumbnail generation on demand.
2025-12-02 12:34:00 -05:00
salirezav
e9bb9d95da Enhance CameraPage UI and improve loading indicators
- Updated loading indicators with larger sizes and improved animations for better visibility.
- Enhanced error banner styling and increased padding for a more user-friendly experience.
- Adjusted stream status and recording status sections for improved readability and consistency in font sizes.
- Refined MQTT message log display with better spacing and text sizes for clearer information presentation.
- Improved overall layout and styling of the CameraPage component for a more polished user interface.
2025-12-01 15:40:32 -05:00
salirezav
7c14e2a260 Enhance Docker Compose configuration and improve camera manager error handling
- Added container names for better identification of services in docker-compose.yml.
- Refactored CameraManager to include error handling during initialization of camera recorders and streamers, ensuring the system remains operational even if some components fail.
- Updated frontend components to support new MQTT Debug Panel functionality, enhancing monitoring capabilities.
2025-12-01 15:30:10 -05:00
salirezav
4d587d3159 Add MQTT publish request and response models, and implement publish route
- Introduced MQTTPublishRequest and MQTTPublishResponse models for handling MQTT message publishing.
- Implemented a new POST route for publishing MQTT messages, including error handling and logging.
- Enhanced the StandaloneAutoRecorder with improved logging during manual recording start.
- Updated the frontend to include an MQTT Debug Panel for better monitoring and debugging capabilities.
2025-12-01 13:07:36 -05:00
salirezav
b83e74639b Enhance media API transcoding and video streaming capabilities
- Added support for limiting concurrent transcoding operations in the media API to prevent resource exhaustion.
- Implemented functions to retrieve video duration and bitrate using ffprobe for improved streaming performance.
- Enhanced the generate_transcoded_stream function to handle HTTP range requests, allowing for more efficient video playback.
- Updated VideoModal component to disable fluid and responsive modes, ensuring proper container boundaries during video playback.
- Improved logging throughout the transcoding process for better error tracking and debugging.
2025-11-04 11:55:27 -05:00
salirezav
0143790424 Update session summary and clean up unused files
- Added additional notes to SESSION_SUMMARY.md regarding MQTT debugging and enhanced logging.
- Removed outdated SQL seed files related to Phase 2 JC Experiments and Meyer Experiments to streamline the codebase.
- Updated the CLI version in the Supabase configuration for consistency.
- Cleaned up test files in the camera management API to improve maintainability.
2025-11-03 23:07:22 -05:00
salirezav
745480b16b Update camera management and MQTT logging for improved functionality
- Changed log level in configuration from WARNING to INFO for better visibility of system operations.
- Enhanced StandaloneAutoRecorder initialization to accept camera manager, state manager, and event system for improved modularity.
- Updated recording routes to handle optional request bodies and improved error logging for better debugging.
- Added checks in CameraMonitor to determine if a camera is already in use before initialization, enhancing resource management.
- Improved MQTT client logging to provide more detailed connection and message handling information.
- Added new MQTT event handling capabilities to the VisionApiClient for better tracking of machine states.
2025-11-03 16:56:53 -05:00
salirezav
9fe1f58319 Add scheduling-remote service to docker-compose and enhance camera error handling
- Introduced a new service for scheduling-remote in docker-compose.yml, allowing for better management of scheduling functionalities.
- Enhanced error handling in CameraMonitor and CameraStreamer classes to improve robustness during camera initialization and streaming processes.
- Updated various components in the management dashboard to support dark mode and improve user experience with consistent styling.
- Implemented feature flags for enabling/disabling modules, including the new scheduling module.
2025-11-02 19:33:13 -05:00
salirezav
6b0738839b Remove deprecated files and scripts to streamline the codebase
- Deleted unused API test files, RTSP diagnostic scripts, and development utility scripts to reduce clutter.
- Removed outdated database schema and modularization proposal documents to maintain focus on current architecture.
- Cleaned up configuration files and logging scripts that are no longer in use, enhancing project maintainability.
2025-11-02 10:07:59 -05:00
salirezav
952ca09c61 Refactor API route setup and enhance modularity
- Consolidated API route definitions by registering routes from separate modules for better organization and maintainability.
- Removed redundant route definitions from the APIServer class, improving code clarity.
- Updated camera monitoring and recording modules to utilize a shared context manager for suppressing camera SDK errors, enhancing error handling.
- Adjusted timeout settings in camera operations for improved reliability during frame capture.
- Enhanced logging and error handling across camera operations to facilitate better debugging and monitoring.
2025-11-01 15:53:01 -04:00
salirezav
b9449a71b1 RTSP Fully Implemented 2025-11-01 14:58:25 -04:00
salirezav
6a275ed159 Enhance camera recording functionality with streamer integration
- Updated CameraRecorder to support frame sharing from CameraStreamer, allowing for more efficient video recording.
- Modified CameraManager to ensure streamer references are correctly assigned to recorders.
- Enhanced CameraStreamer to include a recording frame queue for concurrent access during recording.
- Improved logging for better tracking of recording states and streamer activity.
- Updated API tests to include new functionality for retrieving video lists.
2025-11-01 13:49:16 -04:00
salirezav
997e154521 Refactor MediaMTX configuration and enhance RTSP streaming logging
- Removed outdated timeout settings from MediaMTX configuration for improved stream handling.
- Updated CameraStreamer class to include detailed logging for RTSP streaming state and frame dimension checks.
- Added environment variable support for configuring MediaMTX host, enhancing flexibility in deployment.
2025-11-01 12:58:30 -04:00
salirezav
6529691b1d Implement RTSP streaming functionality for cameras
- Added endpoints to start and stop RTSP streaming for cameras in the API.
- Enhanced CameraManager and CameraStreamer classes to manage RTSP streaming state and processes.
- Updated API documentation to include new RTSP streaming commands.
- Modified Docker configurations to include FFmpeg for RTSP streaming support.
- Adjusted MediaMTX settings for improved stream handling and timeout configurations.
2025-11-01 12:35:25 -04:00
salirezav
18f3528eda Enhance video streaming capabilities and UI integration
- Added support for streaming video files with proper MIME type handling in the media API.
- Implemented transcoding functionality for H.264 compatibility on-the-fly using FFmpeg.
- Updated VideoModal component to utilize Video.js for improved video playback experience.
- Enhanced user interface with download options and better error handling for video playback.
- Updated package.json and package-lock.json to include new dependencies for video.js and related types.
2025-10-31 18:29:05 -04:00
salirezav
e57236a096 Enhance video remote service and UI components
- Updated docker-compose.yml to include new media-api and mediamtx services for improved video handling.
- Modified package.json and package-lock.json to add TypeScript types for React and React DOM.
- Refactored video-related components (VideoCard, VideoList, VideoModal) for better user experience and responsiveness.
- Improved FiltersBar and Pagination components with enhanced styling and functionality.
- Added loading and error states in VideoList for better user feedback during data fetching.
- Enhanced CSS styles for a more polished look across the application.
2025-10-31 18:06:40 -04:00
salirezav
36b9ca6525 Refactor video streaming feature and update dependencies
- Replaced npm ci with npm install in docker-compose for better package management.
- Introduced remote component loading for the VideoStreamingPage with error handling.
- Updated the title in index.html to "Experiments Dashboard" for clarity.
- Added new video remote service configuration in docker-compose for improved integration.
- Removed deprecated files and components related to the video streaming feature to streamline the codebase.
- Updated package.json and package-lock.json to include @originjs/vite-plugin-federation for module federation support.
2025-10-30 15:36:19 -04:00
salirezav
a88301cb97 Enhance scheduling and drag-and-drop functionality in the Calendar component
- Improved drag-and-drop experience for event scheduling with visual feedback and better cursor styles.
- Added state management for tracking repetitions, including locked schedules and currently scheduling repetitions.
- Implemented re-staggering logic to prevent overlap of scheduled events.
- Enhanced event generation to include time points for soaking, airdrying, and cracking phases.
- Updated the calendar to preserve and restore scroll position during event updates.
- Refactored event handling to ensure smooth interaction and improved user experience.
2025-10-29 14:16:19 -04:00
salirezav
359909c04e Change video storage directory from /storage to /mnt/nfs_share
- Update StorageConfig default base_path in core/config.py
- Update base_path and camera storage_paths in config.json and config.compose.json
- Update Docker Compose volume mounts to use /mnt/nfs_share
- Update start_system.sh to create /mnt/nfs_share directory
- Update convert_avi_to_mp4.sh to use new NFS path
- Update all documentation files to reflect new storage paths
- Videos now stored on NFS server at 192.168.1.249:/mnt/nfs_share/
2025-10-14 16:28:00 -04:00
salirezav
98c8befabd Remove deprecated CSV files and update experiment seeding scripts
- Deleted unused CSV files: 'meyer experiments.csv' and 'phase_2_experimental_run_sheet.csv'.
- Updated SQL seed scripts to reflect changes in experiment data structure and ensure consistency with the latest experiment parameters.
- Enhanced user role assignments in the seed data to include 'conductor' alongside 'data recorder'.
- Adjusted experiment seeding logic to align with the corrected data from the CSV files.
2025-09-28 21:10:50 -04:00
salirezav
a4584eee44 Add drag-and-drop scheduling functionality to the Scheduling component
- Integrated react-dnd and react-dnd-html5-backend for drag-and-drop capabilities.
- Enhanced the Scheduling component to allow users to visually manage experiment repetitions on the calendar.
- Added state management for scheduled repetitions and their timing.
- Implemented select-all checkboxes for conductors and repetitions for improved user experience.
- Updated calendar event generation to include new repetition markers with distinct styles.
- Refactored event handling to support draggable repetition markers and update their timing dynamically.
2025-09-24 21:23:38 -04:00
salirezav
00f29ba6b4 Refactor experiment management and update data structures
- Renamed columns in the experimental run sheet CSV for clarity.
- Updated the ExperimentForm component to include new fields for weight per repetition and additional parameters specific to Meyer Cracker experiments.
- Enhanced the data entry logic to handle new experiment phases and machine types.
- Refactored repetition scheduling logic to use scheduled_date instead of schedule_status for better clarity in status representation.
- Improved the user interface for displaying experiment phases and their associated statuses.
- Removed outdated seed data and updated database migration scripts to reflect the new schema changes.
2025-09-24 14:27:28 -04:00
salirezav
879f06ded6 Implement availability management in Scheduling component
- Added functionality to load user availability from the database on component mount.
- Integrated create and delete availability features with the backend.
- Refactored event handling to manage availability slots dynamically.
- Updated supabase.ts to include methods for fetching, creating, and deleting availability records.
2025-09-22 11:34:58 -04:00
salirezav
dbee99c316 Update environment configuration and enhance user management features
- Changed VITE_SUPABASE_URL in .env.example for deployment consistency.
- Added new user management functionality to reset user passwords in UserManagement component.
- Updated supabase.ts to include first and last name fields in user profiles and added password reset functionality.
- Enhanced DashboardLayout to include a user profile view and improved user display in TopNavbar.
- Updated seed.sql to create additional users with roles for testing purposes.
2025-09-22 11:20:15 -04:00
salirezav
d0aafb3d15 update scheduling 2025-09-19 12:46:03 -04:00
salirezav
d57b3c9f0b Update modal backdrop blur effect and Vite configuration
- Changed backdrop blur effect in multiple modal components from 32px to 2px for a more subtle appearance.
- Updated Vite configuration to use automatic JSX runtime for improved compatibility with React 17 and above.
2025-09-19 12:43:37 -04:00
salirezav
4203b768aa Enhance scheduling features in management dashboard
- Added new scheduling functionality with a dedicated Scheduling component to manage availability and experiment scheduling.
- Integrated react-big-calendar for visual calendar representation of availability slots.
- Updated Dashboard and DashboardLayout components to handle current route and pass it to child components.
- Implemented route handling for scheduling sub-routes to improve user navigation.
- Added new dependencies: moment and react-big-calendar for date handling and calendar UI.
- Improved user experience with dynamic URL updates based on selected scheduling views.
2025-09-19 12:33:25 -04:00
salirezav
7328950684 Refactor: enhance dashboard layout and experiment management features
- Added functionality to save and retrieve the current dashboard view in localStorage for improved user experience.
- Updated DashboardLayout component to handle view changes with access control based on user roles.
- Renamed Experiments component to ExperimentManagement for clarity.
- Introduced new ExperimentPhase interface and related utility functions for managing experiment phases.
- Updated seed data to include initial roles and experiment phases for testing.
- Cleaned up unnecessary blank lines in various files for better code readability.
2025-09-19 12:03:46 -04:00
salirezav
6892919a46 Remove unnecessary blank lines in camera-test.html for cleaner code. 2025-09-11 14:28:54 -04:00
salirezav
b407e74a07 Update API endpoints for camera2 and enhance logging options in USDA Vision System
- Changed camera1 references to camera2 in API endpoint documentation for start and stop recording.
- Added debug and verbose logging options in the USDA Vision System to improve debugging capabilities.
- Updated TopNavbar component for improved user experience with cursor pointer styling.
2025-09-11 14:25:20 -04:00
salirezav
4b563816dd Add development scripts and Docker Compose configuration for local environment setup
- Introduced `dev-start.sh`, `dev-stop.sh`, `dev-logs.sh`, and `dev-shell.sh` for managing the development environment.
- Added `docker-compose.dev.yml` to define services for API and web applications with appropriate configurations.
- Updated `README.md` to include instructions for development mode and commands for managing the environment.
2025-09-11 14:24:21 -04:00
salirezav
0e53034f30 Enhance camera management features: add debug endpoint for camera manager state, implement live camera routes without authentication, and improve logging for camera initialization and status checks. Update Docker configuration to include environment variables for the web app. 2025-09-02 15:31:47 -04:00
salirezav
e0fa947da6 Refactor: enhance API response schemas for pagination; update environment variables for Supabase and Vision API; improve Vite configuration for proxy routing 2025-08-12 13:48:17 -04:00
salirezav
98f4ef81bf Chore: update environment configuration for local development; modify Dockerfile to streamline SDK installation and enhance startup script for better directory handling; add time verification script for system time synchronization 2025-08-08 16:18:37 -04:00
salirezav
be2281e82f Refactor camera management to conditionally import SDK and handle mock mode; update API base URL references to localhost in documentation and code. 2025-08-08 13:20:31 -04:00
Alireza Vaezi
cc63bf4110 Chore: rename api->camera-management-api and web->management-dashboard-web-app; update compose, ignore, README references 2025-08-07 22:07:25 -04:00
Alireza Vaezi
9384c26504 Build: ensure bash available for vendor install.sh 2025-08-07 21:28:12 -04:00
Alireza Vaezi
dad816e5a1 Chore: minor compose tweaks for SDK install at runtime and env 2025-08-07 21:27:06 -04:00
Alireza Vaezi
7d6729ae61 Build: install Huateng SDK from local tarball in api image; compose builds api image and sets LD_LIBRARY_PATH 2025-08-07 21:27:00 -04:00
Alireza Vaezi
8dc4fb9990 API Dockerfile: install camera SDK from local tarball under camera_sdk; compose: build API image and set LD_LIBRARY_PATH fallback 2025-08-07 21:25:58 -04:00
Alireza Vaezi
08a7d13b58 Dev: run full system via main.py in compose; add config.compose.json pointing MQTT to 'mqtt' service and map /storage 2025-08-07 21:07:07 -04:00
Alireza Vaezi
b22082f13b Docs: add subtree workflow and Docker Compose quick start to README 2025-08-07 21:03:12 -04:00
Alireza Vaezi
5271313d50 Add .env.example for local dev env vars 2025-08-07 20:58:54 -04:00
Alireza Vaezi
f3d9eb1e8c Add api/ and web/ via git subtree; add docker-compose.yml and unified .gitignore 2025-08-07 20:58:28 -04:00
Alireza Vaezi
d4ad5f1ab8 Add 'web/' from commit 'd8907af5e7234f12256eb3e5e4f7243eb83474e4'
git-subtree-dir: web
git-subtree-mainline: d572e3d241
git-subtree-split: d8907af5e7
2025-08-07 20:57:47 -04:00
Alireza Vaezi
d572e3d241 Add 'api/' from commit '7f703fa7d49fb13ecfbb2ac3e15924be2c43125a'
git-subtree-dir: api
git-subtree-mainline: 4743f19aef
git-subtree-split: 7f703fa7d4
2025-08-07 20:57:34 -04:00
Alireza Vaezi
d8907af5e7 feat(video-streaming): add ApiStatusIndicator, PerformanceDashboard, VideoDebugger, and VideoErrorBoundary components
- Implemented ApiStatusIndicator to monitor video API connection status with health check functionality.
- Created PerformanceDashboard for monitoring video streaming performance metrics in development mode.
- Developed VideoDebugger for diagnosing video streaming issues with direct access to test video URLs.
- Added VideoErrorBoundary to handle errors in video streaming components with user-friendly messages and recovery options.
- Introduced utility functions for performance monitoring and thumbnail caching to optimize video streaming operations.
- Added comprehensive tests for video streaming API connectivity and functionality.
2025-08-06 11:46:25 -04:00
Alireza Vaezi
7f703fa7d4 streaming fix 2025-08-05 15:55:48 -04:00
Alireza Vaezi
69d9b90f72 Add comprehensive video streaming module and AI agent integration guide
- Introduced a new video streaming module with endpoints for listing, streaming, and managing video files.
- Added detailed API documentation for video streaming, including features like HTTP range requests, thumbnail generation, and caching.
- Created a new AI Agent Video Integration Guide with step-by-step instructions for integrating with the video streaming API.
- Implemented a video reindexing script to update video statuses from "unknown" to "completed".
- Enhanced error handling and logging throughout the video streaming and reindexing processes.
2025-08-05 14:44:31 -04:00
Alireza Vaezi
7d09940a28 feat: add Pagination component for video list navigation
- Implemented a reusable Pagination component with first/last, previous/next, and numbered page buttons.
- Added PageInfo component to display current page and total items.
- Integrated pagination into VideoList component, allowing users to navigate through video pages.
- Updated useVideoList hook to manage current page and total pages state.
- Modified videoApi service to support pagination with offset-based API.
- Enhanced VideoCard styling for better UI consistency.
- Updated Tailwind CSS configuration to include custom colors and shadows for branding.
- Refactored video file settings to use 'h264' codec for better compatibility.
2025-08-05 13:56:26 -04:00
Alireza Vaezi
5e1f2c527f Enhance video file handling: support multiple formats (AVI, MP4, WEBM) in storage manager 2025-08-05 13:53:28 -04:00
Alireza Vaezi
510813772b Implement video processing module with FFmpeg conversion, OpenCV metadata extraction, and file system repository
- Added FFmpegVideoConverter for video format conversion using FFmpeg.
- Implemented NoOpVideoConverter for scenarios where FFmpeg is unavailable.
- Created OpenCVMetadataExtractor for extracting video metadata.
- Developed FileSystemVideoRepository for managing video files in the file system.
- Integrated video services with dependency injection in VideoModule.
- Established API routes for video management and streaming.
- Added request/response schemas for video metadata and streaming information.
- Implemented caching mechanisms for video streaming.
- Included error handling and logging throughout the module.
2025-08-04 16:44:53 -04:00
Alireza Vaezi
a9f305af00 feat: Update camera configuration to support MP4 format with new settings
- Changed machine topic from "vibratory_conveyor" to "blower_separator" for camera1
- Updated exposure and gain settings for camera1
- Added new video recording settings: video_format, video_codec, video_quality, auto_start_recording_enabled, auto_recording_max_retries, auto_recording_retry_delay_seconds
- Enhanced documentation to reflect current configuration and API alignment
- Redesigned Camera Configuration UI to display read-only fields for system and auto-recording settings
- Improved handling of video format settings in the API and frontend
- Created CURRENT_CONFIGURATION.md for complete system configuration reference
2025-08-04 16:44:45 -04:00
Alireza Vaezi
14adfbd973 feat(video): Implement MP4 format support across frontend and backend
- Updated VideoModal to display web compatibility status for video formats.
- Enhanced VideoPlayer to dynamically fetch video MIME types and handle MP4 streaming.
- Introduced video file utilities for better handling of video formats and MIME types.
- Modified CameraConfig interface to include new video recording settings (format, codec, quality).
- Created comprehensive documentation for MP4 format integration and frontend implementation.
- Ensured backward compatibility with existing AVI files while promoting MP4 as the preferred format.
- Added validation and error handling for video format configurations.
2025-08-04 16:21:22 -04:00
Alireza Vaezi
ddecbf7baa feat(video-streaming): Implement video streaming feature with components, hooks, services, and utilities
- Added centralized exports for video streaming components and hooks.
- Implemented `useVideoInfo` hook for fetching and managing video metadata and streaming information.
- Developed `useVideoList` hook for managing video list state, fetching, filtering, and pagination.
- Created `useVideoPlayer` hook for managing video player state and controls.
- Established `videoApiService` for handling API interactions related to video streaming.
- Defined TypeScript types for video streaming feature, including video metadata, API responses, and component props.
- Added utility functions for video operations, formatting, and data processing.
- Created main entry point for the video streaming feature, exporting all public APIs.
2025-08-04 15:02:48 -04:00
Alireza Vaezi
dee6aea254 feat: Enhance camera streaming functionality with stop streaming feature and update UI for better user experience 2025-07-31 22:17:08 -04:00
Alireza Vaezi
6147958fab Enhance camera configuration and auto-recording functionality
- Updated CameraStreamer to configure streaming settings from config.json, including manual exposure, gain, image quality, noise reduction, and color settings.
- Added new methods in CameraStreamer for configuring image quality, noise reduction, color settings, and advanced settings.
- Extended CameraConfig to include manual white balance RGB gains.
- Improved AutoRecordingManager to handle camera status updates and ensure proper recording starts/stops based on machine state changes.
- Created detailed configuration documentation for blower and conveyor cameras, outlining settings and their mappings to config.json.
- Implemented a comprehensive test script for auto-recording functionality with simulated MQTT messages, verifying correct behavior on machine state changes.
2025-07-29 13:54:16 -04:00
Alireza Vaezi
5146103010 feat: Add camera preview functionality and recording controls to VisionSystem 2025-07-29 12:31:03 -04:00
Alireza Vaezi
6a7c51ee69 feat: Add CameraPreviewModal component for live camera streaming
feat: Implement useAuth hook for user authentication management

feat: Create useAutoRecording hook for managing automatic recording functionality

feat: Develop AutoRecordingManager to handle automatic recording based on MQTT events

test: Add test script to verify camera configuration API fix

test: Create HTML page for testing camera configuration API and auto-recording fields
2025-07-29 12:30:59 -04:00
Alireza Vaezi
6c978a9983 Enhance API server configuration: add auto-recording settings and improve image quality parameters 2025-07-29 11:28:04 -04:00
Alireza Vaezi
2b7528479f Remove compiled Python bytecode files from the __pycache__ directories 2025-07-29 11:27:58 -04:00
Alireza Vaezi
5b6eaa3831 Add comprehensive tests for camera streaming, time synchronization, and auto-recording functionality
- Implemented test script for camera streaming functionality, covering API endpoints and concurrent recording.
- Created time verification script to check system time synchronization against multiple APIs.
- Developed timezone utility tests to validate timezone functions and logging.
- Added integration tests for system components, including configuration, camera discovery, and API endpoints.
- Enhanced MQTT logging and API endpoint tests for machine and MQTT status.
- Established auto-recording tests to simulate state changes and verify automatic recording behavior.
- Created simple tests for auto-recording configuration and API model validation.
2025-07-29 11:15:10 -04:00
Alireza Vaezi
bdb5ee02b7 feat: Integrate auto-recording feature into USDA Vision Camera System
- Added instructions for implementing auto-recording functionality in the React app.
- Updated TypeScript interfaces to include new fields for auto-recording status and configuration.
- Created new API endpoints for enabling/disabling auto-recording and retrieving system status.
- Enhanced UI components to display auto-recording status, controls, and error handling.
- Developed a comprehensive Auto-Recording Feature Implementation Guide.
- Implemented a test script for validating auto-recording functionality, including configuration checks and API connectivity.
- Introduced AutoRecordingManager to manage automatic recording based on machine state changes with retry logic.
- Established a retry mechanism for failed recording attempts and integrated status tracking for auto-recording.
2025-07-29 09:43:14 -04:00
Alireza Vaezi
fc93e630f4 Refine camera settings: adjust sharpness, contrast, gamma, noise filter, and auto white balance 2025-07-29 07:58:41 -04:00
Alireza Vaezi
614599e05c Add USDA Vision Camera Streaming API and related functionality
- Implemented streaming API endpoints for starting, stopping, and retrieving live streams from cameras.
- Added support for concurrent streaming and recording operations.
- Created test scripts for frame conversion and streaming functionality.
- Developed a CameraStreamer class to manage live preview streaming without blocking recording.
- Included error handling and logging for camera operations.
- Added configuration endpoints for camera settings and real-time updates.
- Enhanced testing scenarios for various camera configurations and error handling.
2025-07-28 18:09:48 -04:00
Alireza Vaezi
cdcca280f2 feat(streaming): Add live streaming functionality for USDA Vision Camera system
- Introduced non-blocking live preview streaming that operates independently from recording.
- Implemented REST API endpoints for starting and stopping streams, and retrieving live streams.
- Developed a web interface (`camera_preview.html`) for users to control and view camera streams.
- Created TypeScript definitions for API integration in React projects.
- Added comprehensive testing script (`test_streaming.py`) to validate API endpoints and concurrent operations.
- Updated database migration to fix visibility of experiment repetitions for all authenticated users.
2025-07-28 17:53:59 -04:00
Alireza Vaezi
8cf0b9aec4 Add comprehensive test suite for USDA Vision Camera System
- Implemented main test script to verify system components and functionality.
- Added individual test scripts for camera exposure settings, API changes, camera recovery, maximum FPS, MQTT events, logging, and timezone functionality.
- Created service file for system management and automatic startup.
- Included detailed logging and error handling in test scripts for better diagnostics.
- Ensured compatibility with existing camera SDK and API endpoints.
2025-07-28 17:33:49 -04:00
Alireza Vaezi
7c7115a0f4 feat: Implement Vision System API Client with comprehensive endpoints and utility functions
- Added VisionApiClient class to interact with the vision system API.
- Defined interfaces for system status, machine status, camera status, recordings, and storage stats.
- Implemented methods for health checks, system status retrieval, camera control, and storage management.
- Introduced utility functions for formatting bytes, durations, and uptime.

test: Create manual verification script for Vision API functionality

- Added a test script to verify utility functions and API endpoints.
- Included tests for health check, system status, cameras, machines, and storage stats.

feat: Create experiment repetitions system migration

- Added experiment_repetitions table to manage experiment repetitions with scheduling.
- Implemented triggers and functions for validation and timestamp management.
- Established row-level security policies for user access control.

feat: Introduce phase-specific draft management system migration

- Created experiment_phase_drafts and experiment_phase_data tables for managing phase-specific drafts and measurements.
- Added pecan_diameter_measurements table for individual diameter measurements.
- Implemented row-level security policies for user access control.

fix: Adjust draft constraints to allow multiple drafts while preventing multiple submitted drafts

- Modified constraints on experiment_phase_drafts to allow multiple drafts in 'draft' or 'withdrawn' status.
- Ensured only one 'submitted' draft per user per phase per repetition.
2025-07-28 16:30:56 -04:00
Alireza Vaezi
80ae645a36 feat: Add MQTT publisher and tester scripts for USDA Vision Camera System
- Implemented mqtt_publisher_test.py for manual MQTT message publishing
- Created mqtt_test.py to test MQTT message reception and display statistics
- Developed test_api_changes.py to verify API changes for camera settings and filename handling
- Added test_camera_recovery_api.py for testing camera recovery API endpoints
- Introduced test_max_fps.py to demonstrate maximum FPS capture functionality
- Implemented test_mqtt_events_api.py to test MQTT events API endpoint
- Created test_mqtt_logging.py for enhanced MQTT logging and API endpoint testing
- Added sdk_config.py for SDK initialization and configuration with error suppression
2025-07-28 16:30:14 -04:00
Alireza Vaezi
ea30f82c2a holy shit a lot has changed! read the readme, I guess... 2025-07-28 16:29:41 -04:00
Alireza Vaezi
ffb7ffded1 Enhance time synchronization checks, update storage paths, and improve camera recording management 2025-07-25 22:38:33 -04:00
Alireza Vaezi
48949fc045 Add project completion documentation for USDA Vision Camera System 2025-07-25 21:40:51 -04:00
Alireza Vaezi
3458567d44 Implement code changes to enhance functionality and improve performance 2025-07-25 21:39:52 -04:00
Alireza Vaezi
5f012be651 Massive update - API and other modules added 2025-07-25 21:39:07 -04:00
Alireza Vaezi
0243e76df0 init commit 2025-07-25 12:07:30 -04:00
Alireza Vaezi
12d5c50a67 Initial commit 2025-07-25 12:06:17 -04:00
Alireza Vaezi
8a1b22234b data entry and draft system work 2025-07-23 21:21:59 -04:00
Alireza Vaezi
24c435a2f7 update dependencies and remove test credentials from Login component 2025-07-23 11:46:12 -04:00
Alireza Vaezi
1d3e993137 add scheduling functionality for experiments with new ScheduleModal component 2025-07-20 21:07:58 -04:00
Alireza Vaezi
35268ba4ea create new experiment works 2025-07-20 19:59:28 -04:00
Alireza Vaezi
2f21cd54e5 add new experiment 2025-07-20 17:04:51 -04:00
Alireza Vaezi
5793487da3 style improved 2025-07-20 12:06:13 -04:00
Alireza Vaezi
384950812b style changed 2025-07-20 11:59:15 -04:00
Alireza Vaezi
5826a2c156 can successfully add new users 2025-07-20 11:33:51 -04:00
Alireza Vaezi
ac960ccdfe css issue fixed 2025-07-20 11:10:52 -04:00
Alireza Vaezi
82976746e7 RBAC seems to be working 2025-07-20 11:05:58 -04:00
Alireza Vaezi
5a1cbe9789 Revert "RBAC in place. Tailwind CSS working."
This reverts commit b37c3a83bc.
2025-07-18 21:18:07 -04:00
Alireza Vaezi
b37c3a83bc RBAC in place. Tailwind CSS working. 2025-07-17 12:10:23 -04:00
Alireza Vaezi
06c2a7925f supabase added 2025-07-17 10:53:16 -04:00
Alireza Vaezi
63045f6cf8 blank Vite + React + Tailwind CSS project 2025-07-17 10:44:08 -04:00
Alireza Vaezi
68355bdaaf Initial commit 2025-07-17 10:39:47 -04:00