Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงช BenchMate - AI-Powered Protocol Builder & Executor

"Dictate, not click. Automate, not babysit."

BenchMate is a modern protocol management system for laboratories. Built with Next.js and Fastify, it enables scientists to create, manage, and execute protocols โ€” with a roadmap toward voice-first and AI-assisted workflows.

๐ŸŒŸ Current Features

  • ๐Ÿ“‹ Protocol Management: Create, list, and view lab protocols with full CRUD API
  • ๐Ÿ—„๏ธ Rich Data Model: Protocols with steps, materials, equipment, runs, and device events
  • โšก Redis Caching: Intelligent caching layer for fast protocol reads
  • ๐Ÿ“– Auto-Generated API Docs: Interactive Swagger UI at /documentation
  • ๐Ÿ”Œ MCP Server Ready: Model Context Protocol SDK integrated for future AI tooling

๐Ÿ”ญ Vision

BenchMate is being built toward a voice-first, AI-assisted lab experience:

  • ๐ŸŽค Voice-First Protocol Creation: Speak your protocol naturally and let AI structure it
  • ๐Ÿค– AI Protocol Parser: Import protocols from papers, PDFs, or natural language
  • โšก Automated Execution: Device telemetry automatically checks off completed steps
  • ๐Ÿ“Š Real-time Dashboard: Monitor protocol execution with live device status
  • ๐Ÿ”Œ Device Integration: Connect lab equipment via webhooks, MQTT, or vendor APIs
  • ๐Ÿ“ฑ Offline Support: Execute protocols even without internet connection (PWA)

๐Ÿ—๏ธ Architecture

graph TB
    Browser["๐ŸŒ Browser"] --> Frontend

    subgraph Frontend["Next.js Frontend (Port 3000)"]
        Pages["Pages & Server Components"]
        TanStack["TanStack Query"]
    end

    Frontend --> API

    subgraph API["Fastify API (Port 3001)"]
        REST["REST API + Swagger UI"]
        Cache["Redis Cache Layer"]
        ORM["Prisma ORM"]
    end

    API --> DB["๐Ÿ˜ PostgreSQL 16\n(Protocols, Steps, Users)"]
    API --> Redis["โšก Redis 7\n(Caching)"]
Loading

๐Ÿ“ฆ Monorepo Structure

/benchmate
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ web/                 # Next.js frontend (App Router)
โ”‚   โ””โ”€โ”€ api/                 # Fastify API service
โ”œโ”€โ”€ packages/
โ”‚   โ””โ”€โ”€ shared/              # Shared TypeScript types
โ”œโ”€โ”€ docker-compose.yml       # Local development services
โ”œโ”€โ”€ turbo.json               # Turborepo configuration
โ””โ”€โ”€ pnpm-workspace.yaml      # pnpm workspace configuration

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 20+
  • pnpm 8+ (install: npm install -g pnpm)
  • Docker & Docker Compose (for PostgreSQL and Redis)

Installation

  1. Clone the repository

    git clone https://github.com/horner/benchmate.git
    cd benchmate
  2. Install dependencies

    pnpm install
  3. Start infrastructure services

    docker compose up -d
  4. Set up environment variables

    cp apps/web/.env.example apps/web/.env.local
    cp apps/api/.env.example apps/api/.env
  5. Start development servers

    pnpm dev

Access Points

๐Ÿ› ๏ธ Development Commands

# Start all apps in development mode
pnpm dev

# Start only frontend
pnpm --filter @benchmate/web dev

# Start only API
pnpm --filter @benchmate/api dev

# Build all apps
pnpm build

# Run linters
pnpm lint

# Format code
pnpm format

# Database commands (from apps/api)
cd apps/api
pnpm db:push          # Push schema to database
pnpm db:migrate       # Run migrations
pnpm db:studio        # Open Prisma Studio

๐Ÿ“š Technology Stack

Frontend (Next.js)

  • Next.js 16 - React framework with App Router
  • React 19 - UI library
  • TypeScript - Type safety
  • Tailwind CSS - Utility-first styling
  • TanStack Query - Server state and data fetching

API (Fastify)

  • Fastify 5+ - High-performance API framework
  • @fastify/swagger - Auto-generated OpenAPI documentation
  • TypeBox - Schema validation with automatic type generation
  • Prisma 6 - Type-safe database ORM
  • ioredis - Redis client for caching
  • @modelcontextprotocol/sdk - MCP server for AI integration

Infrastructure

  • PostgreSQL 16 - Primary database
  • Redis 7 - Caching layer
  • Docker Compose - Local development environment

๐Ÿ“– Documentation

๐Ÿ—บ๏ธ Roadmap

โœ… Phase 1: Foundation

  • Monorepo setup with Turborepo
  • Next.js frontend scaffolding
  • Fastify API with Swagger
  • Docker Compose for local development

โœ… Phase 2: Database & API Foundation

  • Full database schema with Prisma (12 models)
  • Protocol CRUD REST API
  • Redis caching layer
  • TypeBox schema validation
  • Seed script for sample data

โœ… Phase 3: Protocol Listing UI

  • Protocol list page
  • Protocol detail page
  • New protocol form
  • TanStack Query integration

๐Ÿšง Phase 4: Voice & AI (Planned)

  • Voice input integration
  • AI protocol parser
  • Protocol import from text/PDF
  • Smart suggestions and auto-complete

๐Ÿ“… Phase 5: Execution Engine (Planned)

  • Protocol run tracking
  • Real-time execution dashboard
  • Timer and manual completion modes
  • Voice command execution control

๐Ÿ”ฎ Phase 6: Device Integration (Planned)

  • Webhook receiver for device events
  • Device registration and mapping
  • Auto-completion triggers
  • Real-time event visualization

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guidelines before submitting PRs.

๐Ÿ“„ License

MIT License

๐Ÿ™ Acknowledgments


Built with โค๏ธ for scientists who deserve better tools

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages