说明: Sunny Snippets是一个积极的新闻web应用程序,由Next.js和Tailwind CSS构建,可以提供令人振奋的新闻文章,同时结合情感分析来过滤掉带有负面色调的内容。
(Sunny Snippets is a positive news web application, built with Next.js and Tailwind CSS, that delivers uplifting news articles while incorporating sentiment analysis to filter out content with negative tones.)
# Sunny Snippets
Sunny Snippets is a positive news web application built with Next.js and Tailwind CSS. It displays uplifting news articles and provides sentiment analysis to filter out articles with negative sentiment scores.
## Features
- Display positive news articles in a card format.
- Navbar with logo and login section.
- Hero section with a warm welcome to the app.
- Integration with the NewsAPI to fetch real-time news data.
- Sentiment analysis to filter articles based on positivity.
## Getting Started
### Prerequisites
- Node.js installed on your machine.
- NewsAPI key. Obtain it [here](https://newsapi.org/).
- Clerk Key
- Firebase key
### Installation
1. **Clone the Repository**
2. **Install Dependencies**:
```bash
npm install
```
3. Create a `.env.local` file in the project root and add your NewsAPI key:
```bash
NEXT_PUBLIC_NEWS_API_KEY=your-news-api-key
```
4. **Run the Application**:
```bash
npm run dev
```
The app will be available at http://localhost:3000.
## Technologies Used
| Technology | Purpose |
|------------|---------|
|
[Next.js](https://nextjs.org/) | React framework for building web applications |
|
[React](https://reactjs.org/) | JavaScript library for building user interfaces |
|
[Tailwind CSS](https://tailwindcss.com/) | Utility-first CSS framework for styling |
|
[NextUI](https://nextui.org/) | UI library for Tailwind CSS with theming support |
|
[NewsAPI](https://newsapi.org/) | API for fetching news articles |
|
[sentiment](https://www.npmjs.com/package/sentiment) | AFINN sentiment analysis library |
|
[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | Web API for making HTTP requests |
|
[Clerk](https://clerk.com) | Multi-Factor Authentication service |
|
[Firebase](https://firebase.google.com/) | NoSQL database for a serverless backend |
## Contributing
If you have any suggestions, enhancements, or bug fixes, feel free to open an issue or submit a pull request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.