Skip to content

vi-technologies/vi-operate-console

Repository files navigation

Vi Operate Console Logo

Vi Operate Console

Advanced AI-powered workforce management and forecasting platform

Built with Next.js Language TypeScript UI Shadcn/UI Deployed on Vercel

πŸ“‹ Contents

πŸ” Overview

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.

Target Users

  • 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

Key Value Propositions

  • 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

✨ Features

  • 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

πŸ› οΈ Tech Stack

  • 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

🧩 Key Concepts

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

Navigation Structure

  • 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

πŸ“Έ Screenshots

πŸ“ File Structure

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

Component Organization

The project follows these organization principles:

  1. Page-Centric Structure: Each page in the app/ directory represents a route in the application
  2. Component Reuse: Common components in components/common/ are extensively used across different page sections
  3. Feature Isolation: Each feature (dashboards, reports, automations, etc.) has its own directory with page-specific components
  4. Separation of Concerns: UI components are separate from business logic (in hooks and services)
  5. 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

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/your-org/vi-operate-console.git
cd vi-operate-console
  1. Copy the .env.example file to .env and update the values:
cp .env.example .env
  1. Install dependencies:
pnpm install
  1. Set up the database:
pnpm db:setup
  1. Start the development server:
pnpm dev

You should now be able to access the application at http://localhost:3000.

πŸ’» Development Workflow

Branch Naming Convention

  • feature/: New features or enhancements
  • fix/: Bug fixes
  • docs/: Documentation changes
  • refactor/: Code refactoring
  • test/: Adding or modifying tests

Code Quality Checks

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

Pre-commit Hooks

We use husky and lint-staged to run code quality checks before each commit.

πŸ” Environment Variables

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.

πŸ“¦ Deployment

Vercel Deployment

The easiest way to deploy the application is with Vercel:

  1. Push your code to a GitHub repository
  2. Import the project in Vercel
  3. Configure the environment variables
  4. Deploy

Manual Deployment

For manual deployment:

# Build the application
pnpm build

# Start the production server
pnpm start

πŸ§ͺ Testing

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

❓ Troubleshooting

Common Issues

  • Database connection errors: Ensure your PostgreSQL server is running and the DATABASE_URL is correct
  • Authentication issues: Check that AUTH_SECRET and NEXTAUTH_URL are properly configured
  • Build failures: Make sure all dependencies are installed with pnpm install

For more help, check the issue tracker.

πŸ—ΊοΈ Roadmap

  • Q2 2025: Multi-channel forecasting capabilities
  • Q3 2025: Advanced AI-driven scheduling optimization
  • Q4 2025: Integration with workforce management systems

πŸ‘₯ Contributing

We welcome contributions! Please see our Contributing Guide for more details.

πŸ“„ License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published