HeadlineAI: AI-Powered News Application PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This document outlines the HeadlineAI project, an AI-powered news application. The application boasts a conversational user interface and leverages APIs for querying news articles. It includes details on the project's technology stack, features, and development approach, highlighting the use of cloud-native development, Docker, and Docker Compose.
Full Transcript
Headline AIHeadlineAI: AI-Powered News Application**1. Project Overview Project Name: HeadlineAI Purpose: HeadlineAI is an AI-powered news application with a conversational user interface (CUI), designed to help users query news efficiently. It pulls information from multiple sources using A...
Headline AIHeadlineAI: AI-Powered News Application**1. Project Overview Project Name: HeadlineAI Purpose: HeadlineAI is an AI-powered news application with a conversational user interface (CUI), designed to help users query news efficiently. It pulls information from multiple sources using APIs, offering users accurate and relevant news articles. Technology Stack: Frontend: Next.js Backend: FastAPI Database: PostgreSQL API Integration: NewsAPI + Tavily API for web search ORM: SQLModel Testing: Pytest Dependency Management: Poetry Containerization: Docker, Docker Compose Cloud Native Development: Dev containers for consistent development environments 2. Features Fetches news articles based on user queries using NewsAPI and Tavily API for extended web search capabilities. Advanced search options (keywords, AND/OR logic, language filters, date filters). Planned voice input/output functionality for a more natural user interaction. Users’ news query histories will be maintained and managed in future iterations. 3. Development Approach Cloud-Native Development: The project is being developed using a cloud-native style to ensure scalability and portability. Dev containers are used for consistent development environments. Containerization: Docker and Docker Compose will be used for deployment and local development, ensuring consistency between environments. 4. Installation & Setup Prerequisites: Docker & Docker Compose installed NewsAPI and Tavily API keys Steps: Clone the project repository. Set up development containers: docker-compose up...more details will be added after setting up the project 3. Set up environment variables: - Create a `.env` file in the root directory: `bash NEWS_API_KEY=your_news_api_key TAVILY_API_KEY=your_tavily_api_key ` 4. Access the development environment using the dev containers. 5. Run the application locally: `bash docker``-compose run app ` ### 5. API Integrations - **NewsAPI**: For fetching news articles based on user queries. - **Tavily API**: Used to extend news search by performing web searches beyond traditional news articles. ### 6. Architecture - **Frontend**: The conversational UI built with Next.js interacts with the backend API to handle user queries and display results. Different frontend styling and components libraries can be used to make the interface better. - Landing page with about of the app, signup, login and some other introductory things usually are in a sophisticated landing page - Login Page - Signup Page - The main app page with a Conversational UI: with a input text box at the bottom, a send button at the end, a user profile icon on the top right, A log out button somewhere like at the bottom left. - **Backend**: 1. Receives search queries from the frontend. 2. Queries NewsAPI and Tavily API and other sources. 3. Formats and returns the results to the frontend in the form of messages list - **Database**: PostgreSQL stores user history (future iterations). ### 7. Future Enhancements - **Voice Input/Output**: Enabling users to interact with HeadlineAI using voice commands. - **More Search Tools**: Integration with additional news sources and APIs to enhance search functionality. - **User History Management for different Sessions**: Maintaining and retrieving individual user histories for different sessions to help him start the conversation from the same state where he had left the conversation ### 8. Minimal Version - **Initial Features**: The first draft will focus on basic text-based search with a minimalistic UI. - **Planned Enhancements**: After launching the minimal version, the focus will be on improving the user interface, integrating voice interaction, and adding support for managing user histories. ### 9. Testing - **Unit Tests**: Written using Pytest to ensure the application functions as expected. - **Test Environment**: Ensure consistency using Docker to run tests in an isolated environment. ### 10. Contributing - **Fork and Clone**: Collaborators can fork the repository, clone it, and work on feature branches. - **Branch Naming**: Use descriptive names like `feature/voice-input`. - **Pull Requests**: Submit PRs for review before merging into the main branch. This first draft will help your collaborators understand the project's structure and goals. Over time, you can expand sections such as **API Integrations** and **Architecture** as more features are implemented.