Skip to content

bijeebuss/chatbot

Repository files navigation

AI Chatbot with React Router

A modern, production-ready AI chatbot application built with React Router, SQLite, Prisma, and OpenAI integration.

Features

  • 💬 AI-powered chatbot interface
  • 🌙 Dark mode by default
  • 🚀 Server-side rendering
  • 🔄 Real-time data loading and mutations
  • 📊 Message history stored in SQLite database
  • 🔌 OpenAI API integration
  • 🔒 TypeScript with full type safety
  • 🎨 TailwindCSS for styling
  • 🌐 Customizable OpenAI API endpoint

Getting Started

Installation

Install the dependencies:

npm install

Development

Start the development server with HMR:

npm run dev

Your application will be available at http://localhost:5173.

Setting up OpenAI API

  1. Obtain an API key from OpenAI

  2. Add your API key to the .env file:

    OPENAI_API_KEY="your-api-key-here"
    
  3. (Optional) If you're using a custom OpenAI-compatible API endpoint, uncomment and set the OPENAI_BASE_URL variable in the .env file:

    OPENAI_BASE_URL="https://your-custom-endpoint.com/v1"
    

Building for Production

Create a production build:

npm run build

Deployment

Docker Deployment

To build and run using Docker:

docker build -t my-app .

# Run the container
docker run -p 3000:3000 my-app

The containerized application can be deployed to any platform that supports Docker, including:

  • AWS ECS
  • Google Cloud Run
  • Azure Container Apps
  • Digital Ocean App Platform
  • Fly.io
  • Railway

DIY Deployment

If you're familiar with deploying Node applications, the built-in app server is production-ready.

Make sure to deploy the output of npm run build

├── package.json
├── package-lock.json (or pnpm-lock.yaml, or bun.lockb)
├── build/
│   ├── client/    # Static assets
│   └── server/    # Server-side code

Styling

This template comes with Tailwind CSS already configured for a simple default starting experience. You can use whatever CSS framework you prefer.


Built with ❤️ using React Router.

About

I started building an agent like Moltbot way before it was cool. But I never finished it of course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors