Skip to content

Repository files navigation

Unibot from Belweave

A multi-provider LLM chat interface built with Next.js 16 that connects to AWS Bedrock, OpenAI, and OpenRouter. The application features real-time streaming responses, configurable model selection, and a modern, curve-focused UI design following shadcn/ui best practices.

Tech Stack

  • Framework: Next.js 16 (App Router)
  • Database: PostgreSQL with Prisma ORM
  • UI Components: shadcn/ui
  • Styling: Tailwind CSS 4
  • AI Backends: AWS Bedrock, OpenAI, OpenRouter
  • Language: TypeScript
  • Icons: Lucide React
  • Design System: Custom design tokens with comprehensive documentation

Features

  • Google OAuth Authentication - Secure sign-in with Google accounts
  • Real-time streaming responses from multiple LLM providers
  • Multi-provider support - AWS Bedrock, OpenAI, and OpenRouter
  • Configurable model selection - Switch between providers and models via settings
  • Image support - Send images with vision-capable models (Claude 3.5 Sonnet, GPT-4o, etc.)
  • Modern UI - Curved, friendly interface with smooth animations
  • Dark/Light mode - System-aware theme with manual toggle
  • Design system - Comprehensive design tokens for consistent styling

Design Documentation

This project includes a comprehensive design system:

Prerequisites

  • Bun 1.3.5 or higher
  • Docker and Docker Compose (for local PostgreSQL)
  • AWS Account with Bedrock access (if using Bedrock)
  • AWS credentials configured (see AWS Configuration below)
  • Google Cloud Platform account for OAuth (see Authentication Setup below)
  • OpenAI API key (if using OpenAI)
  • OpenRouter API key (if using OpenRouter)

Database Setup

1. Start PostgreSQL with Docker

docker compose up -d

This starts a PostgreSQL 17 container with:

  • User: unibot
  • Password: unibot_secret
  • Database: unibot
  • Port: 5432

2. Configure Environment Variables

Add the following to your .env.local file:

DATABASE_URL="postgresql://unibot:unibot_secret@localhost:5432/unibot?schema=public"

3. Run Database Migrations

# Generate Prisma client
bun run db:generate

# Push schema to database (development)
bun run db:push

# Or create a migration (production)
bun run db:migrate

Available Database Scripts

Command Description
bun run db:generate Generate Prisma client
bun run db:push Push schema to database
bun run db:migrate Create and run migration
bun run db:migrate:prod Deploy migrations in production
bun run db:studio Open Prisma Studio (database GUI)

Database Schema

The database includes the following models:

  • User - User profile (email, name, Google ID, timestamps)
  • Account - OAuth provider accounts (Google, etc.)
  • Session - User sessions for authentication
  • VerificationToken - Email verification tokens

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages