LingoBot is an AI-powered chat application with secure authentication and customizable avatars. It uses React, Express, and the OpenAI API to provide an engaging conversational experience.
📹 Watch LingoBot in Action: Demo Video
- 🤖 Interactive AI Chat Assistant - Powered by OpenAI GPT with intelligent responses
- 🔒 Secure User Authentication - Local authentication with session management
- 🎨 Customizable Avatar - Personalize your AI companion's appearance
- 💡 Smart Conversation Suggestions - Context-aware conversation starters
- 🌈 Responsive Design - Beautiful UI that works on all devices
- 🔄 Real-time Updates - Instant message delivery and typing indicators
- 📝 Markdown Support - Rich text formatting in chat messages
- 🎭 Sentiment Analysis - AI mascot reacts to conversation mood
- 🎯 Multiple Chat Modes - General, creative, and focused conversation modes
- 🚀 Hot Reload Development - Fast development with Vite
- React 18 with TypeScript
- Vite for fast development and building
- Tailwind CSS for styling
- ShadcnUI components for consistent design
- Framer Motion for smooth animations
- React Query for state management
- Wouter for routing
- Express.js server with TypeScript
- OpenAI GPT integration for AI responses
- Passport.js for authentication
- Express Session for session management
- Drizzle ORM for database operations
- Zod for schema validation
- PostgreSQL (optional) with Drizzle ORM
- In-memory storage for development
- Session storage with automatic cleanup
- Node.js 18+
- npm or yarn
- OpenAI API key
-
Clone the repository
git clone https://github.com/yourusername/lingobot.git cd lingobot -
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env
Edit
.envand set:SESSION_SECRET=your-super-secret-session-key-change-this-in-production OPENAI_API_KEY=your-actual-openai-api-key-here NODE_ENV=development
-
Start the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
For persistent storage, you can use PostgreSQL:
-
Start PostgreSQL with Docker
docker-compose up -d
-
Update your
.envfileDATABASE_URL=postgresql://lingobot:lingobot@localhost:5432/lingobot
-
Initialize the database schema
npm run db:push
- Create a new account or log in with existing credentials
- Sessions are automatically managed and secured
- Send Messages: Type your message and press Enter or click Send
- Conversation Suggestions: Click on suggestion chips for quick conversation starters
- Avatar Customization: Click the avatar icon to customize your AI companion
- Clear Chat: Use the clear button to start fresh conversations
- Primary Color: Main color of your avatar
- Secondary Color: Accent color for details
- Shape: Choose between circle, square, or rounded
- Style: Minimal, detailed, or animated styles
- Animation: Bounce, pulse, or wave animations
LingoBot/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ └── lib/ # Utilities and configurations
├── server/ # Express backend
│ ├── lib/ # Backend utilities
│ ├── routes.ts # API routes
│ ├── auth.ts # Authentication logic
│ └── storage.ts # Data storage layer
├── shared/ # Shared types and schemas
└── scripts/ # Build and deployment scripts
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run check # TypeScript type checking
npm run db:push # Push database schema changes- ✅ Use TypeScript for type safety
- ✅ Follow ESLint and Prettier conventions
- ✅ Never commit
.envfiles - ✅ Use
npm run db:pushfor schema changes - ✅ Test API endpoints before deployment
npm run build
npm run startNODE_ENV=production
SESSION_SECRET=your-very-secure-session-secret
OPENAI_API_KEY=your-openai-api-key
DATABASE_URL=your-production-database-urlBuild platform-specific executables:
npm install
node scripts/build-executable.jsExecutables will be created in executables/ directory.
- Temperature: Controls response creativity (0.1 - 2.0)
- System Prompt: Customize AI personality and behavior
- Mode: General, creative, or focused conversation modes
Configure in .env:
RATE_LIMIT=100 # Requests per window
RATE_WINDOW=60000 # Window in milliseconds- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the GPT API
- ShadcnUI for beautiful UI components
- Vite for fast development experience
- Tailwind CSS for utility-first CSS framework
Made with ❤️ for better AI conversations
