Skip to content

Commit b801f92

Browse files
Update the Readme
1 parent f41fe85 commit b801f92

File tree

3 files changed

+175
-58
lines changed

3 files changed

+175
-58
lines changed

README.md

Lines changed: 132 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,157 @@
1-
<a href="https://chat.vercel.ai/">
2-
<img alt="Next.js 14 and App Router-ready AI chatbot." src="app/(chat)/opengraph-image.png">
3-
<h1 align="center">Chat SDK</h1>
4-
</a>
1+
# RaiseAI - Smart Funding, Grant & VC Analyst AI Assistant
52

6-
<p align="center">
7-
Chat SDK is a free, open-source template built with Next.js and the AI SDK that helps you quickly build powerful chatbot applications.
8-
</p>
3+
<div align="center">
4+
<a href="https://github.com/unicodeveloper/raise-ai">
5+
<img src="public/opengraph-image.png" alt="RaiseAI - AI Chatbot" width="100%">
6+
</a>
7+
</div>
98

109
<p align="center">
11-
<a href="https://chat-sdk.dev"><strong>Read Docs</strong></a> ·
12-
<a href="#features"><strong>Features</strong></a> ·
13-
<a href="#model-providers"><strong>Model Providers</strong></a> ·
14-
<a href="#deploy-your-own"><strong>Deploy Your Own</strong></a> ·
15-
<a href="#running-locally"><strong>Running locally</strong></a>
10+
<br/>
11+
<strong>The Best Open Source AI VC Analyst built with Next.js, Vercel AI SDK, and Valyu Deep Search API.</strong>
12+
<br/>
13+
Specialized in financial analysis, academic research, and funding insights.
14+
<br/>
15+
<br/>
16+
<a href="https://github.com/unicodeveloper/raise-ai"><strong>Explore the code »</strong></a>
17+
<br/>
18+
<br/>
19+
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Funicodeveloper%2Fraise-ai&env=OPENAI_API_KEY,AUTH_SECRET,VALYU_API_KEY"><img src="https://vercel.com/button" alt="Deploy with Vercel"/></a>
1620
</p>
17-
<br/>
1821

19-
## Features
22+
## 🚀 Overview
23+
24+
**RaiseAI** is a production-ready AI chatbot designed for professionals who need more than just generic AI responses. It integrates **Deep Search** capabilities to provide real-time, authoritative data from financial markets, regulatory filings (SEC), academic papers (ArXiv, PubMed), and healthcare databases (FDA).
2025

21-
- [Next.js](https://nextjs.org) App Router
22-
- Advanced routing for seamless navigation and performance
23-
- React Server Components (RSCs) and Server Actions for server-side rendering and increased performance
24-
- [AI SDK](https://ai-sdk.dev/docs/introduction)
25-
- Unified API for generating text, structured objects, and tool calls with LLMs
26-
- Hooks for building dynamic chat and generative user interfaces
27-
- Supports xAI (default), OpenAI, Fireworks, and other model providers
28-
- [shadcn/ui](https://ui.shadcn.com)
29-
- Styling with [Tailwind CSS](https://tailwindcss.com)
30-
- Component primitives from [Radix UI](https://radix-ui.com) for accessibility and flexibility
31-
- Data Persistence
32-
- [Neon Serverless Postgres](https://vercel.com/marketplace/neon) for saving chat history and user data
33-
- [Vercel Blob](https://vercel.com/storage/blob) for efficient file storage
34-
- [Auth.js](https://authjs.dev)
35-
- Simple and secure authentication
26+
### Key Capabilities
3627

37-
## Model Providers
28+
- **Multi-Model Support**: Seamlessly switch between top-tier models like **Claude 3.5 Sonnet**, **GPT-4o**, **Gemini 2.0 Flash**, and **Grok 2**.
29+
- **Artifacts UI**: Generate and render code, spreadsheets, and documents side-by-side with your conversation.
30+
- **Valyu Deep Search Integration**: Access real-time, structured data that standard LLMs cannot provide.
31+
- **Persistent History**: Save and organize your chats with secure authentication via NextAuth.
32+
- **Modern UI**: A beautiful, responsive interface built with Tailwind CSS and Framer Motion.
3833

39-
This template uses the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) to access multiple AI models through a unified interface. The default configuration includes [xAI](https://x.ai) models (`grok-2-vision-1212`, `grok-3-mini`) routed through the gateway.
34+
---
4035

41-
### AI Gateway Authentication
36+
## 🔍 Valyu Deep Search
4237

43-
**For Vercel deployments**: Authentication is handled automatically via OIDC tokens.
38+
This is the core superpower of RaiseAI. Unlike standard web search, Valyu Deep Search connects directly to specialized, high-integrity data sources.
4439

45-
**For non-Vercel deployments**: You need to provide an AI Gateway API key by setting the `AI_GATEWAY_API_KEY` environment variable in your `.env.local` file.
40+
**What you can do with it:**
4641

47-
With the [AI SDK](https://ai-sdk.dev/docs/introduction), you can also switch to direct LLM providers like [OpenAI](https://openai.com), [Anthropic](https://anthropic.com), [Cohere](https://cohere.com/), and [many more](https://ai-sdk.dev/providers/ai-sdk-providers) with just a few lines of code.
42+
- **💰 Financial Analysis**: "Compare Tesla vs GM stock performance over the last year, including P/E ratios and market cap."
43+
- **📜 Regulatory Research**: "Find mentions of 'AI safety' in Microsoft's latest 10-K SEC filing."
44+
- **🔬 Academic Research**: "Search ArXiv for the latest papers on 'Transformer architecture optimization' from 2024."
45+
- **💊 Healthcare Insights**: "Search FDA drug labels for interactions between Metformin and Lisinopril."
4846

49-
## Deploy Your Own
47+
**How it works:**
48+
When you ask a complex question, RaiseAI automatically (or manually via toggle) engages the Valyu tool. It queries specific indexes (e.g., `valyu-stocks-US`, `valyu-pubmed`), retrieves the raw data, and synthesizes a comprehensive answer with citations, charts, and data tables.
5049

51-
You can deploy your own version of the Next.js AI Chatbot to Vercel with one click:
50+
---
5251

53-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/templates/next.js/nextjs-ai-chatbot)
52+
## 🛠️ Tech Stack
5453

55-
## Running locally
54+
- **Framework**: [Next.js 15](https://nextjs.org) (App Router)
55+
- **AI SDK**: [Vercel AI SDK](https://sdk.vercel.ai/docs) for unified model access.
56+
- **Database**: [Postgres](https://vercel.com/postgres) (via Drizzle ORM) for chat history.
57+
- **Authentication**: [NextAuth.js](https://next-auth.js.org) (v5).
58+
- **Styling**: [Tailwind CSS](https://tailwindcss.com) & [shadcn/ui](https://ui.shadcn.com).
59+
- **Search Provider**: [Valyu](https://valyu.com) for deep specialized data retrieval.
5660

57-
You will need to use the environment variables [defined in `.env.example`](.env.example) to run Next.js AI Chatbot. It's recommended you use [Vercel Environment Variables](https://vercel.com/docs/projects/environment-variables) for this, but a `.env` file is all that is necessary.
61+
---
5862

59-
> Note: You should not commit your `.env` file or it will expose secrets that will allow others to control access to your various AI and authentication provider accounts.
63+
## ⚡ Getting Started
6064

61-
1. Install Vercel CLI: `npm i -g vercel`
62-
2. Link local instance with Vercel and GitHub accounts (creates `.vercel` directory): `vercel link`
63-
3. Download your environment variables: `vercel env pull`
65+
### Prerequisites
66+
67+
- Node.js 18+
68+
- pnpm (recommended)
69+
- A generic Postgres database (e.g., Vercel Postgres, Neon, Supabase)
70+
- API Keys for:
71+
- OpenAI (or your preferred model provider)
72+
- Valyu (for Deep Search)
73+
- Auth Secret (for NextAuth)
74+
75+
### 1. Clone the Repository
76+
77+
```bash
78+
git clone https://github.com/unicodeveloper/raise-ai.git
79+
cd raise-ai
80+
```
81+
82+
### 2. Install Dependencies
6483

6584
```bash
6685
pnpm install
67-
pnpm db:migrate # Setup database or apply latest database changes
86+
```
87+
88+
### 3. Configure Environment
89+
90+
Copy the example environment file:
91+
92+
```bash
93+
cp .env.example .env.local
94+
```
95+
96+
Fill in the required values in `.env.local`:
97+
98+
```env
99+
# Database (Postgres)
100+
POSTGRES_URL="postgres://..."
101+
102+
# Authentication (Generate a random string: openssl rand -base64 32)
103+
AUTH_SECRET="your-secret-key"
104+
105+
# AI Model Provider (Vercel AI Gateway or Direct)
106+
OPENAI_API_KEY="sk-..."
107+
108+
# Valyu Deep Search (Required for search features)
109+
VALYU_API_KEY="valyu-..."
110+
```
111+
112+
### 4. Database Migration
113+
114+
Run the database migrations to set up your schema:
115+
116+
```bash
117+
pnpm db:migrate
118+
```
119+
120+
### 5. Run Development Server
121+
122+
```bash
68123
pnpm dev
69124
```
70125

71-
Your app template should now be running on [localhost:3000](http://localhost:3000).
126+
Open [http://localhost:3000](http://localhost:3000) in your browser.
127+
128+
---
129+
130+
## 🚢 Deployment
131+
132+
The easiest way to deploy is via Vercel.
133+
134+
1. Click the **Deploy** button at the top of this README.
135+
2. Connect your GitHub repository.
136+
3. Add your environment variables (`POSTGRES_URL`, `AUTH_SECRET`, `VALYU_API_KEY`, etc.) during the setup flow.
137+
4. Vercel will automatically build and deploy your application.
138+
139+
For database hosting, Vercel Postgres is the easiest integration, but any Postgres provider will work.
140+
141+
---
142+
143+
## 🤝 Contributing
144+
145+
Contributions are welcome! Please feel free to submit a Pull Request.
146+
147+
1. Fork the project
148+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
149+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
150+
4. Push to the branch (`git push origin feature/AmazingFeature`)
151+
5. Open a Pull Request
152+
153+
---
154+
155+
## 📄 License
156+
157+
Distributed under the MIT License. See `LICENSE` for more information.

components/chat-header.tsx

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,32 @@ function PureChatHeader({
5050
/>
5151
)}
5252

53-
<Button
54-
asChild
55-
className="order-3 hidden bg-zinc-900 px-2 text-zinc-50 hover:bg-zinc-800 md:ml-auto md:flex md:h-fit dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200"
56-
>
57-
<Link
58-
href={"https://github.com/unicodeveloper/raise-ai"}
59-
rel="noreferrer"
60-
target="_blank"
53+
<div className="order-3 hidden gap-2 md:ml-auto md:flex">
54+
<Button
55+
asChild
56+
className="h-fit bg-zinc-900 px-2 text-zinc-50 hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200"
6157
>
62-
<GitIcon />
63-
GitHub
64-
</Link>
65-
</Button>
58+
<Link
59+
href="https://github.com/unicodeveloper/raise-ai"
60+
target="_blank"
61+
>
62+
<GitIcon />
63+
GitHub
64+
</Link>
65+
</Button>
66+
<Button
67+
asChild
68+
className="h-fit bg-zinc-900 px-2 text-zinc-50 hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200"
69+
>
70+
<Link
71+
href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Funicodeveloper%2Fraise-ai&env=OPENAI_API_KEY,AUTH_SECRET,VALYU_API_KEY"
72+
target="_blank"
73+
>
74+
<VercelIcon size={16} />
75+
Deploy
76+
</Link>
77+
</Button>
78+
</div>
6679
</header>
6780
);
6881
}

components/message.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,24 @@ const PurePreviewMessage = ({
282282
);
283283
}
284284

285+
if (state === "input-available" || state === "input-streaming") {
286+
return (
287+
<div key={toolCallId} className="flex items-center gap-2 rounded-lg border border-muted bg-background p-3 shadow-sm">
288+
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-primary/10">
289+
<div className="h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent" />
290+
</div>
291+
<div className="flex flex-col">
292+
<span className="font-medium text-sm">Deep Search</span>
293+
<span className="line-clamp-1 text-muted-foreground text-xs">
294+
{part.input && typeof part.input === 'object' && 'query' in part.input
295+
? (part.input as any).query
296+
: "Analyzing your request..."}
297+
</span>
298+
</div>
299+
</div>
300+
);
301+
}
302+
285303
return (
286304
<Tool defaultOpen={true} key={toolCallId}>
287305
<ToolHeader

0 commit comments

Comments
 (0)