Skip to content

ggindev/grok-chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grok Chat App

A React-based chat application that integrates with the Grok AI model through x.ai's API. image

Features

  • Real-time chat interface with Grok AI
  • Multiple chat sessions support with titles based on first message
  • Persistent chat history using localStorage
  • Markdown support in messages with code block highlighting
  • Responsive design with styled-components
  • Dark/Light theme toggle
  • Mobile-friendly sidebar navigation
  • Settings management for API key configuration
  • Message editing with version history
  • Copy message content to clipboard
  • Export chat history to JSON
  • Alternative timeline responses after message edits
  • Version navigation for edited messages

Prerequisites

Before running this application, you'll need:

  • Node.js (v18 or higher)
  • npm or yarn
  • A valid API key from x.ai (Grok)

Environment Setup

  1. Clone the repository
  2. Create a .env file in the root directory
  3. Add your x.ai API key:

REACT_APP_GROK_API_KEY=your_api_key_here

Alternatively, you can set your API key through the settings interface in the app.

Installation

In the project directory, run:

npm install

Available Scripts

In the project directory, you can run:

npm start

Runs the app in development mode.
Open http://localhost:3000 to view it in your browser.

npm test

Launches the test runner in interactive watch mode.

npm run build

Builds the app for production to the build folder.
The build is minified and optimized for best performance.

Key Features

  • Chat Management: Create, switch between, and delete chat sessions
  • Persistent Storage: Chat history is saved in localStorage
  • Responsive Design: Works on both desktop and mobile devices
  • Theme Support: Toggle between light and dark themes
  • API Key Management: Set and update your x.ai API key through the settings interface
  • Markdown Support: Rich text formatting and code syntax highlighting
  • Message Management:
    • Edit your messages with full version history
    • Navigate through different versions of edited messages
    • Copy message content to clipboard
    • View alternative timeline responses after edits
  • Data Export: Export your entire chat history as JSON

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published