Skip to content

Latest commit

ย 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽจ MoodCanvas - AI Art from Emotions

Netlify Status Live Demo Backend API

Transform your emotions into stunning digital artwork using AI. Express yourself through 8 different art styles with voice input support and immersive 3D visualization.

โœจ Features

  • ๐ŸŽญ 8 Art Styles: Realistic, Anime, Abstract, Oil Painting, Cyberpunk, Watercolor, Sketch, Vintage
  • ๐ŸŽค Voice Input: Speak your emotions using Web Speech API
  • ๐Ÿง  AI Emotion Analysis: Advanced sentiment analysis using VADER
  • ๐ŸŽจ 3D Visualization: Immersive Three.js-powered art display
  • ๐Ÿ“ฑ Responsive Design: Works perfectly on desktop and mobile
  • ๐Ÿ’พ Art Management: Save, share, and regenerate your creations
  • โšก Real-time Generation: Live AI art generation using Pollinations.ai
  • ๐ŸŒ Offline Fallback: Graceful degradation when API is unavailable

๐Ÿš€ Live Demo

Try MoodCanvas Now โ†’

๐Ÿ“ธ Screenshots

Main Interface

Main Interface

Art Generation

Art Generation

3D Display

3D Display

๐Ÿ› ๏ธ Tech Stack

Frontend

  • HTML5 - Semantic markup
  • CSS3 - Styling with Tailwind CSS
  • JavaScript (ES6+) - Modern JavaScript features
  • Three.js - 3D graphics and visualization
  • Web Speech API - Voice input functionality

Backend

  • Python 3.8+ - Server-side logic
  • Flask - Web framework
  • VADER Sentiment - Emotion analysis
  • Pollinations.ai - AI art generation
  • Flask-CORS - Cross-origin resource sharing

Deployment

  • Netlify - Frontend hosting
  • Render.com - Backend hosting
  • GitHub - Version control

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • Node.js 14+
  • Modern web browser with WebGL support

Local Development

  1. Clone the repository

    git clone https://github.com/yourusername/moodcanvas.git
    cd moodcanvas
  2. Setup Backend

    cd backend
    pip install -r requirements.txt
    python app.py

    Backend will run on http://localhost:5000

  3. Setup Frontend

    cd frontend
    # Open index.html in your browser
    # Or serve with a local server:
    python -m http.server 8000

    Frontend will be available at http://localhost:8000

  4. Build Tailwind CSS (Optional)

    cd frontend
    npm install
    npx tailwindcss -i ./styles.css -o ./output.css --watch

๐Ÿ“– Usage

  1. Express Your Emotions

    • Type your feelings in the text area
    • Or use the voice input button to speak
    • Be specific about your emotions for better results
  2. Choose Art Style

    • Select from 8 available art styles
    • Each style has unique characteristics
    • Preview the style before generating
  3. Generate Art

    • Click "Generate Art" button
    • Wait 10-30 seconds for AI processing
    • View your artwork in 3D canvas
  4. Manage Your Art

    • Save artwork to local storage
    • Share via Web Share API or copy link
    • Regenerate with different variations

๐ŸŽจ Art Styles

Style Description Best For
๐ŸŽญ Realistic Photorealistic, detailed artwork Nature, portraits, landscapes
๐ŸŽŒ Anime Japanese animation style Characters, fantasy, colorful scenes
๐ŸŽจ Abstract Modern abstract art Emotions, concepts, artistic expression
๐Ÿ–ผ๏ธ Oil Painting Classical painting style Traditional art, historical themes
๐ŸŒ† Cyberpunk Futuristic neon style Technology, urban, sci-fi themes
๐ŸŽญ Watercolor Soft watercolor painting Gentle emotions, nature, dreamy scenes
โœ๏ธ Sketch Hand-drawn pencil art Quick concepts, artistic sketches
๐Ÿ“ผ Vintage Retro nostalgic style Nostalgic feelings, classic themes

๐Ÿ”ง API Endpoints

Generate Art

POST /
Content-Type: application/json

{
  "prompt": "I feel happy and excited about my new project",
  "style": "realistic"
}

Response:

{
  "image": "base64_encoded_image",
  "sentiment": "positive",
  "scores": {
    "compound": 0.8,
    "pos": 0.9,
    "neu": 0.1,
    "neg": 0.0
  },
  "style": "realistic",
  "status": "success"
}

Get Available Styles

GET /styles

Response:

{
  "styles": {
    "realistic": {
      "name": "Realistic",
      "description": "Photorealistic, detailed artwork",
      "icon": "๐Ÿ“ท"
    }
  },
  "status": "success"
}

๐Ÿ—๏ธ Architecture

graph TB
    A[User Input] --> B[Frontend - React/Vanilla JS]
    B --> C[Voice Recognition API]
    B --> D[Flask Backend API]
    D --> E[VADER Sentiment Analysis]
    D --> F[Pollinations.ai API]
    F --> G[AI Art Generation]
    G --> H[Base64 Image]
    H --> I[Three.js 3D Display]
    I --> J[User Interaction]
    J --> K[Save/Share/Regenerate]
Loading

๐Ÿš€ Deployment

Frontend (Netlify)

  1. Connect your GitHub repository to Netlify
  2. Set build command: npm run build (if using build process)
  3. Set publish directory: frontend/
  4. Deploy automatically on push to main branch

Backend (Render.com)

  1. Connect your GitHub repository to Render
  2. Set build command: pip install -r requirements.txt
  3. Set start command: python app.py
  4. Add environment variables if needed

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

  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

๐Ÿ“ž Support

๐Ÿ”ฎ Roadmap

  • User authentication and profiles
  • Art gallery and community features
  • Mobile app (React Native)
  • More art styles and customization
  • AI model fine-tuning
  • High-resolution export options
  • Social sharing integration
  • Art therapy features

Made with โค๏ธ by [Your Name]

Live Demo โ€ข GitHub โ€ข Portfolio

Releases

Packages

Contributors

Languages