A modern full-stack chat application built with React and Express.js, featuring AI-powered conversations with Google Gemini and optional web search capabilities.
- 💬 Real-time chat interface with AI responses
- 🔍 Optional web search integration for up-to-date information
- 🎨 Modern UI with Tailwind CSS and shadcn/ui components
- 🌙 Dark/light theme support with Catppuccin colors
- 📱 Responsive design for mobile and desktop
- 🔒 User authentication and conversation management
- 💾 PostgreSQL database with Drizzle ORM
- React 18 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- shadcn/ui component library
- TanStack Query for state management
- Wouter for routing
- Node.js with Express.js
- TypeScript with ES modules
- Google Gemini AI integration
- PostgreSQL with Drizzle ORM
- Web search via DuckDuckGo API
- Node.js 18 or higher
- PostgreSQL database
- Google Gemini API key
- Clone the repository:
git clone https://github.com/yourusername/ai-chat-app.git
cd ai-chat-app- Install dependencies:
npm install- Set up environment variables:
cp .env.example .envEdit .env with your configuration:
DATABASE_URL=your_postgresql_connection_string
GEMINI_API_KEY=your_google_gemini_api_key
- Set up the database:
npm run db:push- Start the development server:
npm run devThe application will be available at http://localhost:5000
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run check- Run TypeScript type checkingnpm run db:push- Apply database schema changes
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom hooks
│ │ └── lib/ # Utilities
├── server/ # Express backend
│ ├── services/ # AI and web search services
│ └── routes.ts # API routes
├── shared/ # Shared types and schemas
└── README.md
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Yes |
GEMINI_API_KEY |
Google Gemini API key | Yes |
NODE_ENV |
Environment (development/production) | No |
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details