A monorepo containing a React frontend (UAI client) and two Node.js backend APIs (UAI server and a database API).
uai-demo/
├── apps/
│ ├── frontend/ # React frontend app (UAI client)
│ ├── uai-server/ # LLM + MCP server API (UAI server)
│ └── api-db/ # Database API (API-DB)
└── packages/ # Shared packages (if needed)
- Node.js >= 18.0.0
- npm >= 9.0.0
npm installRun all apps in development mode:
npm run devThis will start:
- Frontend: http://localhost:5173 (or configured port)
- UAI-Server: http://localhost:3001
- API-DB: http://localhost:3002
Build all apps:
npm run build- Copy
.env.exampleto.envin the root directory - Configure environment variables for each app as needed
- Each app can also have its own
.envfile
This monorepo is configured for Vercel deployment. Each app will be deployed as a separate service.
- Connect your repository to Vercel
- Vercel will automatically detect the monorepo structure
- Configure each app in
vercel.jsonor through Vercel dashboard
React application built with UAI Client. Connects to both backend APIs.
Tech Stack:
- React 18
- Vite
- TypeScript
Endpoints:
- Development: http://localhost:5173
Node.js API for interacting with LLMs using Vercel AI SDK and MCP servers.
Tech Stack:
- Express
- Vercel AI SDK
- TypeScript
Endpoints:
- Health:
GET /health - LLM Chat:
POST /api/llm/chat - MCP Execute:
POST /api/mcp/execute - MCP Tools:
GET /api/mcp/tools
Development: http://localhost:3001
Node.js API for database operations.
Tech Stack:
- Express
- TypeScript
- (Database ORM to be added - Prisma/Drizzle recommended)
Endpoints:
- Health:
GET /health - Users:
GET /api/users - Create User:
POST /api/users - Get User:
GET /api/users/:id - Update User:
PUT /api/users/:id - Delete User:
DELETE /api/users/:id
Development: http://localhost:3002
uai-demo/
├── apps/
│ ├── frontend/ # React frontend
│ │ ├── src/
│ │ │ ├── App.tsx
│ │ │ ├── main.tsx
│ │ │ └── index.css
│ │ ├── package.json
│ │ ├── vite.config.ts
│ │ └── vercel.json
│ ├── uai-server/ # LLM + MCP API
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ └── routes/
│ │ │ ├── llm.ts
│ │ │ └── mcp.ts
│ │ ├── package.json
│ │ └── vercel.json
│ └── api-db/ # Database API
│ ├── src/
│ │ ├── index.ts
│ │ └── routes/
│ │ └── db.ts
│ ├── package.json
│ └── vercel.json
├── packages/ # Shared packages (future)
├── package.json # Root workspace config
├── turbo.json # Turborepo config
├── tsconfig.json # Root TypeScript config
├── vercel.json # Vercel monorepo config
└── README.md
-
Install Dependencies:
npm install
-
Set Up Environment Variables:
- Create
.envfiles in each app directory - See
.env.examplefor reference (create this file if needed)
- Create
-
Configure APIs:
- UAI-Server: Add your LLM provider SDK (e.g.,
@ai-sdk/openai) - API-DB: Add your database ORM (e.g., Prisma, Drizzle)
- UAI-Server: Add your LLM provider SDK (e.g.,
-
Start Development:
npm run dev
-
Deploy to Vercel:
- See
DEPLOYMENT.mdfor detailed instructions
- See
npm run dev- Start all apps in development modenpm run build- Build all appsnpm run lint- Lint all appsnpm run type-check- Type check all appsnpm run clean- Clean build artifacts