β¨ Your AI Companion for Conversations & Visual Creativity β¨
Experience the future of AI companionship with intelligent conversations and stunning image generation
Flirtina is a flirty, emotionally engaging virtual girlfriend AI chatbot created by Gyanesh Maurya. It uses the Gemini API to generate intelligent, playful, and affectionate responses, plus AI-powered image generation to bring your imagination to life. Experience the charm of AI companionship with a modern, secure, and responsive web interface.
- π§ Context-Aware Responses - Remembers conversation history
- π Emotional Intelligence - Adapts tone to match your mood
- β‘ Real-Time Typing - Realistic typing animations
- π Rich Text Support - Markdown formatting for better readability
- π Personality-Driven - Flirty, engaging, and emotionally responsive
- πΌοΈ FLUX.1-dev Integration - State-of-the-art image generation
- πΎ Download Options - Save generated images locally
- π― Smart Prompting - Optimized for best results
- π Zero API Exposure - All keys secured server-side
- β‘ Lightning Fast - Optimized with Vite and modern architecture
- π± Fully Responsive - Perfect experience on any device
- π Theme Support - Beautiful dark/light themes
- πΎ Persistent Storage - Your conversations are saved locally
| Frontend | Backend | AI Services |
|---|---|---|
| React 18 | Netlify Functions | Google Gemini AI |
| Vite 5 | Node.js | Hugging Face FLUX |
| Modern CSS3 | Serverless | Image Generation |
| ES6+ JavaScript | RESTful APIs | Context Memory |
Our security-first approach ensures your API keys are never exposed:
π Browser β οΏ½ Netlify Function β π€ Gemini AI
β β β
No API Key Secure Proxy AI Processing
- Zero Client Exposure: API keys never reach the browser
- Serverless Security: All API calls proxied through Netlify functions
- Environment Protection: Keys stored in secure Netlify environment
- CORS Compliance: Proper cross-origin request handling
- Click the deploy button above
- Connect your GitHub account
- Configure environment variables:
VITE_GEMINI_API_KEY=your_gemini_api_key_here HUGGING_FACE_API_KEY=your_hugging_face_api_key_here
- Get API Keys:
- Gemini AI: Get your API key from Google AI Studio
- Hugging Face: Get your API key from Hugging Face Settings
- π Google AI Studio for Gemini
- Deploy - Your site will be live in minutes!
-
Fork this repository to your GitHub account
-
Connect to Netlify:
- Go to Netlify and sign in
- Click "New site from Git"
- Choose your forked repository
-
Configure build settings:
Build command: npm run build Publish directory: dist Functions directory: netlify/functions -
Set environment variables:
- Go to Site settings β Environment variables
- Add:
VITE_GEMINI_API_KEY=your_gemini_api_key_here - Add:
HUGGING_FACE_API_KEY=your_hugging_face_api_key_here - Get Gemini API key from Google AI Studio
- Get Hugging Face API key from Hugging Face Settings
-
Deploy: Your site will be live in minutes!
# Clone the repository
git clone https://github.com/gyanesh-maurya/Flirtina.git
cd Flirtina
# Install dependencies
npm install
# Create environment file
# π Create environment file
echo "VITE_GEMINI_API_KEY=your_api_key_here" > .env.local
echo "HUGGING_FACE_API_KEY=your_hf_api_key_here" >> .env.local
# Start development server
npm run dev
# Open http://localhost:5173 in your browsernpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLintFor local development, create a .env.local file:
VITE_GEMINI_API_KEY=your_actual_api_key_here
HUGGING_FACE_API_KEY=your_actual_hf_api_key_hereClean, organized, and scalable architecture
π Flirtina/
βββ π src/
β βββ π components/ # π§© React UI components
β β βββ ChatInput.jsx # βοΈ Message input component with image mode
β β βββ ChatMessages.jsx # π¬ Chat message display container
β β βββ ConfirmationModal.jsx # β
Confirmation dialogs
β β βββ GeneratedImage.jsx # πΌοΈ AI-generated image display component
β β βββ Header.jsx # π― App header with theme toggle
β β βββ Message.jsx # π Individual message component
β β βββ Preloader.css # π¨ Loading animation styles
β β βββ Preloader.jsx # β³ Loading animations
β β βββ Sidebar.jsx # π Chat sidebar navigation
β β βββ ThinkingIndicator.jsx # π€ AI typing animation
β βββ π hooks/ # πͺ Custom React hooks
β β βββ useChatApp.js # π Main chat logic and state management
β β βββ usePreloader.js # β‘ Loading state management
β β βββ useTheme.js # π¨ Theme management (dark/light)
β βββ π services/ # π API communication layer
β β βββ geminiAPI.js # π€ Chat API calls to Gemini
β β βββ imageGenerationAPI.js # πΌοΈ Image generation API service
β βββ π utils/ # π οΈ Helper functions
β β βββ messageUtils.js # π Message processing utilities
β βββ App.jsx # πͺ Main application component
β βββ App.css # π
Application styles
β βββ main.jsx # π React application entry point
β βββ index.css # π Global styles and CSS variables
βββ π netlify/
β βββ π functions/ # β‘ Serverless functions
β βββ chat.js # π¬ Chat serverless API function
β βββ image-generation.js # πΌοΈ Image generation serverless function
βββ π public/ # π Static assets
β βββ favicon.svg # π App favicon
β βββ logo.png # π·οΈ Application logo
β βββ main-logo.png # π Main branding logo
βββ index.html # π HTML template
βββ package.json # π¦ Dependencies and scripts
βββ vite.config.js # βοΈ Vite build configuration
βββ netlify.toml # π Netlify deployment configuration
βββ README.md # π Project documentation
Flirtina includes powerful AI image generation capabilities! Simply toggle the image mode in the chat input and describe what you want to create.
- Natural Language Prompts: Describe your image in plain English
- High Quality: Generates High Quality pixel images
- Download Support: Click any generated image to view full-size or download
- Smart Fallbacks: Graceful handling when services are temporarily unavailable
- Toggle Image Mode: Click the image icon (π¨) in the chat input
- Describe Your Vision: Type what you want to see (e.g., "a beautiful sunset over mountains")
- Wait for Magic: Flirtina will generate your image using AI
- View & Download: Click the generated image to view full-size or download
π
A romantic sunset scene with roses
π¨ Abstract art with pink and purple colors
π± A cute kitten playing with yarn
ποΈ Majestic mountain landscape at dawn
β¨ Fantasy magical forest with glowing lights
- π¬ User Interaction: You type a message to Flirtina or request image generation
- π Secure Transmission: Message sent to Netlify serverless function
- π§ AI Processing: Gemini AI generates a flirty, contextual response
- π¨ Image Creation: AI-powered image generation from natural language prompts
- β¨ Response Delivery: AI response streams back with typing animation
- πΎ Memory: Conversation history maintained for context
POST /.netlify/functions/chat
Request Body:
{
"message": "Your message to Flirtina",
"messageHistory": [
{ "role": "user", "content": "Previous message" },
{ "role": "assistant", "content": "Previous response" }
]
}
Response:
{
"response": "Flirtina's flirty AI response"
}We welcome contributions to make Flirtina even more charming! Here's how you can help:
- Found a bug? Open an issue
- Include steps to reproduce and your environment details
- Have ideas for new features? Start a discussion
- Suggest personality improvements or new conversation topics
-
Fork & Clone
git clone https://github.com/YOUR_USERNAME/Flirtina.git cd Flirtina -
Setup Development Environment
npm install echo "VITE_GEMINI_API_KEY=your_api_key" > .env.local echo "HUGGING_FACE_API_KEY=your_hf_api_key" >> .env.local
-
Create Feature Branch
git checkout -b feature/your-amazing-feature
-
Develop & Test
npm run dev # Start development server npm run lint # Check code style npm run build # Test production build
-
Submit Pull Request
- Write clear commit messages
- Include tests if applicable
- Update documentation if needed
- Code Style: Follow existing patterns and ESLint rules
- Commits: Use conventional commit messages
- Testing: Test your changes thoroughly
- Documentation: Update README if you add features
Gyanesh Maurya
- π GitHub: @gyanesh-maurya
- π Portfolio: Portfolio
Made with π by Gyanesh Maurya
Experience the future of AI companionship with Flirtina β¨
β Star this repo β’ π Report Bug β’ π‘ Request Feature
