Chatbot by Aceternity

R
Renaudil y a 2 jours
0

Description

A modern, interactive chatbot template built with Next.js, AI SDK, Aceternity UI, and Neon's serverless Postgres.

npx boilerapp chatbot-by-aceternity

文档

Neon x Aceternity Chatbot Template

A modern, interactive chatbot template built with Next.js, AI SDK, Aceternity UI, and Neon's serverless Postgres.

Banner

Features

  • 🤖 Real-time streaming responses
  • 💾 Persistent chat history storage with Neon serverless Postgres
  • ✨ Beautiful UI components from Aceternity UI
  • 🎨 Fully customizable with Tailwind CSS
  • 📱 Responsive design for all devices
  • ⚡ Built on Next.js 14 with App Router

Prerequisites

  • Node.js 18+
  • A Neon account to create a Postgres database
  • An OpenAI API key

Getting Started

  1. Clone the repository:
git clone https://github.com/neondatabase/neon-chatbot.git
cd neon-chatbot-template
  1. Install dependencies:
npm install
# or
yarn install
# or
pnpm install
  1. Create a .env.local file in the root directory with the following variables:
DATABASE_URL="your-neon-database-url"
OPENAI_API_KEY="your-openai-api-key"
  1. Set up the database schema:
CREATE TABLE chat_history (
  id SERIAL PRIMARY KEY,
  user_message TEXT NOT NULL,
  assistant_message TEXT NOT NULL,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
  1. Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

Project Structure

  • /app - Next.js 14 app directory containing routes and layouts
  • /components - Reusable UI components
  • /lib - Utility functions and shared code
  • /public - Static assets
  • /styles - Global styles and Tailwind CSS configuration

Key Technologies

Deployment

The easiest way to deploy your Next.js app is to use the Vercel Platform.

  1. Push your code to a GitHub repository
  2. Import your repository to Vercel
  3. Add your environment variables in the Vercel dashboard
  4. Deploy!

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

Prix

Gratuit

FREE

评论 (0)

常见问题

常见问题解答 (FAQ)

有问题?我们有答案。如果您找不到想要的答案,请随时联系我们。

Boilerapp 是一个专门用于分享 Boilerplates、入门套件(Starter Kits)和项目模版的开发者社区平台。我们的目标很简单:为您节省初始配置(Setup)的时间,让您可以专注于真正重要的代码。无论您是在寻找简单的代码库还是完整的 SaaS 项目,都能在这里找到。

还有其他问题?

我们的团队随时为您提供帮助。联系我们,我们将尽快回复。