This project is a web app that uses sentiment analysis to enable users get the most recent positive and negative reviews for any business by putting in the name and location.
Features to be added:
- direct link to instagram pages.
- direct link to websites.
- choose number of reviews.
- Features
- Architecture
- Getting Started
- API Endpoints
- Key Technologies
- Deployment
- How It Works
- Improvements and Roadmap
- Contributing
- License
- Recent Reviews: Focuses on the latest reviews for timely insights.
- Sentiment Analysis: Utilizes Natural Language Processing (NLP) to determine whether reviews are positive, negative, or neutral.
- Interactive Interface: Fully responsive web interface for seamless user experience.
The application is divided into two primary components:
- Built using FastAPI.
- Incorporates Selenium for web scraping customer reviews from Google.
- Uses NLTK Vader for sentiment analysis.
- Packaged in a Docker container (hosted on Docker Hub) with Chrome and ChromeDriver pre-installed for web scraping functionality.
- Hosted on Azure Web App Service.
- Developed with React (JavaScript, HTML, and CSS).
- Hosted on Netlify for a fast, reliable, and scalable frontend experience.
Ensure the following tools are installed:
- Docker
- Python 3.9+
- Node.js (for frontend development)
- Google Chrome (optional for debugging Selenium locally)
-
Clone the repository:
git clone https://github.com/0layiw0la/Customer-Review.git cd customer-review/API
-
Build and run the Docker container:
docker build -t customer-review-api . docker run -p 8000:8000 customer-review-api
OR
-
Pull Docker image
docker pull 0lay1w0la/customerreviewsapi
-
Run Docker container
docker run -p 8000:8000 customer-review-api
- Navigate to the
Frontend
directory:cd ../Frontend
- Install dependencies:
npm install
- Start the development server:
npm run dev
Api Link here
- Description: Test CORS setup.
- Response:
{ "message": "cors works" }
- Description: Scrapes reviews for a given business and performs sentiment analysis.
- Request Body:
{ "business_name": "Example Business", "location_name": "City, State" }
- Response:
{ "positive_reviews": { "review1": "date1", "review2": "date2" }, "negative_reviews": { "review3": "date3", "review4": "date4" }, "avg_rating": 4.5 }
- FastAPI: For API development.
- Selenium: For web scraping reviews from Google.
- NLTK Vader: For sentiment polarity scoring.
- Docker: For containerization and easy deployment.
- React: For the frontend user interface.
- The API is containerized and deployed using Azure's Web App Service.
- The Docker image is hosted publicly on Docker Hub. here
- The frontend is deployed on Netlify, ensuring fast and scalable delivery of the app.
- User Input: Enter a business name and location.
- Web Scraping: Backend scrapes Google reviews using Selenium.
- Sentiment Analysis: Reviews are analyzed using NLTK Vader to classify them as positive, negative, or neutral.
- Results: Displays the average rating, recent positive and negative reviews, and their dates.
- Expand review sources beyond Google.
- Add advanced filtering and categorization of reviews.
- Support for multiple languages.
- Upgrade hosting plan for more instances and faster response times.
Contributions are welcome! Please fork the repository, make changes, and submit a pull request.
This project is licensed under the MIT License.