"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.
- ๐ 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
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)
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)"]
/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
- Node.js 20+
- pnpm 8+ (install:
npm install -g pnpm) - Docker & Docker Compose (for PostgreSQL and Redis)
-
Clone the repository
git clone https://github.com/horner/benchmate.git cd benchmate -
Install dependencies
pnpm install
-
Start infrastructure services
docker compose up -d
-
Set up environment variables
cp apps/web/.env.example apps/web/.env.local cp apps/api/.env.example apps/api/.env
-
Start development servers
pnpm dev
- Frontend: http://localhost:3000
- API: http://localhost:3001
- API Documentation: http://localhost:3001/documentation
- PostgreSQL: localhost:5432 (user: benchmate, password: benchmate_dev_password)
- Redis: localhost:6379
# 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- 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
- 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
- PostgreSQL 16 - Primary database
- Redis 7 - Caching layer
- Docker Compose - Local development environment
- API Documentation - Interactive Swagger UI
- Architecture Decision Records - Coming soon
- Contributing Guidelines - Coming soon
- Monorepo setup with Turborepo
- Next.js frontend scaffolding
- Fastify API with Swagger
- Docker Compose for local development
- Full database schema with Prisma (12 models)
- Protocol CRUD REST API
- Redis caching layer
- TypeBox schema validation
- Seed script for sample data
- Protocol list page
- Protocol detail page
- New protocol form
- TanStack Query integration
- Voice input integration
- AI protocol parser
- Protocol import from text/PDF
- Smart suggestions and auto-complete
- Protocol run tracking
- Real-time execution dashboard
- Timer and manual completion modes
- Voice command execution control
- Webhook receiver for device events
- Device registration and mapping
- Auto-completion triggers
- Real-time event visualization
Contributions are welcome! Please read our Contributing Guidelines before submitting PRs.
- Inspired by SciNote for protocol management
- Built with Model Context Protocol (MCP) for AI integration
- Powered by Next.js and Fastify
Built with โค๏ธ for scientists who deserve better tools