|
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 |
5 | 2 |
|
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> |
9 | 8 |
|
10 | 9 | <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> |
16 | 20 | </p> |
17 | | -<br/> |
18 | 21 |
|
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). |
20 | 25 |
|
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 |
36 | 27 |
|
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. |
38 | 33 |
|
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 | +--- |
40 | 35 |
|
41 | | -### AI Gateway Authentication |
| 36 | +## 🔍 Valyu Deep Search |
42 | 37 |
|
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. |
44 | 39 |
|
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:** |
46 | 41 |
|
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." |
48 | 46 |
|
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. |
50 | 49 |
|
51 | | -You can deploy your own version of the Next.js AI Chatbot to Vercel with one click: |
| 50 | +--- |
52 | 51 |
|
53 | | -[](https://vercel.com/templates/next.js/nextjs-ai-chatbot) |
| 52 | +## 🛠️ Tech Stack |
54 | 53 |
|
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. |
56 | 60 |
|
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 | +--- |
58 | 62 |
|
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 |
60 | 64 |
|
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 |
64 | 83 |
|
65 | 84 | ```bash |
66 | 85 | 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 |
68 | 123 | pnpm dev |
69 | 124 | ``` |
70 | 125 |
|
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. |
0 commit comments