Skip to content

MechanicalMaster/ChatUI

Repository files navigation

OpenChatAI

An open-source AI web chat application built with React, Node.js, and Llama 2.

Description

OpenChatAI is a modern web application that provides an intuitive chat interface powered by open-source AI technology. It features real-time message streaming, user authentication, chat history management, and file sharing capabilities.

Features

  • Real-time AI chat interface
  • Message streaming
  • User authentication
  • Chat history management
  • File attachments support
  • Responsive design
  • Share chat sessions

Tech Stack

  • Frontend: React with TypeScript
  • Backend: Node.js with Express
  • Database: MongoDB
  • AI Model: Llama 2
  • Styling: Tailwind CSS

Setup Instructions

Traditional Setup (Development)

  1. Clone the repository:

    git clone https://github.com/yourusername/OpenChatAI.git
    cd OpenChatAI
  2. Install frontend dependencies:

    cd frontend
    npm install
  3. Install backend dependencies:

    cd ../backend
    npm install
  4. Start the development servers:

    • Frontend: npm start (in the frontend directory)
    • Backend: npm start (in the backend directory)

Docker Deployment (Production)

The application can be deployed as a single Docker container that serves both the frontend and backend:

  1. Build and run using Docker Compose:

    docker-compose up -d
  2. Or build and run manually:

    # Build the Docker image
    docker build -t openchatai .
    
    # Run the container
    docker run -p 5000:5000 -d openchatai
  3. Access the application at http://localhost:5000

Environment Variables

For production deployment, you should set the following environment variables:

  • JWT_SECRET: Secret key for JWT token generation
  • GEMINI_API_KEY: Your Google Gemini API key
  • Other database connection variables as needed

You can set these in the docker-compose.yml file or pass them directly to the docker run command.

Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/YourFeature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/YourFeature
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A modern chat interface built with React and Node.js, featuring real-time messaging, user authentication, and AI-powered responses.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors