Skip to content

wookingwoo/pinecone-dashboard

Repository files navigation

🚀 Pinecone Dashboard

Live Demo Next.js TypeScript Tailwind CSS

A comprehensive, modern web dashboard for managing Pinecone vector databases

Built for developers who need powerful vector database management with a beautiful, intuitive interface

🎬 Demo🛠️ Installation📖 API Reference🤝 Contributing


✨ Features

🗂️ Index Management

  • Create & Configure: Support for all Pinecone index types (Serverless, Pod-based)
  • Real-time Monitoring: Live status updates, capacity monitoring, and health checks
  • Multi-metric Support: Cosine, Euclidean, and Dot Product similarity metrics
  • Batch Operations: Efficient bulk index management

🔍 Advanced Vector Operations

  • Semantic Search: Execute similarity searches with custom vectors
  • Smart Filtering: JSON-based metadata filtering with complex conditions
  • Namespace Management: Organize and isolate your vector data
  • Export Capabilities: Download query results in multiple formats

📊 Analytics & Insights

  • Interactive Dashboards: Real-time charts powered by Recharts
  • Capacity Planning: Monitor index fullness and storage utilization
  • Distribution Analysis: Visualize vector distributions across namespaces
  • Performance Metrics: Track query performance and usage patterns

🎨 Developer Experience

  • Dark/Light Mode: Adaptive theming for comfortable development
  • Responsive Design: Works seamlessly across all devices
  • Type Safety: Full TypeScript support with comprehensive type definitions
  • Error Handling: Graceful error management with detailed feedback

🎬 Demo

📊 Analytics Dashboard

Pinecone Dashboard Demo

Real-time analytics showing index statistics, vector distributions, and namespace management

🚀 Live Demo

🌐 Try the Live Demo →

Experience the full functionality with your own Pinecone API key

📝 Note: You'll need to configure your Pinecone API key to access all features


🛠️ Technology Stack

Frontend

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript 5
  • Styling: Tailwind CSS 4
  • Components: React 19
  • Charts: Recharts
  • Icons: Lucide React

Backend

  • API: Next.js API Routes
  • Database: Pinecone Vector Database
  • Client: @pinecone-database/pinecone v6.1.2
  • Authentication: API Key based
  • Deployment: Vercel optimized

🚀 Quick Start

💡 Want to see it in action first? Check out the live demo or view the demo screenshot above!

Prerequisites

  • Node.js 18.0 or later
  • npm or yarn package manager
  • Pinecone account with API key (Get one here)

Installation

  1. Clone the repository

    git clone https://github.com/wookingwoo/pinecone-dashboard.git
    cd pinecone-dashboard
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Environment Setup

    Create .env.local file in the root directory:

    PINECONE_API_KEY=your_pinecone_api_key_here
  4. Start development server

    npm run dev
  5. Open your browser

    Navigate to http://localhost:3000


📖 API Reference

Core Endpoints

Endpoint Method Description Parameters
/api/indexes GET List all indexes -
/api/indexes POST Create new index name, dimension, metric
/api/indexes/[name] GET Get index stats includeValues?
/api/indexes/[name] DELETE Delete index -
/api/indexes/[name]/namespaces POST Create namespace namespaces[]
/api/indexes/[name]/namespaces DELETE Delete namespaces namespaces[], deleteAll?
/api/query POST Vector similarity search vector, topK, filter?, namespace?
/api/vectors POST Upsert/Fetch vectors vectors[], namespace?
/api/vectors DELETE Delete vectors ids[], namespace?

Request/Response Examples

Create Index
// POST /api/indexes
{
  "name": "my-index",
  "dimension": 1536,
  "metric": "cosine"
}

// Response
{
  "success": true,
  "index": {
    "name": "my-index",
    "dimension": 1536,
    "metric": "cosine",
    "status": "Initializing"
  }
}
Vector Query
// POST /api/query
{
  "indexName": "my-index",
  "vector": [0.1, 0.2, 0.3, ...],
  "topK": 10,
  "filter": {
    "category": "document",
    "year": {"$gte": 2020}
  },
  "includeMetadata": true
}

// Response
{
  "matches": [
    {
      "id": "doc-1",
      "score": 0.95,
      "metadata": {
        "title": "Document Title",
        "category": "document"
      }
    }
  ]
}

🏗️ Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   React Client  │────│  Next.js API    │────│  Pinecone API   │
│                 │    │                 │    │                 │
│  • Dashboard    │    │  • Authentication│    │  • Vector Ops   │
│  • Components   │    │  • Rate Limiting │    │  • Index Mgmt   │
│  • State Mgmt   │    │  • Error Handling│    │  • Analytics    │
└─────────────────┘    └─────────────────┘    └─────────────────┘

Project Structure

src/
├── app/                    # Next.js App Router
│   ├── api/               # API Routes
│   │   ├── indexes/       # Index management
│   │   ├── query/         # Vector queries
│   │   └── vectors/       # Vector operations
│   ├── globals.css        # Global styles
│   ├── layout.tsx         # Root layout
│   └── page.tsx           # Home page
├── components/            # React Components
│   ├── Dashboard.tsx      # Main dashboard
│   ├── IndexManager.tsx   # Index management
│   ├── QueryInterface.tsx # Query interface
│   ├── VectorSearch.tsx   # Vector operations
│   ├── Analytics.tsx      # Analytics dashboard
│   └── Settings.tsx       # Configuration
└── lib/                   # Utilities
    ├── api.ts            # API client
    ├── pinecone.ts       # Pinecone utilities
    └── pinecone-server.ts # Server-side client

🧪 Development

Scripts

# Development
npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint

# Type checking
npx tsc --noEmit     # TypeScript type check

Contributing Guidelines

  1. Fork the repository
  2. Create a 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

Code Style

  • Use TypeScript for all new code
  • Follow ESLint configuration
  • Write meaningful commit messages
  • Add JSDoc comments for public APIs
  • Ensure responsive design for UI changes

🚀 Deployment

Vercel (Recommended)

Deploy with Vercel

  1. Click the deploy button above
  2. Set your PINECONE_API_KEY environment variable (optional)
  3. Deploy!

Live Example: pinecone.ronny.dev

Manual Deployment

# Build the application
npm run build

# Start production server
npm start

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

📊 Usage Examples

Basic Index Operations

// Create a new index
const response = await fetch('/api/indexes', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'semantic-search',
    dimension: 1536,
    metric: 'cosine'
  })
});

Vector Search

// Perform similarity search
const searchResults = await fetch('/api/query', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    indexName: 'semantic-search',
    vector: embeddings,
    topK: 5,
    filter: { category: 'documentation' }
  })
});

🔧 Configuration

Pinecone Setup

  1. Create a Pinecone account
  2. Generate an API key from your dashboard
  3. Choose your preferred cloud region
  4. Set up your first index (or use the dashboard!)

Advanced Configuration

Custom Themes

Extend tailwind.config.js to customize the dashboard appearance:

module.exports = {
  theme: {
    extend: {
      colors: {
        primary: {
          50: '#eff6ff',
          500: '#3b82f6',
          900: '#1e3a8a',
        }
      }
    }
  }
}
API Rate Limiting

Configure rate limiting in your API routes:

// Implement in your API middleware
const rateLimit = {
  windowMs: 15 * 60 * 1000, // 15 minutes
  max: 100 // limit each IP to 100 requests per windowMs
};

🤝 Contributing

We welcome contributions! Here's how you can help:

🐛 Bug Reports

  • Use the issue template
  • Include steps to reproduce
  • Provide environment details

💡 Feature Requests

🔧 Pull Requests

  • Read our contributing guide
  • Follow the code style guidelines
  • Add tests for new features
  • Update documentation

🙏 Acknowledgments

  • Pinecone - For the amazing vector database platform
  • Vercel - For the excellent hosting and deployment experience
  • Next.js Team - For the powerful React framework
  • Tailwind CSS - For the utility-first CSS framework
  • Open Source Community - For inspiration and contributions

📄 License

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


🔗 Links


Made with ❤️ by wookingwoo

Star ⭐ this repository if you find it helpful!

GitHub stars GitHub forks

About

A modern web dashboard for managing Pinecone vector databases, providing intuitive UI, vector operations, and real-time insights.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors