- π Contents
- π Overview
- β¨ Features
- π οΈ Tech Stack
- π§© Key Concepts
- πΈ Screenshots
- π File Structure
- π Getting Started
- π» Development Workflow
- π Environment Variables
- π¦ Deployment
- π§ͺ Testing
- β Troubleshooting
- πΊοΈ Roadmap
- π₯ Contributing
- π License
Vi Operate Console is a comprehensive workforce management and forecasting platform specifically designed for call centers and other operational environments. The platform leverages artificial intelligence to transform how organizations predict demand, schedule staff, and allocate resources.
- Call Center Managers: Monitor performance, optimize staffing levels
- Workforce Planners: Develop efficient schedules based on historical patterns
- Operations Directors: Track KPIs and make data-driven strategic decisions
- Agents/Staff: View schedules, monitor performance metrics, manage time off
- Reduce operational costs by 15-25% through AI-optimized staffing
- Improve customer satisfaction with automated forecasting
- Increase agent retention through better schedule optimization
- Deliver actionable insights through integrated dashboards and reports
- AI-Powered Forecasting: Predictive models for call volume, handling time, and staffing needs
- Dynamic Dashboards: Real-time monitoring of operational KPIs and agent performance
- Automated Scheduling: AI-optimized staff schedules that balance service levels and costs
- Workflow Automation: Customizable processes for forecasting, scheduling, and reporting
- Integration Hub: Connect with existing telephony systems, CRMs, and HR platforms
- Alert System: Proactive notifications for staffing shortages and performance issues
- Framework: Next.js 15 (App Router) for server components and routing
- Language: TypeScript for type safety and developer experience
- Authentication: Auth.js for secure user authentication
- Database: Postgres for structured data storage
- Deployment: Vercel for seamless deployment
- Styling: Tailwind CSS for utility-first styling
- Components: Shadcn UI for accessible, reusable UI components
- Analytics: Vercel Analytics for performance and usage tracking
- Formatting: Prettier for consistent code formatting
- State Management: React hooks and context for client-side state
- AI Integration: Custom AI models for forecasting and optimization
The platform revolves around these key resources:
- Archetypes: Data models for understanding historical patterns and forecasting future trends
- Agents: AI agents that perform specific tasks within workflows (forecasting, scheduling, analysis)
- Workflows: Automated processes that deliver forecasting and scheduling outputs
- Sources: Data integration points that provide inputs for forecasting and analysis
- Reports: Customizable views of historical data, forecasts, and performance metrics
- Dashboards: Operational views for call center staffing and management
- Reports: Historical analysis and forecasting reports
- Automations: Workflows, Agents, Cron Jobs, Triggers, Data Streams
- Archetypes: Data models for pattern recognition
- Sources: Integration with external data sources
The project follows a page-centric architecture using Next.js App Router:
src/
βββ app/ # Next.js App Router pages
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
β βββ error.tsx # Root error handling
β βββ not-found.tsx # 404 page
β βββ console/ # Main application
β β βββ layout.tsx # Console layout
β β βββ page.tsx # Console home page
β β βββ error.tsx # Console error handling
β β βββ dashboards/ # Dashboard pages
β β βββ reports/ # Reports pages
β β βββ automations/ # Automation pages
β β β βββ page.tsx # Main automations page
β β β βββ tabs.tsx # Navigation tabs
β β β βββ _common/ # Shared automation components
β β β βββ builder/ # Legacy builder (redirects)
β β β βββ create/ # Automation creation flow
β β β βββ services/ # Automation-specific services
β β β βββ workflows/# Workflow-specific pages
β β β βββ builder/ # Visual workflow builder
β β βββ archetypes/ # Archetype pages
β β βββ sources/ # Data source pages
β βββ api/ # API routes
β β βββ agents/ # AI agents endpoints
β β βββ archetypes/ # Archetypes endpoints
β β βββ auth/ # Authentication endpoints
β β βββ automations/ # Automations endpoints
β β βββ metrics/ # Metrics and analytics endpoints
β β βββ reports/ # Reports endpoints
β β βββ seed/ # Database seeding endpoints
β β βββ sources/ # Data sources endpoints
β β βββ workflows/ # Workflows endpoints
β βββ auth/ # Authentication pages
β β βββ page.tsx # Login/signup page
β βββ dev/ # Developer tools pages
β βββ page.tsx # Developer home page
β βββ tools/ # Development utilities
β
βββ components/ # Reusable UI components
β βββ animated-background.tsx # Background animation component
β βββ hydration-boundary.tsx # React hydration boundary component
β βββ index.ts # Component exports
β βββ web-vitals-tracker.tsx # Performance metrics tracking
β βββ common/ # Common components
β β βββ layout/ # Layout components
β β βββ navigation/ # Navigation components
β β βββ patterns/ # UI design patterns
β β βββ ui/ # UI primitives (shadcn/ui)
β βββ generated-bg/ # Background graphics generators
β β βββ box.ts
β β βββ c-shape.ts
β β βββ generated-bg.tsx
β β βββ hexagon.ts
β β βββ l-shape.ts
β β βββ platform.ts
β β βββ pyramid.ts
β β βββ sacred.ts
β β βββ stepped.ts
β β βββ t-shape.ts
β β βββ u-shape.ts
β β βββ zigzag.ts
β βββ interactive-background/ # Interactive background components
β βββ interactive-background.tsx
β
βββ constants/ # Application constants
β βββ connection-icons.ts # Icons for connection types
β
βββ hooks/ # Custom React hooks
β βββ index.ts
β βββ useAutomations.tsx # Automation-specific hooks
β
βββ lib/ # Utilities and services
β βββ auth.ts # Authentication utilities
β βββ db.ts # Database utilities
β βββ utils.ts # General utilities
β βββ api/ # API client and endpoints
β β βββ client.ts
β β βββ endpoints.ts
β βββ db/ # Database client and operations
β β βββ client.ts
β β βββ index.ts
β β βββ mock-data.ts
β β βββ mock-db.ts
β β βββ operations.ts
β β βββ schema.ts
β β βββ mock-data/ # Structured mock data
β βββ hooks/ # Library-specific hooks
β β βββ useApiContent.tsx
β β βββ useDataContent.tsx
β β βββ useFastRefreshState.ts
β β βββ useIsMobile.ts
β βββ mock-data/ # Mock data for development
β β βββ automations.ts
β β βββ helpers.ts
β β βββ inbound-call-center.ts
β β βββ index.ts
β β βββ outbound-call-center.ts
β β βββ reports.ts
β β βββ sources.ts
β β βββ types.ts
β β βββ workflow-templates.ts
β βββ services/ # Business logic services
β β βββ dashboard-service.ts
β βββ utils/ # Utility functions
β βββ fast-refresh.ts
β βββ index.ts
β βββ random.ts
β βββ refresh-dev-tools.ts
β
βββ providers/ # React context providers
β βββ query-provider.tsx
β
βββ services/ # Global business logic services (top-level)
β
βββ styles/ # Global styles
β βββ _globals.css
β βββ animations.css
β βββ base.css
β βββ components.css
β βββ tailwind.css
β βββ theme.css
β βββ utilities.css
β
βββ types/ # TypeScript type definitions
βββ agent.d.ts # AI agent types
βββ archetype.d.ts # Archetype data model types
βββ automation.d.ts # Automation process types
βββ charts.d.ts # Chart and visualization types
βββ common.d.ts # Shared type definitions
βββ dashboard.d.ts # Dashboard layout and data types
βββ forecast.d.ts # Forecasting types
βββ index.ts # Type exports
βββ report.d.ts # Reporting types
βββ schedule.d.ts # Scheduling types
βββ source.d.ts # Data source types
βββ user.d.ts # User and authentication types
βββ workflow.d.ts # Workflow types
The project follows these organization principles:
- Page-Centric Structure: Each page in the
app/
directory represents a route in the application - Component Reuse: Common components in
components/common/
are extensively used across different page sections - Feature Isolation: Each feature (dashboards, reports, automations, etc.) has its own directory with page-specific components
- Separation of Concerns: UI components are separate from business logic (in hooks and services)
- Module Organization: Feature-specific components are organized within their respective module directories (e.g.,
automations/_common/
)
This structure allows for:
- Clear separation between pages and reusable components
- Efficient component reuse across different sections
- Easy navigation between related files
- Scalable organization as more features are added
- Feature-specific components kept close to their usage
- Node.js (v18.0.0 or higher)
- pnpm (v8.0.0 or higher)
- PostgreSQL (v14 or higher)
- Clone the repository:
git clone https://github.com/your-org/vi-operate-console.git
cd vi-operate-console
- Copy the
.env.example
file to.env
and update the values:
cp .env.example .env
- Install dependencies:
pnpm install
- Set up the database:
pnpm db:setup
- Start the development server:
pnpm dev
You should now be able to access the application at http://localhost:3000.
feature/
: New features or enhancementsfix/
: Bug fixesdocs/
: Documentation changesrefactor/
: Code refactoringtest/
: Adding or modifying tests
We use several tools to ensure code quality:
# Run ESLint
pnpm lint
# Run TypeScript type checking
pnpm type-check
# Format code with Prettier
pnpm format
# Run all checks
pnpm validate
We use husky and lint-staged to run code quality checks before each commit.
The following environment variables are required:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/vi_operate
# Authentication
AUTH_SECRET=your-auth-secret
NEXTAUTH_URL=http://localhost:3000
# External APIs
API_KEY=your-api-key
For a complete list, see .env.example
.
The easiest way to deploy the application is with Vercel:
- Push your code to a GitHub repository
- Import the project in Vercel
- Configure the environment variables
- Deploy
For manual deployment:
# Build the application
pnpm build
# Start the production server
pnpm start
We use Vitest for unit and integration tests:
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverage
- Database connection errors: Ensure your PostgreSQL server is running and the
DATABASE_URL
is correct - Authentication issues: Check that
AUTH_SECRET
andNEXTAUTH_URL
are properly configured - Build failures: Make sure all dependencies are installed with
pnpm install
For more help, check the issue tracker.
- Q2 2025: Multi-channel forecasting capabilities
- Q3 2025: Advanced AI-driven scheduling optimization
- Q4 2025: Integration with workforce management systems
We welcome contributions! Please see our Contributing Guide for more details.
This project is licensed under the MIT License.