FeelFusion is a modern web application built with Next.js and Ant Design that analyzes the sentiment of text using Azure Text Analytics API. The application provides real-time sentiment analysis, visualization, and history tracking.
- Real-time Sentiment Analysis: Analyze text sentiment with Azure Text Analytics API
- Multi-language Support: Support for English, Bangla, Hindi, Urdu, and Arabic
- Sentiment Visualization: View sentiment scores with progress bars and charts
- History Tracking: Keep track of previous analyses with local storage
- Data Visualization: View sentiment trends and distribution with interactive charts
- Text-to-Speech: Listen to your text with sentiment-adjusted voice
- Dark Mode: Toggle between light and dark themes
- Responsive Design: Works on desktop and mobile devices
- Confetti Effect: Celebration animation for positive sentiments
Before you begin, ensure you have:
- Node.js 16.x or later installed
- An Azure account with Text Analytics API set up
- API Key and Endpoint URL from Azure Text Analytics
git clone https://github.com/yourusername/feelfusion.git
cd feelfusionnpm installCreate a .env.local file in the root directory with the following variables:
TEXT_API_KEY = your_azure_text_api_key
TEXT_ENDPOINT = your_azure_text_endpointnpm run devOpen http://localhost:3000 in your browser to see the application.
feelfusion/
├── app/
│ ├── actions.js # Server actions for sentiment analysis
│ ├── env.js # Environment variable handling
│ ├── globals.css # Global styles
│ ├── layout.js # Root layout component
│ └── page.js # Main page component
├── components/
│ ├── confetti-effect.js # Confetti animation for positive sentiment
│ ├── language-selector.js # Language selection component
│ ├── sentiment-chart.js # Charts for sentiment visualization
│ ├── sentiment-emoji.js # Emoji display based on sentiment
│ ├── sentiment-history.js # History tracking component
│ ├── text-suggestions.js # Example text suggestions
│ ├── text-to-speech.js # Text-to-speech functionality
│ ├── theme-provider.js # Theme context provider
│ └── theme-toggle.js # Theme toggle button
├── public/
│ └── ... # Static assets
├── .env.local # Environment variables (not in repo)
├── next.config.js # Next.js configuration
├── package.json # Project dependencies
└── README.md # Project documentation
- The user enters text in the input field and selects a language
- The application sends the text to Azure Text Analytics API via a server action
- The API returns sentiment scores (positive, neutral, negative) and an overall sentiment
- The application displays the results with visual indicators and stores them in history
- The user can view insights, export history, and use text-to-speech functionality
To add more languages, update the languages array in components/language-selector.js and add corresponding suggestions in components/text-suggestions.js.
The application uses Ant Design's theme system. You can customize colors by modifying the theme provider in components/theme-provider.js.
The easiest way to deploy the application is with Vercel:
npm install -g vercel
vercelDon't forget to add your environment variables in the Vercel dashboard.
You can also deploy to other platforms like Netlify, AWS Amplify, or traditional hosting by building the application:
npm run build
npm startIf you encounter issues connecting to the Azure Text Analytics API:
- Verify your API key and endpoint URL
- Check if your Azure subscription is active
- Ensure your IP is not blocked by Azure
The application works best in modern browsers. For text-to-speech functionality, Chrome or Edge is recommended.
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework
- Ant Design - UI component library
- Azure Text Analytics - Sentiment analysis API
- Framer Motion - Animation library