This repository is a monorepo for the Tambo Cloud platform. Contribute to this repo to modify how Tambo's hosted API works, or use this repo to run Tambo locally for development or self-hosting.
To build AI web applications that use Tambo's hosted API, use our React SDK.
For detailed information about what Tambo is and how it works, check out our docs site.
For a quick walkthrough of using the fundamental features of Tambo, check out this page.
The repository is organized into two main directories:
The main applications are located in the apps directory:
- web - The Next.js frontend application, including the landing page and project dashboard
- api - The NestJS API server, including Swagger UI documentation and API routes
Reusable libraries are located in the packages directory:
- backend - A library for interacting with the LLM
- @tambo-ai-cloud/core - A library for basic shared utilities/etc.
- @tambo-ai-cloud/db - A library for interacting with the database. This is mostly the drizzle schema and migrations.
There also are some basic supporting packages only used during development:
- eslint-config - ESLint configurations for the project, with specific configs for Next.js apps and libraries
- typescript-config - TypeScript configurations with specific settings for Next.js apps and libraries
- Frontend: Next.js, React, TypeScript, Tailwind CSS, Shadcn UI
- Backend: NestJS, TypeScript, Swagger
- Database: PostgreSQL, Drizzle ORM
- Infrastructure: Docker with PostgreSQL for local development
- Tools: Turborepo for monorepo management
When a new customer requests a dedicated support channel Tambo Cloud:
- Creates a public channel (
conversations.create
) - Invites the customer’s email (
conversations.inviteShared
) - Adds an internal teammate (
conversations.invite
)
By default Slack grants invited external users a limited role, which prevents
them from inviting additional teammates.
We now explicitly set external_limited: false
so customers receive full-access
rights and can manage their own members.
To allow this, the Slack bot token (SLACK_OAUTH_TOKEN
) must include the
conversations.connect:write
OAuth scope in addition to the scopes you already
use (e.g. channels:manage
, chat:write
).
Generate or update the token in your Slack app settings, then place it in
apps/web/.env.local
(see .env.example
).
# Setup the Docker environment
./scripts/tambo-setup.sh
# Edit the created docker.env with your actual values
# Start the stack
./scripts/tambo-start.sh
# Initialize the database
./scripts/init-database.sh
The setup script will:
- Check and install prerequisites (Docker, Docker Compose, jq)
- Create environment files from templates
- Make all scripts executable
Find detailed instructions on running Tambo through Docker here.
- Docker and Docker Compose
- Node.js (v22 or later) and npm (for database initialization)
- jq command-line tool (for health checks)
If you prefer to set things up manually, follow these steps:
-
Install Dependencies:
npm install
-
Environment Setup:
Create
.env
files in the following locations using their respective.env.example
templates:apps/api/.env
apps/web/.env.local
packages/db/.env
-
Database Setup:
# Start PostgreSQL locally (requires Docker) ./scripts/tambo-start.sh # Initialize the database ./scripts/init-database.sh
Note: The Docker stack runs on different ports to avoid conflicts with local development:
- Docker Web: http://localhost:3210 (vs local:3000)
- Docker API: http://localhost:3211 (vs local:3001)
- Docker PostgreSQL: localhost:5433 (vs local:5432)
-
Start Development Server:
npm run dev
npm run dev
- Runs the API and web apps in development modenpm run build
- Builds all applicationsnpm run hydra-api:start
- Starts the API server in production modenpm run lint
- Runs linting across all applicationsnpm run lint:fix
- Runs linting with automatic fixesnpm run format
- Formats code using Prettiernpm run prettier-check
- Checks formatting without making changesnpm run check-types
- Checks TypeScript types across all applications
npm run db:generate
- Generates SQL migrations based on schema changesnpm run db:migrate
- Applies pending migrations to the databasenpm run db:check
- Checks migration statusnpm run db:studio
- Opens Drizzle Studio for database visualization
You can also use Turborepo directly:
turbo dev # Development mode
turbo build # Build all packages
turbo lint # Lint all packages
After setting up your local environment, configure your Tambo API key:
-
Start your local environment:
npm run dev
-
Get your API key:
- Visit:
http://localhost:3000/dashboard
- Login with your credentials
- Create a new project
- Generate your API key
- Visit:
-
Configure the API key:
- Add the key to
apps/web/.env.local
:
NEXT_PUBLIC_TAMBO_API_KEY=your_generated_key_here
- Add the key to
-
Verify your setup:
- Visit:
http://localhost:3000/internal/smoketest
- Visit:
The landing page and dashboard are built with:
- Next.js - React framework
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Shadcn UI - Beautiful UI components