Skip to main content

PresBot UI

PresBot UI is the frontend application for the PresBot presentation coaching platform.

GitHub Repository: https://github.com/dmsb-dash-labs/presbot-ui


Server Information

The server code is located on the Blackwell server.

EnvironmentPathBranch
Production/home/dash_ra/dmsb-dash-labs/presbot-ui-prodworkingui-tanvi
UAT/home/dash_ra/dmsb-dash-labs/presbot-ui-uatrelease/uat

URLs

EnvironmentApplication URLAPI URL
Productionhttps://presbot.dashlab.studiohttps://api.presbot.dashlab.studio
UAThttps://uat.presbot.dashlab.studiohttps://uat.api.presbot.dashlab.studio

Ports

EnvironmentPort
Production3002
UAT3009

Tech Stack

TechnologyVersionDescription
Next.js14.xReact framework for production
React18.xUI library
TypeScript5.xType-safe JavaScript
Tailwind CSS3.4.xUtility-first CSS framework
Radix UIlatestAccessible UI primitives
Framer MotionlatestAnimation library
React Hook FormlatestForm handling
Zod3.xSchema validation
RechartslatestCharting library
PM2-Process manager for Node.js

Folder Structure

presbot-ui/
├── app/ # Next.js App Router pages
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout component
│ ├── page.tsx # Home page
│ └── multi-speech/ # Multi-speech feature route
│ └── page.tsx

├── components/ # React components
│ ├── ui/ # shadcn/ui components (primitives)
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ ├── dialog.tsx
│ │ └── ... # Other UI primitives
│ │
│ ├── AudioAnalysis.tsx # Audio analysis display
│ ├── AudioUpload.tsx # Audio file upload component
│ ├── AuthProvider.tsx # Authentication context provider
│ ├── ComparisonPlayback.tsx # Audio comparison player
│ ├── EnhancedInput.tsx # Enhanced input component
│ ├── ErrorBoundary.tsx # Error boundary wrapper
│ ├── FeedbackRubric.tsx # Feedback display component
│ ├── InitialLoader.tsx # Initial loading screen
│ ├── OriginalSampleList.tsx # Original samples list
│ ├── PresentationContext.tsx # Presentation context provider
│ ├── ProductionSecurity.tsx # Security component for prod
│ ├── ScriptAnalysis.tsx # Script analysis display
│ ├── Sidebar.tsx # Navigation sidebar
│ ├── StepIndicator.tsx # Step progress indicator
│ ├── theme-provider.tsx # Theme context provider
│ ├── VoiceCloneGenerator.tsx # Voice clone generation
│ └── WorkflowStepIndicator.tsx # Workflow step progress

├── hooks/ # Custom React hooks
│ ├── use-audio-recording.ts # Audio recording hook
│ ├── use-audio-upload.ts # Audio upload hook
│ ├── use-mobile.tsx # Mobile detection hook
│ ├── use-user.ts # User data hook
│ ├── use-voice-clones.ts # Voice clones management hook
│ └── use-voice-generation.ts # Voice generation hook

├── lib/ # Utility libraries
│ ├── api-client.ts # API client configuration
│ ├── api.ts # API functions
│ ├── audio-utils.ts # Audio utility functions
│ ├── cache-utils.ts # Caching utilities
│ ├── constants.ts # Application constants
│ ├── debug-utils.ts # Debug utilities
│ ├── types.ts # TypeScript type definitions
│ └── utils.ts # General utility functions

├── public/ # Static assets
│ └── *.png, *.svg, *.jpg # Images and icons

├── styles/ # Additional styles
│ └── globals.css # Global CSS overrides

├── .github/
│ └── workflows/
│ └── deploy.yml # CI/CD deployment workflow

├── ecosystem.config.js # PM2 configuration
├── next.config.mjs # Next.js configuration
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Dependencies and scripts
└── components.json # shadcn/ui configuration

Folder Descriptions

FolderDescription
app/Contains Next.js 14 App Router pages. Each folder represents a route.
components/Reusable React components. The ui/ subfolder contains shadcn/ui primitives.
components/ui/Low-level UI components from shadcn/ui (buttons, inputs, dialogs, etc.)
hooks/Custom React hooks for state management and side effects.
lib/Utility functions, API clients, type definitions, and constants.
public/Static files served directly (images, logos, favicons).
styles/Global CSS styles and Tailwind customizations.
.github/workflows/GitHub Actions CI/CD configuration.

Key Configuration Files

FilePurpose
ecosystem.config.jsPM2 process manager configuration for running the app
next.config.mjsNext.js framework configuration
tailwind.config.tsTailwind CSS theme and plugin configuration
tsconfig.jsonTypeScript compiler options
components.jsonshadcn/ui component configuration

Environment Variables

VariableDescription
NEXT_PUBLIC_API_URLBackend API URL
NEXT_PUBLIC_FLASK_URLFlask API URL
NEXT_PUBLIC_DASH_PORTAL_URLDASH Portal URL
NEXT_PUBLIC_DISABLE_DEVTOOLSDisable React DevTools (prod: true)
NEXT_PUBLIC_ENABLE_CONSOLE_LOGSEnable console logging (prod: false)
NEXT_PUBLIC_ENABLE_SOURCE_MAPSEnable source maps (prod: false)

Quick Commands

Install Dependencies

npm install

Start Development Server

npm run dev

Build for Production

npm run build

Start Production Server

npm run start