Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PromptConductor

PromptConductor is an Enterprise Prompt Optimization platform built on Next.js, Firebase, and Google Cloud Platform. It uses Retrieval-Augmented Generation (RAG) via Vertex AI Search to dynamically fetch structural constraints for specific AI models, and leverages the Gemini SDK to rewrite and optimize user prompts in real time via Server-Sent Events (SSE).

Features

  • Streaming Architecture: Immediate, token-by-token prompt optimizations delivered via Next.js Route Handlers.
  • Dynamic Retrieval: Integrates with Vertex AI Search to inject model-specific constraints into the LLM orchestration flow.
  • Secure by Default: Protected by Firebase Authentication (Google OAuth), strict Firestore Security Rules, and Edge-level rate limiting.
  • Serverless Scaling: Built for deployment on Firebase App Hosting (Cloud Run), leveraging Application Default Credentials (ADC) for zero-trust IAM operations.

Documentation Overview

Comprehensive documentation is available in the docs/ directory:

Installation

Prerequisites

  • Node.js v18+
  • Firebase CLI (npm install -g firebase-tools)
  • A Google Cloud Platform project with the Vertex AI and Discovery Engine APIs enabled.

Local Development Setup

  1. Clone the repository:

    git clone <your-repo-url>
    cd promptconductor
  2. Install Dependencies:

    npm install
  3. Environment Configuration: Create a .env.local file in the root directory:

    # Firebase Web SDK Configuration
    NEXT_PUBLIC_FIREBASE_API_KEY="..."
    NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="..."
    NEXT_PUBLIC_FIREBASE_PROJECT_ID="..."
    NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="..."
    NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="..."
    NEXT_PUBLIC_FIREBASE_APP_ID="..."
    
    # Server-side GCP / Vertex AI Variables
    GCP_PROJECT_ID="newmum-copd-app-1234"
    VERTEX_DATA_STORE_ID="model-docs-datastore"
    VERTEX_SEARCH_ENGINE_ID="model-docs-search"
    
    # For local development bypasses (Mock Auth / Rate Limits)
    LOCAL_DEV_MODE="true"
    
    # GCP Service Account (Local Only - ADC is used in production)
    GCP_SA_KEY_PATH="./service-account.json"
  4. Start the Development Server:

    npm run dev

    Open http://localhost:3000 in your browser.

Deployment

This application is designed specifically for Firebase App Hosting.

  1. Ensure your public Firebase credentials and server-side keys are mapped in apphosting.yaml.
  2. Securely store your Gemini API Key in Google Cloud Secret Manager.
  3. Deploy via the Firebase CLI:
    firebase deploy --only apphosting

License

This project is proprietary and confidential.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages