Skip to content

bekalu73/AI-fullstack-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI ChatBot - Modern Full-Stack Chat Application

A beautiful, responsive AI-powered chatbot built with React, TypeScript, and Node.js. Features a sleek ChatGPT-like interface with real-time messaging, typing indicators, and smart AI responses.

ChatBot Demo TypeScript React Node.js

✨ Features

🎨 Modern UI/UX

  • ChatGPT-inspired design with gradient backgrounds and smooth animations
  • Responsive layout that works on desktop, tablet, and mobile
  • Dark/Light theme support with beautiful color schemes
  • Smooth animations and micro-interactions for better UX

πŸ’¬ Chat Features

  • Real-time messaging with instant responses
  • Typing indicators with animated dots
  • Message history with conversation persistence
  • Copy to clipboard functionality for bot responses
  • Auto-scroll to latest messages
  • Error handling with user-friendly error messages

πŸ”§ Technical Features

  • TypeScript for type safety and better development experience
  • Modular architecture with reusable components
  • RESTful API with proper error handling
  • Form validation with react-hook-form
  • Responsive design with Tailwind CSS
  • Modern React patterns with hooks and functional components

πŸš€ Quick Start

Prerequisites

  • Bun (recommended) or Node.js 18+
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/ai-chatbot.git
    cd ai-chatbot
  2. Install dependencies

    bun install
  3. Set up environment variables

    cd packages/server
    cp .env.example .env
    # Edit .env with your configuration
  4. Start the development servers

    # Start both client and server
    bun run dev
    
    # Or start individually
    cd packages/server && bun run dev  # Backend on :5000
    cd packages/client && bun run dev  # Frontend on :5173
  5. Open your browser Navigate to http://localhost:5173 and start chatting!

πŸ“ Project Structure

Full-stack-project/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ client/                 # React frontend
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ChatBot.tsx        # Main chat container
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ChatMessages.tsx   # Messages display
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ChatMessage.tsx    # Individual message
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ChatInput.tsx      # Message input form
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TypingIndicator.tsx # Typing animation
β”‚   β”‚   β”‚   β”‚   └── ui/               # Base UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ lib/           # Utilities and helpers
β”‚   β”‚   β”‚   └── App.tsx        # Main application
β”‚   β”‚   β”œβ”€β”€ package.json
β”‚   β”‚   └── vite.config.ts
β”‚   └── server/                # Node.js backend
β”‚       β”œβ”€β”€ controllers/       # Request handlers
β”‚       β”œβ”€β”€ services/         # Business logic
β”‚       β”œβ”€β”€ repositories/     # Data access layer
β”‚       β”œβ”€β”€ routes.ts         # API routes
β”‚       └── index.ts          # Server entry point
β”œβ”€β”€ README.md
└── package.json

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Modern React with hooks and functional components
  • TypeScript - Type-safe JavaScript for better development
  • Vite - Fast build tool and development server
  • Tailwind CSS - Utility-first CSS framework
  • React Hook Form - Performant forms with easy validation
  • Lucide React - Beautiful SVG icons
  • React Markdown - Render markdown in messages

Backend

  • Node.js - JavaScript runtime
  • Express.js - Web application framework
  • TypeScript - Type-safe server-side development
  • Zod - Schema validation for API requests
  • Bun - Fast JavaScript runtime and package manager

🎯 API Endpoints

Chat API

POST /api/chat
Content-Type: application/json

{
  "prompt": "Hello, how are you?",
  "conversationId": "uuid-string"
}

Response:
{
  "message": "Hello! I'm doing great, thank you for asking. How can I help you today?"
}

πŸ”§ Configuration

Environment Variables

Create a .env file in packages/server/:

PORT=5000
HUGGING_FACE_API_KEY=your_api_key_here  # Optional for AI integration

Customization

  • Styling: Modify Tailwind classes in components
  • AI Responses: Update chat.service.ts for different AI providers
  • Validation: Adjust schemas in chat.controller.ts
  • UI Components: Customize components in src/components/

πŸš€ Deployment

Frontend (Vercel/Netlify)

cd packages/client
bun run build
# Deploy dist/ folder

Backend (Railway/Heroku)

cd packages/server
bun run build
# Deploy with start script: "bun run start"

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

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

πŸ™ Acknowledgments

  • Inspired by ChatGPT's clean and intuitive interface
  • Built with modern web technologies and best practices
  • Designed for scalability and maintainability

πŸ“ž Support

If you have any questions or need help, please:

  • Open an issue on GitHub
  • Check the documentation
  • Contact the maintainers

Made with ❀️ and modern web technologies

About

Modern AI ChatBot with React, TypeScript & Node.js. Features ChatGPT-like UI, real-time messaging, typing indicators & smart responses. Built for FUN.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors