A modern full-stack TypeScript monorepo with end-to-end type safety, using Bun, Effect, Vite, and React. Heavily inspired by the bhvr stack but the addition of Effect and Turborepo. Includes a Model Context Protocol (MCP) server for AI assistant integrations.
- End-to-end TypeScript: Full type safety from client to server
- Shared Domain: Common types and utilities across all apps
- Effect Integration: Built for composable, functional programming with Effect
- MCP Server: Model Context Protocol server for AI assistant tools and resources
- Modern Tooling: Turborepo, Bun, Vite, and React
- Zero Config: Pre-configured Ultracite for linting and formatting with Biome
- Flexible Deployment: Deploy anywhere without vendor lock-in
# Install dependencies
bun install
# Start development
bun dev
# Build for production
bun build
Format and lint the codebase using Ultracite:
# Format code
bun format
# Lint code
bun lint
# Type check
bun type-check
.
├── apps/
│ ├── client/ # React frontend (Vite + React)
│ ├── server/ # Bun + Effect backend API
│ └── server-mcp/ # Model Context Protocol server
├── packages/
│ ├── config-typescript/ # TypeScript configurations
│ └── domain/ # Shared Schema definitions
├── docker-compose.yaml # Docker Compose configuration for deployment
├── package.json # Root package.json with workspaces
└── turbo.json # Turborepo configuration
App | Description |
---|---|
client |
A React app built with Vite |
server |
A Effect Platform backend API |
server-mcp |
A Model Context Protocol server built with Effect |
Package | Description |
---|---|
@repo/config-typescript |
TypeScript configurations used throughout the monorepo |
@repo/domain |
Shared Schema definitions using Effect Schema used by both client and server |
# Start development server
bun dev
# Run specific app
bun dev --filter=client
bun dev --filter=server
bun dev --filter=server-mcp
# Build all apps
bun run build
# Test MCP server functionality
bun inspector --filter=server-mcp
To run the application using Docker, you can use the provided
docker-compose.yaml
file.
First, ensure you have Docker and Docker Compose installed on your system.
Then, run the following command to build and start the services in the background:
docker-compose up -d --build
This will start all three services: client
, server
, and server-mcp
.
You can configure the deployment using environment variables:
# Example .env file
CLIENT_PORT=3000
SERVER_PORT=8000
MCP_PORT=9009
Import shared types from the domain package:
import { ApiResponse } from "@repo/domain";