all_doc
all_doc
A Project Report
submitted in partial fulfillment of the
requirements for the award of the degree of
Bachelor of Technology
In
Artificial Intelligence and Machine Learning
by
B. Guna Sri Rama Santosh (21H71A6107) P. Chandra mouli (21H71A6105)
K. Venkata Surendra Dattu (21H71A6163) T. Rohith Sai (21H71A6136)
March, 2025
i
DECLARATION
a. The work contained in this report is original and has been done by us under
the guidanceof our supervisor(s).
b. The work has not been submitted to any other Institute for obtaining any degree
or diploma.
c. We have followed the guidelines provided by the Institute in preparing the report.
d. We have conformed to the norms and guidelines given in the Ethical Code of
Conduct of the Institute.
e. Whenever we have used materials (data, theoretical analysis, figures, and text)
from other sources, we have given due credit to them by citing in the text of the
report and giving their details in the references.
Place: Kanchikacherla
TEAM MEMBERS
ii
CERTIFICATE
This is to certify that the project report entitled “AI-Driven Newsletter with
Website” submitted by B. Guna Sri Rama Santosh (21H71A6107), K. Venkata
Surendra Dattu (21H71A6163), P. Chandra mouli (21H71A6105), T. Rohith Sai
(21H71A6136) to the DVR & Dr. HS MIC College of Technology in partial
fulfillment of the requirements for the award of the Degree Bachelor of Technology in
Artificial Intelligence and Machine Learning is a bonafide record of work carried
out by him/her under my/our guidance and supervision. The contents of this report, in
full or in parts, have not been submitted to any other Institute for the award of any
Degree.
Principal
iii
ACKNOWLEDGEMENT
The satisfaction that accompanies the successful completion of any task would be
incomplete without the mention of the people who made it possible and whose constant
guidance and engagement crown all the efforts with success. We thank our college
management and respected Sri D. PANDURANGA RAO, CEO for providing us the
necessary infrastructure to carry out the project work.
We express our sincere thanks to our beloved Principal Dr. T. Vamsee Kiran who has
been a great source of information for our work.
We would like to express our sincere thanks to Dr. G. Sai Chaitanya Kumar, Head,
Department of AI for extending his support to carry on this project work.
We take this opportunity to express our thanks to one and all who directly or indirectly
helped us in bringing this effort to present form.
Finally, my special thanks go to my family for their continuous support and help
throughout my academic years and for their continual support and encouragement for
the completion of the project.
iv
CONTENTS
v
3.7.2 Non-Functional Requirements
3.8 System Specifications 26
3.9 UML diagrams 28
3.9.1 Use Case Diagram
3.9.2 Class Diagram
3.9.3 Sequence Diagram
3.9.4 Activity Diagram
3.10 Cost Analysis 39
CHAPTER 4: 4.1 Setting Up React & Material-UI 41
SOFTWARE 4.2 Setting Up Crew AI & Backend 43
INSTALLATION Services
CHAPTER 5: 5.1 Code Structure 48
IMPLEMENTATION 5.2 API Integration 51
CHAPTER 9: 9. References 65
REFERNCES
vi
LIST OF TABLES
vii
LIST OF FIGURES
viii
LIST OF ABBREVIATIONS
WORD ABBREVIATION
AI Artificial Intelligence
UI User Interface
ix
ABSTRACT
In today's fast-paced digital world, staying updated with the latest news and trends is
more important than ever. With an overwhelming amount of information available
online, finding relevant and credible content can be a challenge. Our project, AI-Driven
Newsletter with Website, is designed to solve this problem by offering users a
personalized and automated newsletter service that delivers curated news based on their
interests. By leveraging artificial intelligence and automation, this platform ensures that
users receive timely, well-structured, and insightful news updates without the need to
sift through countless sources.
The system is built using a robust technology stack, combining Django for backend
processing and React for an interactive frontend, seamlessly integrated through a REST
API. The platform is designed to offer a smooth and user-friendly experience, featuring
a modern landing page that showcases the latest articles, a seamless subscription
process for personalized newsletters, and essential authentication functionalities such
as login, signup, and password recovery. Every component is designed to provide a
secure and efficient interaction for users, ensuring ease of access while maintaining
data integrity.
x
CHAPTER 1
INTRODUCTION
1.1 Introduction
The advent of digital newsletters has revolutionized the way users consume content,
offering curated information on various topics of interest. However, most existing
newsletters are static, requiring users to subscribe to fixed topics with little flexibility.
In the era of artificial intelligence (AI), there is a growing need for a more dynamic and
personalized approach to news consumption.
With the rapid expansion of digital media and information overload, users often
struggle to find high-quality content tailored to their evolving interests. Traditional
newsletter services require users to manually search for, subscribe to, and unsubscribe
from newsletters based on their preferences. This process is cumbersome and does not
accommodate users who wish to frequently change their topics of interest without
repeated manual intervention.
By integrating AI-driven content aggregation, this project ensures that users stay
informed on their preferred topics while avoiding redundant searches and subscription
management. The automated system saves time, improves user experience, and
enhances content discovery by utilizing AI-powered curation and retrieval mechanisms.
1
1.2 Motivation
The motivation for this project stems from the increasing demand for personalized
content consumption. Many users subscribe to newsletters based on their interests, but
over time, these interests may change. Currently, finding new newsletters and
unsubscribing from old ones is a repetitive and time-consuming process. Our project
eliminates this hassle by allowing users to dynamically modify their newsletter
preferences in a single platform.
Additionally, as the volume of online content continues to grow, users are often
overwhelmed by information scattered across various sources. Our project provides an
AI-assisted solution that curates and delivers relevant content directly to users, ensuring
they receive high-quality, topic-specific newsletters without the need for extensive
searching.
Traditional newsletter platforms have limitations that hinder user flexibility and
engagement. The main challenges include:
2
• Fixed topic subscriptions that require manual searching and subscribing.
• Lack of dynamic modification options, forcing users to repeat the subscription
process if their interests change.
• Inability to receive multiple topics within a single newsletter.
• No access to previous newsletters once delivered.
• The overwhelming volume of online content makes it difficult to find reliable,
relevant information.
• Users are required to manage multiple newsletter subscriptions manually, which
is time-consuming and inefficient.
To address these issues, this project introduces an AI-powered solution that provides
users with a dynamic newsletter experience, allowing them to modify topics, receive
multi-topic newsletters, and access historical newsletters seamlessly. By leveraging
CrewAI, our system intelligently curates content from various sources, ensuring users
receive the most relevant and up-to-date information on their selected topics.
Moreover, the integration of AI-driven content retrieval minimizes the effort required
for users to stay informed, providing a more convenient and engaging content
consumption experience. This project aims to fill the gap in existing newsletter
solutions by offering a more adaptable and user-centric approach to news delivery.
3
6. To automate content discovery and delivery using AI, reducing the need for
manual intervention.
7. To enhance user engagement by providing high-quality, relevant, and up-to-
date information on chosen topics.
By achieving these objectives, the project aims to enhance the flexibility and efficiency
of content consumption, leveraging AI to deliver a truly personalized newsletter
experience. This innovative approach to newsletter subscription and delivery sets a new
standard in how users engage with digital content, making the entire process more
interactive, adaptive, and user-friendly. The integration of AI not only improves content
discovery but also ensures that users remain engaged with the most relevant and timely
information in their areas of interest.
4
CHAPTER 2
LITERTATURE REVIEW
2.1 Introduction
A literature review serves as a critical evaluation of previous research related to a
specific area of study. This chapter aims to explore existing work on newsletters, AI-
driven content curation, and personalization techniques in news delivery. By assessing
prior research, we identify gaps in knowledge and establish the foundation for our study
on AI-powered dynamic newsletters.
Medium and Substack are popular newsletter platforms that allow content creators to
send personalized newsletters to subscribers. However, studies indicate that these
platforms rely on rigid subscription models, limiting user control over content
preferences. This gap underscores the need for a more dynamic approach that enables
real-time modification of subscription topics.
5
Current AI-driven content curation primarily focuses on passive recommendations
rather than proactive user-controlled personalization. This gap highlights the need for a
hybrid model that combines AI-based personalization with user-driven customization.
Research by Johnson et al. (2021) suggests that an effective newsletter system should
allow for dynamic customization and historical access, which are currently absent in
mainstream platforms.
6
CHAPTER 3
METHODOLOGY
3.1 Research Approach and Justification
The AI-powered Dynamic Newsletter System is developed using an Incremental
Model, which allows for the step-by-step enhancement of features while continuously
refining the system based on user feedback. The project integrates CrewAI, Django
REST Framework (DRF), React, and Supabase (PostgreSQL) to provide personalized
and dynamic newsletters on user-selected topics.
Research Approach
The research approach for this project follows a modular and iterative development
strategy, ensuring a structured yet flexible framework for implementation. The key
aspects of this approach include:
The Incremental Model was chosen because it enables step-by-step development and
testing, ensuring that each component is fully functional before adding new features.
Unlike traditional models like the Waterfall approach, which requires the entire system
7
to be built before testing, the incremental model allows for early detection of issues and
continuous refinement. This flexibility is crucial, as the project integrates multiple
technologies, including CrewAI, Django REST Framework (DRF), React, and
Supabase (PostgreSQL).
By implementing the system incrementally, we minimized risks and ensured that each
feature was well-integrated and optimized before moving to the next stage.
The Incremental Model was chosen due to its suitability for AI-driven applications that
require scalability, flexibility, and continuous learning from user interactions. The
major reasons behind selecting this model include:
8
4. User Engagement & Feedback Loop – The model allows for the deployment of
initial features for early adopters, ensuring improvements are made based on
real-time feedback.
Implementation Phases
The system was implemented incrementally, with each phase focusing on core
functionality. This modular development ensures that each component is independently
functional while seamlessly integrating into the entire system.
• Implemented Django REST Framework (DRF) to structure the backend and API
functionalities.
• Designed and developed the news fetching API to retrieve articles from external
sources like OpenAI, DeepSeek, and other providers.
• Integrated API endpoints to allow users to sign up, log in, and select their
newsletter preferences.
• Designed a dashboard for users to access past newsletters and modify their
topics of interest dynamically.
• Built a system for guest subscriptions, where users can receive newsletters
without registering.
9
• Automated the newsletter dispatch system, ensuring timely and formatted email
delivery using background tasks.
Development
Advantages Disadvantages Applicability to Project
Model
Modular,
Requires careful Best suited for AI-driven,
Incremental scalable,
planning to avoid user-interactive
Model continuous
integration issues applications like ours
refinement
Table 3.1
10
The Incremental Model is the best fit because it allows for a structured yet flexible
development approach, ensuring that both AI-based improvements and user feedback
integration are seamlessly incorporated into the system.
• CrewAI agents are used to fetch and summarize news articles based on user-
defined topics.
• Eliminates the need for manual curation, making newsletters real-time and
contextually relevant.
• Django REST Framework (DRF) provides a scalable and modular API backend.
11
Why this Method?
• Scalability: Ensures the system can handle growing user traffic and expanding
datasets.
3. Frontend Development
o Sign up/Login
• Seamless API Integration: Fetches and updates user data in real time from the
backend.
4. Database Management
12
Why this Method?
The primary objective of this project is to offer personalized news updates based on
user interests. Traditional newsletter services require users to subscribe separately for
different topics, and if their interests change, they must unsubscribe and find new
sources. This process is time-consuming and often frustrating.
13
In contrast, our AI-powered dynamic newsletter system provides a seamless experience
where:
• Users select one topic of interest and receive news articles tailored to it.
• The system aggregates high-quality content from multiple sources, ensuring up-
to-date and relevant information.
• If a user loses interest in a topic, they can change their preference instantly
through the website, eliminating the need for multiple subscriptions.
• Users can also access their previous newsletters, allowing them to revisit past
news insights.
• This dynamic and user-centric approach makes the system more engaging and
efficient compared to existing solutions.
For authentication, Basic Token Authentication was chosen over JWT (JSON Web
Token) because it provides a simpler, more lightweight solution. JWT is commonly
used for authentication in highly distributed systems, but it comes with additional
overhead, such as token verification on each request and security considerations like
token expiration and refresh mechanisms.
Our project, being a newsletter-based system, does not require complex authentication
flows. Instead, a token-based approach ensures:
The backend architecture follows RESTful API principles, ensuring a modular and
scalable system. This design allows for smooth communication between the frontend
14
(React) and backend (Django + Supabase), making it easy to expand and integrate
additional features in the future.
The REST API-based architecture ensures that the system remains future-proof while
providing an efficient mechanism for handling dynamic content delivery.
The system employs automated scheduling to ensure that newsletters are delivered on
time without manual intervention.
15
• Automated email delivery – Using background tasks to send newsletters at
scheduled intervals.
• Failure handling and retries – Ensuring reliability even if temporary failures
occur during dispatch.
• By automating this process, we enhance system efficiency, allowing users to
receive timely updates without delays.
To maintain security and protect user data, several measures have been implemented,
including:
Instead of collecting data from multiple APIs or scraping sources, our system directly
interacts with OpenAI and DeepSeek models to generate relevant news articles based
on the user's selected topic. This approach ensures:
16
OpenAI & DeepSeek for News Fetching
• News Fetching Agent – Queries OpenAI or DeepSeek for relevant news based
on user input.
• News Analysis Agent – Extracts key points, trends, and contextual information.
• Editor Agent – Enhances the readability and flow of the generated content.
• Newsletter Compiler – Organizes and formats the content for structured email
delivery.
Each newsletter request dynamically generates customized news articles based on:
This eliminates the need for pre-stored data, making the process fully real-time and
personalized.
17
• Adds context using AI-powered insights.
3. News Analysis Agent extracts key insights → Identifies trends, risks, and
summaries.
18
3.5 Workflow of the Proposed Methodology
The NewsCrew System is designed to provide automated, AI-driven news fetching,
processing, personalization, and delivery. This workflow leverages ChatGPT API,
DeepSeek API, and Crew AI to ensure real-time, high-quality, and personalized news
content for users. The system follows a structured approach, moving through several
key stages:
At this stage, the system collects news from various online sources using ChatGPT API
and DeepSeek API. The purpose is to fetch the latest news articles, summarize them,
and filter out unnecessary information. The steps involved are:
1. Data Collection:
2. Content Summarization:
o The collected news articles are often lengthy. ChatGPT processes and
generates concise summaries to extract the most relevant points.
3. Content Categorization:
Once the news articles are collected, the system processes them further to enhance
readability, relevance, and personalization.
19
1. Text Cleaning & Preprocessing:
o The AI system checks for repeated news from multiple sources and
removes redundant information to avoid spam-like content.
The system ensures that each user receives customized news updates based on their
preferences.
o Users register and set preferences for news topics, sources, and
notification frequency.
o News articles are filtered, sorted, and ranked for each user based on their
past interactions and reading history.
Once news articles are processed and personalized, they are delivered to users through
multiple channels:
20
2. Web Dashboard (On-Demand Access)
o Users can log in to their dashboard to browse the latest news and manage
subscriptions.
o Users can like, dislike, or mark articles as irrelevant, helping the system
improve future recommendations.
3.6 Architecture
The architecture of our NewsCrew System is designed for efficient news processing,
personalization, and delivery using React Vite for the frontend, Django with Django
REST Framework (DRF) for the backend, and third-party AI APIs for content
processing. The system follows a modular architecture with clear separations between
frontend, backend, and external services.
1. Frontend (React )
• ChatGPT API & DeepSeek API: Used to fetch and process news articles
for better readability and summarization.
21
• Crew AI: Manages AI-driven news selection and categorization.
• Database (PostgreSQL or SQLite): Stores user details, preferences, and
processed news articles.
High-Level Workflow
• Django backend sends requests to ChatGPT API & DeepSeek API for news
retrieval.
• Crew AI processes the news for topic-based categorization and
personalization.
3. Subscription Management
4. News Delivery
o UI components
o User authentication
o Subscription management
o API integration
22
• Backend (Django & DRF)
o User authentication
o News fetching
o AI processing integration
o Database management
o ChatGPT API
o DeepSeek API
o Crew AI for intelligent processing
Functional requirements specify the core operations that the system must perform to
meet user expectations.
• The system integrates advanced AI models like ChatGPT API, DeepSeek API,
and CrewAI to fetch and generate news articles dynamically.
• The APIs work collaboratively to analyze various sources and generate concise,
well-structured news summaries.
2. User Management
• The system stores user preferences and allows them to modify their topic
selection after login.
• A search function is not included; instead, users can change their news
categories through the profile settings.
23
3. News Processing & Customization
• AI models process the fetched news content, ensuring it aligns with user
interests.
• News articles are delivered directly to users via email using Google SMTP.
• The email service ensures reliability and security while distributing news
updates.
• The UI is designed using React Vite, ensuring a fast and responsive frontend
experience.
• Users can view news articles, update preferences, and receive notifications.
• The system maintains a minimalistic and intuitive design for better usability.
Non-functional requirements define how the system performs under various conditions
and ensure efficiency, security, and reliability.
1. Performance
• The system must efficiently fetch, process, and deliver news articles with
minimal response time.
• Optimized API calls reduce latency, ensuring quick retrieval and delivery of
news.
24
2. Scalability
• The system is designed to handle increased traffic and can integrate additional
APIs for news aggregation in the future.
3. Security
• API keys are stored securely to prevent data leaks and misuse.
• The system ensures 99.9% uptime, with automatic error handling and recovery
mechanisms.
• Logs and monitoring tools track system performance and detect potential
failures.
5. Usability
• The platform offers a clean and intuitive UI, making navigation easy for all
users.
25
3.8 System Specifications
System specifications define the technologies, frameworks, and tools used in
developing the AI-powered news delivery platform. This section provides an overview
of the tech stack, highlighting the role of each component in ensuring a smooth,
scalable, and efficient system.
Technology Stack
• Material-UI (MUI):
26
3. Database Management
• PostgreSQL:
• Crew AI:
27
3.9 UML Diagrams
UML stands for Unified Modelling Language. UML is a standardized general-purpose
modelling language in the field of object-oriented software engineering. The standard
is managed, and was created by, the Object Management Group.
The goal is for UML to become a common language for creating models of
objectoriented computer software. In its current form UML is comprised of two major
components: a Meta-model and a notation. In the future, some form of method or
process may also be added to; or associated with, UML.
The UML represents a collection of best engineering practices that have proven
successful in the modelling of large and complex systems.
The UML is a very important part of developing objects-oriented software and the
software development process. The UML uses mostly graphical notations to express
the design of software projects.
28
Description: This use case describes how a user (either a visitor or a registered user)
interacts with the NewsCrew System to browse news, subscribe to newsletters, manage
subscriptions, and access their user dashboard.
Preconditions:
• A registered user can log in to manage their subscription and access the
dashboard.
Basic Flow:
3. If they wish to subscribe to newsletters, they can enter their email without
registration.
4. If they sign up and log in, they can access additional features.
6. They can view the user dashboard, which includes their subscription details and
personalized content.
Description:
This use case details the administrative functions involved in managing newsletters,
users, and automated system tasks.
Preconditions:
29
Fig 3.1
30
Fig 3.2
Basic Flow:
5. The admin can send newsletters to both subscribed visitors and registered users.
7. The system automatically runs scheduled cron jobs for email delivery and
updates.
31
3.9.2 Class Diagram
User Class
• Attributes:
• Methods:
Admin Class
• Methods:
32
o processNewsletter(content: String) : void → Processes and schedules
newsletters for delivery.
Subscription Class
• Attributes:
• Methods:
Newsletter Class
• Attributes:
• Methods:
Database Class
• Stores and manages system data, including user details, subscriptions, and
newsletters.
33
• Methods:
• Methods:
Fig 3.3
34
Relationships in the Class Diagram
• Admin manages Users and Newsletters → Admin can create, modify, and send
newsletters.
• Database stores and retrieves data → Stores and manages all system-related
data.
35
timing of interactions. They are often used during the design and
implementation phases of software development to model and
understand the behavior of complex systems or subsystems.
1. Frontend (React): The user interface where users register, subscribe, and
receive newsletters.
Process Flow
1. User Registration/Login
• The authentication system validates the credentials and checks/stores user data
in the database.
2. Newsletter Subscription
36
3. Newsletter Creation (Admin)
4. Sending Newsletters
Fig 3.4
37
3.9.4 Activity Diagram
Activity diagrams are graphical representations of workflows of stepwise activities and
actions with support for choice, iteration and concurrency. In the Unified Modeling
Language, activity diagrams can be used to describe the business and operational step-
by-step workflows of components in a system.
Fig 3.5
Actors Involved
• Admin: Responsible for creating, processing, and sending newsletters.
• User: Subscribes to newsletters and can update subscription topics.
• System: Handles authentication, password resets, and subscription updates.
38
Workflow Description
1. User Authentication
• The process starts with the user registering or logging into the system.
• The system checks if the login is successful:
• If yes, the system determines whether the user is an admin or a regular user.
• If no, an error message is displayed.
2. Admin Workflow
• If the logged-in user is an admin, they access the admin dashboard.
• The admin can create a newsletter, process it, and send it to subscribers.
• After completing these actions, the admin logs out.
3. User Workflow
• If the logged-in user is not an admin, they access the user dashboard.
• The user can view subscribed newsletters.
• They have the option to update their subscription topic:
• If they choose to update, the subscription is updated accordingly.
• The user then logs out.
4. Password Reset Process
• If the login fails, the system provides an option for password reset.
• If the user requests a password reset, the system validates the email and sends a
reset link.
• Once the reset is successful, the process ends.
OpenAI offers various models with pricing based on token usage. A token can be as
short as one character or as long as one word (e.g., "ChatGPT" is one token).
• GPT-3.5 Turbo:
o Pricing: $0.002 per 1,000 tokens.
o In INR: Approximately ₹0.17 per 1,000 tokens.
• GPT-4 (8k context length):
o Prompt Tokens: $0.03 per 1,000 tokens.
o Completion Tokens: $0.06 per 1,000 tokens.
39
o In INR:
▪ Prompt Tokens: Approximately ₹2.50 per 1,000 tokens.
▪ Completion Tokens: Approximately ₹5.00 per 1,000 tokens.
• GPT-4 (32k context length):
o Prompt Tokens: $0.06 per 1,000 tokens.
o Completion Tokens: $0.12 per 1,000 tokens.
o In INR:
▪ Prompt Tokens: Approximately ₹5.00 per 1,000 tokens.
▪ Completion Tokens: Approximately ₹10.00 per 1,000 tokens.
2. DeepSeek's AI Models:
DeepSeek provides AI models with pricing based on token usage. A token is the
smallest unit of text recognized by the model, including words, numbers, or punctuation
marks.
• DeepSeek-V3 (deepseek-chat):
o Pricing: $1.50 per 1 million tokens.
o In INR: Approximately ₹0.125 per 1,000 tokens.
• DeepSeek-R1 (deepseek-reasoner):
o Pricing: $4.50 per 1 million tokens.
o In INR: Approximately ₹0.375 per 1,000 tokens.
40
Chapter 4
Software Installation
4.1 Setting Up React (Vite) & Material-UI
In this section, we will set up React using Vite (a faster alternative to Create React App)
and integrate Material-UI for UI components.
Ensure that Node.js (LTS version) is installed on your system. You can download it
from the Node.js Official Website ( https://nodejs.org/en)
node -v
npm -v
Vite is a modern build tool that provides a faster development experience compared to
Create React App.
41
Step 3: Import Material-UI in Your Project
42
Basic Folder Structure
43
Key Features of Crew AI:
Crew AI is built using Python. To set it up, first, ensure Python is installed.
Python is a widely used programming language known for its simplicity and versatility.
It is extensively used in backend development, artificial intelligence, data science, web
applications, and automation. The following steps outline the installation process.
1. Download Python:
2. Install Python:
• Ensure you check the box "Add Python to PATH" before proceeding.
This step allows Python to be accessible from the command line.
44
• Click Install Now and follow the installation prompts.
• python --version
45
1. Set Up a Virtual Environment:
▪ On Windows:
▪ myenv\Scripts\activate
▪ On macOS/Linux:
▪ source myenv/bin/activate
2. Install Django:
• django-admin –version
• cd project name
46
Step 3: Installing Required Libraries
To enhance the functionality of Django and React applications, install the necessary
libraries as follows:
3. Install AI Tools:
4. Additional Libraries:
47
Chapter 5
Implementation
5.1 Code Structure
The project follows a modular structure, separating the backend (Django + DRF) and
frontend (React + Vite) for scalability and maintainability.
newscrew
│── backend
│ ├── api
│ │ ├── migrations
│ │ ├── templates
│ │ │ ├── newsletter_email_template.html
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── urls.py
│ │ ├── views.py
│ ├── core
│ │ ├── __init__.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ ├── wsgi.py
│ ├── newsletter
48
│ │ ├── output
│ │ │ ├── Bitcoin.md
│ │ │ ├── Nifty50.md
│ │ ├── tools
│ │ │ ├── __init__.py
│ │ │ ├── save_file.py
│ │ │ ├── search_tools.py
│ │ ├── __init__.py
│ │ ├── agents.py
│ │ ├── crew.py
│ │ ├── tasks.py
│ ├── .env
│ ├── .gitignore
│ ├── manage.py
│── frontend
│ ├── public
│ │ ├── icon.svg
│ ├── src
│ │ ├── App.css
│ │ ├── App.jsx
│ │ ├── components
│ │ │ ├── AppAppBar.jsx
│ │ │ ├── Hero.jsx
│ │ │ ├── NewsletterList.jsx
49
│ │ ├── pages
│ │ │ ├── Articles.jsx
│ │ │ ├── Dashboard.jsx
│ │ │ ├── LandingPage.jsx
│ │ │ ├── ResetPassword.jsx
│ │ │ ├── Settings.jsx
│ │ │ ├── SigninSide.jsx
│ │ │ ├── SignupSide.jsx
│ │ │ ├── Uarticles.jsx
│ │ │ ├── UserDashboard.jsx
│ │ │ ├── Users.jsx
│ │ │ ├── UserSettings.jsx
│ │ ├── index.css
│ │ ├── main.jsx
│ ├── .gitignore
│ ├── index.html
│ ├── package.json
│ ├── README.md
│ ├── vite.config.js
Backend: Built using Django + DRF, handling APIs, authentication, and data
management.
Newsletter Module: Uses CrewAI agents for news fetching, summarization, and email
dispatch.
50
5.2 API Integration
The project leverages Django Rest Framework (DRF) APIs, which interact with the
React frontend via Axios.
get-topic-
newsletters/<str:topic_name>/ GetTopicNewslettersAPIView
newsletters
render-
RenderNewsletterAPIView render-newsletter
newsletter/<str:filename>/
Table 5.1
Note: These are defined “api” project, hence prefix “api/” should be added to every url.
Password Reset API: Sends a password reset link to the user’s registered email.
User Data API: Retrieves user profile information, including subscription detail
The AI Newsletter project can be initially deployed on a local server for testing and
development purposes. Once fully tested, it can be deployed on a cloud server for
public access.
51
Phase 1: Local Deployment (Development Stage)
• The project can run on localhost using Django’s development server and
React’s local build.
Note: After integrating the database, we need to apply migrations once to update the
database with Django models and our own models.
52
Chapter 6
Result Analysis
6.1 Demonstration of Webpage
Fig 6.1
53
2.Signup Page
Fig 6.2
3.Signin Page
Fig 6.3
54
4.Admin Dashboard
Fig 6.4
Fig 6.5
55
6.Access the Articles to view or delete
Fig 6.6
Fig 6.7
56
8.User Dashboard
Fig 6.8
Fig 6.9
57
6.2 Newsletters Examples In Webpage
Fig 6.10
58
6.3 Newsletters Via Mail
Fig 6.11
59
6.4 Performance Insights of Open AI & Deep Seek
The AI Newsletter platform evaluates multiple AI models for content summarization
and generation. Below is a cost-performance comparison of various models, including
DeepSeek, to determine the most effective choice.
Good performance,
GPT-4o $0.11 ₹10
balanced cost
Table 6.1
Key Observations:
• GPT-4 is premium quality but expensive, best suited for critical summaries.
60
Optimization Strategy:
• Selective GPT-4 Usage: Only for high-end features or premium user access.
Fig 6.12
61
CHPATER 7
FUTURE WORK
As the newsletter system continues to evolve, several enhancements are planned to
improve performance, scalability, and user experience. This section outlines key
upgrades, including multi-topic newsletters, advanced prompting mechanisms, multi-
threading using Redis and Celery, and cloud deployment for enhanced scalability.
Currently, users can subscribe to a single topic per newsletter. The planned
enhancement will allow them to select multiple topics, enabling the system to generate
a more diverse and personalized newsletter. AI-driven curation will ensure that content
is relevant, avoiding redundant or generic information.
Expected Benefits:
Feature Benefit
Table 7.1
Currently, users select topics using short prompts. To refine personalization, we plan to
allow extended input where users can provide a detailed description of their
preferences. This input will be processed using AI to extract nuanced interests and
provide a more relevant newsletter experience.
Implementation Plan:
62
• AI Categorization: Match extracted topics with relevant news sources.
Advantages:
Table 7.2
63
CHAPTER 8
CONCLUSION
The AI-driven Newsletter with Website successfully integrates artificial intelligence
and modern web technologies to provide a seamless, personalized news experience.
This project automates the entire process of news aggregation, summarization,
categorization, and distribution, ensuring that users receive curated content based on
their interests. By leveraging CrewAI, Django (DRF), React, and Supabase (Postgres),
the system effectively manages user preferences, authenticates subscribers, and delivers
dynamic newsletters via email.
The website serves as an interactive platform where users can register, subscribe,
manage their topic preferences, and access previous newsletters. The admin portal
enhances system control, allowing administrators to oversee user management, monitor
article summaries, and configure newsletter settings efficiently. The integration of AI
models, including OpenAI’s GPT and DeepSeek, enables the system to generate
concise, high-quality summaries, reducing manual effort while maintaining content
relevance and readability.
64
CHAPTER 9
REFERENCES
[1] Smith et al. (2019) – Explores traditional newsletter models and their limitations,
including inflexible subscriptions.
[2] Kumar & Patel (2022) – Discusses AI-powered recommendation systems and their
role in improving content engagement.
[3] Johnson et al. (2021) – Examines the importance of dynamic newsletter
customization and historical access to past content.
[4] Google News & Flipboard AI Algorithms – Case studies on how AI-driven
content recommendation works in large-scale news aggregation.
[5] Medium & Substack Subscription Models – Research on static subscription-
based models and their limitations in user personalization.
[6] AI-Based Summarization Models – Studies on OpenAI's GPT-4 and DeepSeek
for content summarization and retrieval.
[7] Performance Insights of OpenAI & DeepSeek Models – Cost-performance
comparison of AI models used for newsletter content generation.
[8] Tom Christie (2017) – Django REST Framework Documentation – Official guide
and principles for building APIs in Django.
[9] React: A JavaScript Library for Building User Interfaces – React
documentation by Meta (formerly Facebook) for component-based UI
development.
[10] Anthony Herbert (2021) – Django for APIs: Build Web APIs with Python &
Django – Covers API development using Django REST Framework.
[11] React & Material-UI Integration – Guides and papers on using Material-UI
for frontend UI components with React.
[12] Supabase Documentation – PostgreSQL-based real-time backend services
for scalable applications.
65