Halo
Halo is an AI-powered database schema architect and query builder. It allows you to converse with an AI assistant to design, modify, and query relational databases visually.
Features
- AI-Powered Design: Converse naturally with the AI to generate complete database schemas.
- Visual Canvas: Instantly see your generated tables, columns, and relationships rendered on an interactive canvas using React Flow.
- Dynamic Modifications: Ask the AI to add, remove, or modify existing tables and relationships, and watch the canvas update in real time.
- Query Generation: Once your schema is built, ask the AI to write complex SQL queries based on the generated structure.
Tech Stack
- Framework: Next.js
- AI Integration: Vercel AI SDK
- LLM Provider: NVIDIA NIM (
google/gemma-4-31b-it) - State Management: Zustand
- Visualization: React Flow & Dagre (for auto-layout)
- Styling: Tailwind CSS & shadcn/ui
Getting Started
Prerequisites
Ensure you have Node.js and a package manager (npm, yarn, pnpm, or bun) installed.
Installation
-
Clone the repository and install dependencies:
pnpm install -
Set up your environment variables by creating a
.env.localfile in the root directory:NVIDIA_API_KEY=your_nvidia_api_key_here NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1 NVIDIA_MODEL=google/gemma-4-31b-it -
Start the development server:
pnpm dev -
Open http://localhost:3000 in your browser.
How to Use
- Start a Conversation: Use the chat panel on the left to ask the AI to create a database schema (e.g., "Design a schema for an e-commerce platform").
- Interact with the Canvas: The AI will generate the schema and the right-hand canvas will automatically render the tables and relationships.
- Iterate: Ask the AI to make changes, like "Add a stripe_customer_id to the users table".
- Query: Ask for SQL queries, such as "Write a query to get the top 5 spending users".