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