GitHunt
AR

arturoburigo/chatgptkkkkkkk

treinando CICD

AI Chat

A clean, minimal AI chat interface powered by OpenAI's API. Built with React, TypeScript, and Tailwind CSS.

Features

  • ๐Ÿ’ฌ Real-time chat with OpenAI models (defaults to gpt-4o)
  • ๐ŸŽจ Customizable background โ€” set any image URL with adjustable opacity and blur
  • โœจ Smooth animations via Framer Motion
  • ๐Ÿ“ Markdown rendering for AI responses (code blocks, lists, bold, etc.)
  • โŒจ๏ธ Auto-expanding textarea โ€” Enter to send, Shift+Enter for new lines
  • ๐ŸŒ™ Dark-first design with shadcn/ui components

Getting Started

Prerequisites

Setup

# 1. Clone the repo
git clone <YOUR_GIT_URL>
cd <YOUR_PROJECT_NAME>

# 2. Install dependencies
npm install

# 3. Create your environment file
cp .env.example .env
# Then edit .env and add your OpenAI API key

# 4. Start the dev server
npm run dev

Environment Variables

Create a .env file at the project root:

VITE_OPENAI_API_KEY=your_openai_api_key_here
VITE_OPENAI_MODEL=gpt-4o   # optional, defaults to gpt-4o

โš ๏ธ Note: The API key is used directly in the browser (dangerouslyAllowBrowser: true). This is fine for local development or personal use, but for production deployments consider proxying requests through a backend.

Available Scripts

Command Description
npm run dev Start development server
npm run build Production build
npm run preview Preview production build locally
npm run lint Run ESLint
npm run test Run tests with Vitest

Tech Stack

Layer Technology
Framework React 18 + TypeScript
Build tool Vite
Styling Tailwind CSS + shadcn/ui
Animations Framer Motion
AI OpenAI Node SDK
Routing React Router v6
Data fetching TanStack Query
Markdown react-markdown
Forms React Hook Form + Zod

Project Structure

src/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ BackgroundSettings.tsx  # Background image/opacity/blur controls
โ”‚   โ”œโ”€โ”€ ChatInput.tsx           # Auto-expanding message input
โ”‚   โ”œโ”€โ”€ ChatMessage.tsx         # Message bubble + typing indicator
โ”‚   โ””โ”€โ”€ ui/                     # shadcn/ui primitives
โ”œโ”€โ”€ hooks/                      # Custom React hooks
โ”œโ”€โ”€ lib/                        # Shared utilities
โ”œโ”€โ”€ pages/
โ”‚   โ”œโ”€โ”€ Index.tsx               # Main chat page
โ”‚   โ””โ”€โ”€ NotFound.tsx            # 404 page
โ””โ”€โ”€ main.tsx

License

MIT