Skip to content

het2576/Covalence-Ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Covalence AI⚑ - Enterprise Data Assistant

A stunning, production-ready MVP that combines BI analytics, document search, and role-based AI assistance in one elegant interface. Built for hackathons and enterprise demos.

πŸš€ Features

🎯 Core Functionality

  • AI-Powered Chat Interface: Natural language queries across all data sources
  • Role-Based Access Control: Admin, Manager, Analyst, and Intern permissions
  • Multi-Modal Responses: Interactive tables, charts, document summaries, and image previews
  • Real-Time Analytics: Live dashboard with query metrics and user activity
  • Admin Panel: Dataset management, user administration, and activity logs

🎨 Design Excellence

  • Glassmorphic UI: Modern design with backdrop blur effects and soft gradients
  • Smooth Animations: Framer Motion powered transitions and micro-interactions
  • Responsive Design: Optimized for desktop and mobile devices
  • Professional Color Palette: Blue/purple gradient theme with excellent contrast

πŸ”§ Technical Stack

  • Frontend: React 18, TypeScript, Tailwind CSS, Framer Motion
  • Backend: Supabase (PostgreSQL, Auth, Real-time)
  • Charts: Recharts for beautiful data visualizations
  • Icons: Lucide React for consistent iconography
  • Authentication: Email/password with role-based permissions

πŸ—οΈ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Supabase account (free tier works)

Setup Instructions

  1. Clone and Install

    git clone <repository-url>
    cd covalence-ai
    npm install
  2. Configure Supabase

    • Create a new Supabase project
    • Copy .env.example to .env
    • Add your Supabase URL and anon key
  3. Set Up Database

    -- Create profiles table
    CREATE TABLE profiles (
      id UUID PRIMARY KEY REFERENCES auth.users(id),
      email TEXT UNIQUE NOT NULL,
      full_name TEXT NOT NULL,
      role TEXT CHECK (role IN ('admin', 'manager', 'analyst', 'intern')) NOT NULL,
      created_at TIMESTAMPTZ DEFAULT NOW()
    );
    
    -- Enable RLS
    ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;
    
    -- Create policies
    CREATE POLICY "Users can read own profile" ON profiles
      FOR SELECT USING (auth.uid() = id);
    
    CREATE POLICY "Users can update own profile" ON profiles
      FOR UPDATE USING (auth.uid() = id);
  4. Start Development

    npm run dev

Demo Accounts

For quick testing, you can create these demo accounts:

πŸŽͺ Hackathon Demo Script

🎬 Opening Hook (30 seconds)

"Enterprise employees waste 2.5 hours daily searching for data across disconnected systems. What if they could just ask questions in plain English and get instant, role-appropriate answers?"

πŸ” Problem Statement (1 minute)

  • Data silos across departments
  • Complex SQL/BI tools require training
  • Security concerns with data access
  • Slow time-to-insights

πŸ’‘ Solution Demo (3 minutes)

  1. Role-Based Intelligence

    • Show different user roles getting filtered results
    • Demonstrate security controls in action
  2. Multi-Modal AI Responses

    • SQL query β†’ Interactive table with trends
    • Document search β†’ Smart summary card
    • Analytics request β†’ Dynamic charts
  3. Enterprise-Ready Features

    • Admin panel with dataset management
    • Real-time analytics dashboard
    • Activity logs and compliance tracking

πŸš€ Market Opportunity (1 minute)

  • $50B+ business intelligence market
  • 87% of companies struggle with data accessibility
  • Growing demand for conversational AI in enterprise

🎯 Competitive Advantage

Unlike generic AI assistants or traditional BI tools, Covalence AI uniquely combines:

  • Security-first architecture with role-based filtering
  • Multi-modal intelligence across structured and unstructured data
  • Beautiful, non-technical interface anyone can use
  • Enterprise-grade admin controls for compliance and governance

πŸ—οΈ Architecture

Frontend Structure

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ Auth/           # Authentication pages
β”‚   β”œβ”€β”€ Chat/           # Chat interface and responses
β”‚   β”œβ”€β”€ Analytics/      # Dashboard and metrics
β”‚   β”œβ”€β”€ Admin/          # Admin panel components
β”‚   β”œβ”€β”€ Layout/         # Sidebar and navigation
β”‚   β”œβ”€β”€ Settings/       # User preferences
β”‚   └── ui/             # Reusable UI components
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ auth.tsx        # Authentication context
β”‚   β”œβ”€β”€ supabase.ts     # Database client
β”‚   └── utils.ts        # Utility functions
└── App.tsx             # Main application

Key Features Implementation

πŸ” Role-Based Access Control

// Different data access based on user role
const filterDataByRole = (data: any[], userRole: string) => {
  if (userRole === 'intern') {
    return data.filter(item => !item.sensitive)
  }
  return data // Full access for other roles
}

πŸ€– AI Response Types

  • Table: SQL query results with interactive sorting
  • Chart: Data visualizations using Recharts
  • Summary: Document analysis with confidence scores
  • Image: Media search with AI-generated captions

πŸ“Š Real-Time Analytics

  • Query volume tracking
  • Response time monitoring
  • User activity logs
  • Role-based usage patterns

πŸ› οΈ Customization

Adding New Data Sources

  1. Update the mockDatasets array in AdminPanel.tsx
  2. Implement data parsing logic for your format
  3. Add appropriate icons and styling

Custom AI Responses

  1. Extend the ChatResponse component
  2. Add new response types to the interface
  3. Implement rendering logic for your data format

Branding

  • Update colors in tailwind.config.js
  • Replace the logo and app name
  • Customize the gradient themes

πŸ“ˆ Production Deployment

Environment Variables

VITE_SUPABASE_URL=your_production_supabase_url
VITE_SUPABASE_ANON_KEY=your_production_anon_key
VITE_OPENAI_API_KEY=your_openai_api_key

Build for Production

npm run build
npm run preview

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™‹β€β™‚οΈ Support

For questions or support:

  • Create an issue on GitHub
  • Contact the development team
  • Check the documentation wiki

Built with ❀️ for the future of enterprise data interaction

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors