This project was created with Better-T-Stack, a modern TypeScript stack that combines React, TanStack Router, Hono, ORPC, and more.
- TypeScript - For type safety and improved developer experience
- TanStack Router - File-based routing with full type safety
- TailwindCSS - Utility-first CSS for rapid UI development
- shadcn/ui - Reusable UI components
- Hono - Lightweight, performant server framework
- oRPC - End-to-end type-safe APIs with OpenAPI integration
- Bun - Runtime environment
- Drizzle - TypeScript-first ORM
- PostgreSQL - Database engine
- Authentication - Better-Auth
- Turborepo - Optimized monorepo build system
First, install the dependencies:
bun installThis project uses PostgreSQL with Drizzle ORM.
-
Make sure you have a PostgreSQL database set up.
-
Update your
apps/server/.envfile with your PostgreSQL connection details. -
Apply the schema to your database:
bun db:pushThen, run the development server:
bun devOpen http://localhost:3001 in your browser to see the web application. The API is running at http://localhost:3000.
viral/
├── apps/
│ ├── web/ # Frontend application (React + TanStack Router)
│ └── server/ # Backend API (Hono, ORPC)
bun dev: Start all applications in development modebun build: Build all applicationsbun dev:web: Start only the web applicationbun dev:server: Start only the serverbun check-types: Check TypeScript types across all appsbun db:push: Push schema changes to databasebun db:studio: Open database studio UIbun dev:mastra: Start Mastra development playground/dashboardbun dev:inngest: Start Inngest development server
This project integrates Mastra for AI agent and workflow development. When running locally, you have access to powerful development tools:
The Mastra playground provides an interactive development environment for testing agents, workflows, and tools:
bun run dev:mastraThen visit: http://localhost:4111/ (Mastra Playground/Dashboard)
Features:
- Agent Chat Interface: Interactive testing of AI agents
- Workflow Visualizer: See workflow execution flow and debug steps
- Tool Testing: Test individual tools in isolation
- API Explorer: Swagger UI for all Mastra endpoints
- Real-time Monitoring: Live execution tracking and traces
Your Hono server also exposes Mastra functionality via REST APIs:
GET /api/agents- List available agentsGET /api/workflows- List available workflowsPOST /api/agents/{agentId}/generate- Run agentsPOST /api/workflows/{workflowId}/execute- Execute workflows