Skip to content

bagusardin25/ai-chatbot-opencode

Repository files navigation

AI Chatbot

A modern AI-powered chatbot application built with Laravel and Alpine.js, featuring real-time streaming responses and conversation management.

Features

  • Real-time Streaming: Get AI responses in real-time with streaming support
  • Conversation Management: Create, rename, and manage multiple conversations
  • Modern UI: Clean interface built with Tailwind CSS and Alpine.js
  • Markdown Support: Render formatted responses with syntax highlighting
  • Persistent Storage: SQLite database for conversation history

Tech Stack

  • Backend: Laravel 12, PHP 8.2+
  • Frontend: Alpine.js, Tailwind CSS 4
  • Database: SQLite
  • Build Tools: Vite
  • Additional: Marked.js (Markdown), Highlight.js (Syntax highlighting), DOMPurify (Sanitization)

Installation

  1. Clone the repository
  2. Install dependencies:
composer setup

Usage

Start the development server:

composer dev

This will start:

API Endpoints

Conversations

  • GET /api/conversations - List all conversations
  • GET /api/conversations/{id} - Get conversation details
  • POST /api/conversations - Create new conversation
  • PUT /api/conversations/{id} - Update conversation
  • DELETE /api/conversations/{id} - Delete conversation
  • POST /api/conversations/{id}/rename - Rename conversation

Chat

  • POST /api/chat/send/{conversationId?} - Send message
  • POST /api/chat/stream/{conversationId?} - Stream message response

Testing

Run tests:

composer test

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors