This web application analyzes the sentiment of online articles using the MeaningCloud API. The app provides insights into the polarity, subjectivity, and extracts snippets from the article for each sentiment case (positive, negative, neutral).
This project is part of the Udacity Front-End Web Developer Nanodegree.
- Accepts URLs for online articles as input.
- Uses the MeaningCloud API for sentiment analysis.
- Displays results such as polarity, subjectivity, and article snippets.
- Developed with modern build tools like Webpack.
- Supports both development and production builds.
- CSS is minified for production to reduce the size of styling.
- All styles are written in Sass.
- Implements service workers using
WorkboxPlugin.GenerateSW
.
-
Clone the repository:
git clone https://github.com/your-repo-name.git cd your-repo-name
-
Install dependencies:
npm install --legacy-peer-deps
-
Development Build: Run the development version of the project.
npm run build-dev
-
Production Build: Build the project for production.
npm run build-prod
-
Start Server: Start the server.
npm run start
-
Run test cases: run unit test cases for each function.
npm run test
- run the client server using
npm run build-dev
|npm run build-prod
- Start the server using the
npm run start
command. - Open your browser and navigate to
http://localhost:3000
|http://localhost:8000
. - Enter the URL of an online article into the input field.
- View the sentiment analysis results, including polarity, subjectivity, and snippets.
This project uses Webpack for building and bundling assets.
- Development: Use
npm run build-dev
for a live development experience with source maps enabled. - Production: Use
npm run build-prod
for an optimized and minified production build.- CSS is minified to reduce the file size.
- Service workers are generated using
WorkboxPlugin.GenerateSW
for offline support.
All styles in the project are written in Sass and compiled into CSS during the build process.
This project uses the MeaningCloud API for sentiment analysis. Ensure you have a valid API key and replace the placeholder in the code with your key.
- Frontend: HTML, Sass (CSS preprocessor), JavaScript
- Backend: Node.js with Express.js
- Build Tool: Webpack
- API: MeaningCloud API
- Thanks to Udacity for providing the course and starter code.