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.
This commit is contained in:
salirezav
2025-11-02 10:07:59 -05:00
parent f1a9cb0c1e
commit f6a37ca1ba
50 changed files with 7057 additions and 368 deletions

View File

@@ -1,14 +1,12 @@
# Environment Configuration for Pecan Experiments Application
# Feature Flags
VITE_ENABLE_SHELL=true
VITE_ENABLE_VIDEO_MODULE=true
VITE_ENABLE_VISION_SYSTEM_MODULE=true
# USDA Vision Camera System API Configuration
# Recommended default: use a relative path so the dev server proxy routes to the API container
# Leave unset to default to "/api" (see vite.config.ts proxy)
# To override and point directly, set e.g.:
# VITE_VISION_API_URL=http://vm-host-or-ip:8000
# Remote Module URLs (use exp-dash hostname for Docker Compose networking)
VITE_VIDEO_REMOTE_URL=http://exp-dash:3001/assets/remoteEntry.js?v=$(date +%s)
VITE_VISION_SYSTEM_REMOTE_URL=http://exp-dash:3002/assets/remoteEntry.js?v=$(date +%s)
# Supabase Configuration (if needed for production)
# VITE_SUPABASE_URL=your_supabase_url
# VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# Development Configuration
# VITE_DEV_MODE=true
# API URLs
VITE_VISION_API_URL=http://exp-dash:8000
VITE_MEDIA_API_URL=http://exp-dash:8090

View File

@@ -5,7 +5,8 @@ import { DashboardHome } from './DashboardHome'
import { UserManagement } from './UserManagement'
import { ExperimentManagement } from './ExperimentManagement'
import { DataEntry } from './DataEntry'
import { VisionSystem } from './VisionSystem'
// VisionSystem is now loaded as a microfrontend - see RemoteVisionSystem below
// import { VisionSystem } from './VisionSystem'
import { Scheduling } from './Scheduling'
import React, { Suspense } from 'react'
import { loadRemoteComponent } from '../lib/loadRemote'
@@ -164,6 +165,13 @@ export function DashboardLayout({ onLogout, currentRoute }: DashboardLayoutProps
LocalVideoPlaceholder as any
) as unknown as React.ComponentType
const LocalVisionSystemPlaceholder = () => (<div className="p-6">Vision System module not enabled.</div>)
const RemoteVisionSystem = loadRemoteComponent(
isFeatureEnabled('enableVisionSystemModule'),
() => import('visionSystemRemote/App'),
LocalVisionSystemPlaceholder as any
) as unknown as React.ComponentType
const renderCurrentView = () => {
if (!user) return null
@@ -200,7 +208,13 @@ export function DashboardLayout({ onLogout, currentRoute }: DashboardLayoutProps
case 'data-entry':
return <DataEntry />
case 'vision-system':
return <VisionSystem />
return (
<ErrorBoundary fallback={<div className="p-6">Failed to load vision system module. Please try again.</div>}>
<Suspense fallback={<div className="p-6">Loading vision system module...</div>}>
<RemoteVisionSystem />
</Suspense>
</ErrorBoundary>
)
case 'scheduling':
return <Scheduling user={user} currentRoute={currentRoute} />
case 'video-library':

View File

@@ -3,6 +3,7 @@ export type FeatureFlags = {
enableVideoModule: boolean
enableExperimentModule: boolean
enableCameraModule: boolean
enableVisionSystemModule: boolean
}
const toBool = (v: unknown, fallback = false): boolean => {
@@ -19,6 +20,7 @@ export const featureFlags: FeatureFlags = {
enableVideoModule: toBool(import.meta.env.VITE_ENABLE_VIDEO_MODULE ?? false),
enableExperimentModule: toBool(import.meta.env.VITE_ENABLE_EXPERIMENT_MODULE ?? false),
enableCameraModule: toBool(import.meta.env.VITE_ENABLE_CAMERA_MODULE ?? false),
enableVisionSystemModule: toBool(import.meta.env.VITE_ENABLE_VISION_SYSTEM_MODULE ?? false),
}
export const isFeatureEnabled = (flag: keyof FeatureFlags): boolean => featureFlags[flag]

View File

@@ -19,7 +19,8 @@ export default defineConfig({
},
remotes: {
// Allow overriding by env; default to localhost for dev
videoRemote: process.env.VITE_VIDEO_REMOTE_URL || 'http://localhost:3001/assets/remoteEntry.js'
videoRemote: process.env.VITE_VIDEO_REMOTE_URL || 'http://localhost:3001/assets/remoteEntry.js',
visionSystemRemote: process.env.VITE_VISION_SYSTEM_REMOTE_URL || 'http://localhost:3002/assets/remoteEntry.js'
},
shared: {
react: { singleton: true, eager: true },