AstroFlora AI is an advanced biological intelligence assistant built with Next.js and the AI SDK. It specializes in plant biology, genetics, biotechnology, and life sciences, featuring real-time tool integration for enhanced functionality.
- π€ AI-Powered Chat: Powered by OpenAI GPT-4o with biological expertise
- π οΈ Tool Integration: Real-time tools including Colombia time lookup
- β‘ Streaming Responses: Real-time streaming chat interface
- π¨ Modern UI: Beautiful Chakra UI components with dark/light mode
- π± Responsive Design: Optimized for desktop and mobile devices
- Node.js 18+ or Bun
- OpenAI API key
- Clone the repository:
git clone <your-repo-url>
cd astroflora-ai-chat- Install dependencies:
npm install
# or
bun install- Set up environment variables:
cp .env.example .env.localAdd your OpenAI API key to .env.local:
OPENAI_API_KEY=your_openai_api_key_here- Run the development server:
npm run dev
# or
bun dev- Open http://localhost:3000 with your browser.
- π Colombia Time: Get current time in Colombia (COT/UTC-5)
- More tools coming soon...
- Frontend: Next.js 15 with App Router
- UI: Chakra UI v3 with modern design system
- AI: OpenAI GPT-4o via AI SDK v5
- Streaming: Real-time response streaming
- Tools: Direct AI SDK tool integration (no MCP dependencies)
src/
βββ app/
β βββ api/
β β βββ chat/ # Main chat API endpoint
β β βββ colombia-time/ # Colombia time API endpoint
β βββ layout.tsx # Root layout
β βββ page.tsx # Chat interface
βββ components/
β βββ ui/ # Reusable UI components
βββ ...
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- Create tool definition in
src/app/api/chat/route.ts - Add tool logic using AI SDK
tool()function - Update system prompt if needed
Deploy on Vercel (recommended):
Or manually:
- Build the project:
npm run build - Deploy to your preferred platform
- Set environment variables on your hosting platform
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License.
Built with β€οΈ using Next.js, AI SDK, and OpenAI GPT-4o