| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Overview
BioMatrix.AI is a cutting‑edge, agency‑grade bioinformatics suite built on Next.js 16 (App Router), Supabase (with pgvector storage), and Google Gemini for AI‑driven insights. The platform delivers real‑time, AI‑enhanced genomic analysis via a premium, dark-mode-first user interface featuring custom-engineered cognitive AI agents.
BioMatrix.AI integrates two key AI agents to assist researchers in interpreting genomic datasets and database history:
Accessible via the user assistant chat widget, Rex is a retrieval-augmented generation agent that makes database history fully conversational:
Located at /api/ai-sql, the SQL Agent enables direct, natural language database queries without requiring SQL knowledge:
| Layer | Technology | Description / Role |
|---|---|---|
| Front‑end | Next.js 16 (App Router) + React 18 | Multi-page layouts, Server Components, and responsive rendering. |
| Styling | Tailwind CSS + Custom CSS Variables | High-end visual system, custom bezier animations, and HSL custom colors. |
| AI Integration | Vercel AI SDK (ai) + @ai-sdk/google | Streams text generation and creates text embeddings via Gemini. |
| Backend / Data | Supabase (PostgreSQL) | Secure relational database, real-time client auth, and Edge Functions. |
| Vector Search | pgvector + Custom RPC Functions | Semantic vector comparison using 768-dimensional embeddings. |
# Clone the repository and install dependencies
npm install
# Run the local development server
npm run devCreate a .env.local file by copying .env.local.example and filling in the values:
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# Google Gemini
GEMINI_API_KEY=your-gemini-api-key
GEMINI_MODEL=gemini-2.5-flash
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
SUPABASE_TABLE=analysis_historyInitialize your Supabase database schema and agent functions:
Keep these rules in mind when modifying AI or chat logic:
By default, the @ai-sdk/google provider expects GOOGLE_GENERATIVE_AI_API_KEY. Because this project uses GEMINI_API_KEY:
import { createGoogleGenerativeAI } from "@ai-sdk/google";
const google = createGoogleGenerativeAI({
apiKey: process.env.GEMINI_API_KEY || process.env.GOOGLE_GENERATIVE_AI_API_KEY,
});The client-side useChat hook sends UIMessage objects (which structure content using the parts array), but server-side streamText expects standard ModelMessage objects (which require a content string):
import { convertToModelMessages } from "ai";
const modelMessages = await convertToModelMessages(messages);| Back | FazBrowse Home | New Git URL |