Skip to content

PlagueHO/prompt-babbler

Repository files navigation

Prompt Babbler

CI CD License Azure IaC

A speech-to-prompt web application that captures stream-of-consciousness speech, transcribes it using Azure AI Foundry, and generates structured prompts for target systems like GitHub Copilot.

Architecture

┌─────────────────────────┐     ┌──────────────────────────────────┐
│   React Frontend        │     │    .NET Backend API              │
│   (Vite + TS)           │────▶│    (ASP.NET Core)                │
│                         │     │                                  │
│  • Record speech        │     │  • POST /api/transcribe          │
│  • Manage babbles       │     │  • POST /api/prompts/generate    │
│  • Generate prompts     │     │  • GET/PUT /api/settings         │
│  • Manage templates     │     │  • POST /api/settings/test       │
│                         │     │                                  │
│  localStorage:          │     │  Azure AI Foundry:               │
│  babbles, templates     │     │  STT (gpt-4o-transcribe) + LLM   │
└─────────────────────────┘     └──────────────────────────────────┘
                  ▲                              │
                  │         .NET Aspire          │
                  └──────── (orchestration) ─────┘

Tech Stack

Layer Technology
Frontend React 19, TypeScript 5.9, Vite 8, Shadcn/UI, TailwindCSS v4, React Router 7
Backend .NET 10, ASP.NET Core, Clean Architecture
AI Services Azure AI Foundry (LLM chat + speech-to-text via Aspire integration)
Orchestration .NET Aspire (Azure AI Foundry provisioning via Aspire hosting integration)
Infrastructure Azure Bicep (Cognitive Services, RBAC)
Testing Vitest + Testing Library (frontend), MSTest SDK + FluentAssertions + NSubstitute (backend)
CI/CD GitHub Actions (12 workflows: CI, CD, IaC validation, linting, E2E)

Quick Start

See docs/QUICKSTART.md for detailed setup instructions.

Prerequisites

  • .NET SDK 10.0.100+
  • Node.js 22.x LTS
  • pnpm 10.x
  • Azure CLI (for Azure authentication)
  • Azure subscription with Contributor access

Run Locally

# Install dependencies
cd prompt-babbler-app && pnpm install && cd ..
cd prompt-babbler-service && dotnet restore PromptBabbler.slnx && cd ..

# Configure Azure credentials (one-time setup — see docs/QUICKSTART.md for details)
az login --tenant <your-tenant-id>
cd prompt-babbler-service
dotnet user-secrets set "Azure:SubscriptionId" "<your-subscription-id>" --project src/Orchestration/AppHost
dotnet user-secrets set "Azure:TenantId" "<your-tenant-id>" --project src/Orchestration/AppHost

# Start via Aspire (starts both backend and frontend)
cd prompt-babbler-service
dotnet run --project src/Orchestration/AppHost/PromptBabbler.AppHost.csproj

Note: On first run, Aspire automatically provisions an Azure resource group and Azure AI Foundry resources (chat + STT model deployments) in your subscription. This takes several minutes. Subsequent runs reuse existing resources.

Run Tests

# Backend — all tests
cd prompt-babbler-service
dotnet test --solution PromptBabbler.slnx

# Backend — unit tests only
dotnet test --solution PromptBabbler.slnx --filter "TestCategory=Unit"

# Frontend
cd prompt-babbler-app
pnpm test

Project Structure

prompt-babbler/
├── prompt-babbler-service/     # .NET backend (Clean Architecture)
│   ├── src/Api/                # ASP.NET Core API controllers
│   ├── src/Domain/             # Business models & interfaces
│   ├── src/Infrastructure/     # Azure OpenAI SDK, file settings
│   ├── src/Orchestration/      # Aspire AppHost + ServiceDefaults
│   └── tests/                  # Unit + integration tests
├── prompt-babbler-app/         # React frontend
│   ├── src/components/         # UI components
│   ├── src/hooks/              # Custom React hooks
│   ├── src/services/           # API client, localStorage
│   ├── src/pages/              # Page components
│   └── tests/                  # Vitest tests
├── .github/workflows/          # CI/CD pipelines (12 workflows)
├── specs/                      # Feature specifications
└── infra/                      # Azure Bicep infrastructure (Cognitive Services, RBAC)

License

MIT

About

A simple React app that converts voice-dictated stream-of-consciousness into structured prompts for various AI platforms.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors