0% found this document useful (0 votes)
7 views41 pages

Mini Project PDF

The document outlines a project report for an AI-Powered Twitter Post Automation system developed by Khushal Rupala and Vraj Kansara as part of their Master of Science in Information Technology. The system aims to automate Twitter posting by generating engaging, human-like tweets and managing multiple accounts through a user-friendly interface, addressing the limitations of existing manual and semi-automated tools. The project emphasizes the integration of modern technologies such as FastAPI, Next.js, and AI content generation to enhance social media marketing efficiency.

Uploaded by

see1.sees5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views41 pages

Mini Project PDF

The document outlines a project report for an AI-Powered Twitter Post Automation system developed by Khushal Rupala and Vraj Kansara as part of their Master of Science in Information Technology. The system aims to automate Twitter posting by generating engaging, human-like tweets and managing multiple accounts through a user-friendly interface, addressing the limitations of existing manual and semi-automated tools. The project emphasizes the integration of modern technologies such as FastAPI, Next.js, and AI content generation to enhance social media marketing efficiency.

Uploaded by

see1.sees5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AI-Powered Twitter Post Automation

A Project Report

Submitted by:

Khushal Rupala (IU2454100013)

Vraj Kansara (IU2454100024)

in partial fulfilment for the award of the degree

of

MASTER OF SCIENCE – INFORMATION TECHNOLOGY

at

Department of Computer Science

INDUS UNIVERSITY

June - December 2025


CERTIFICATE

This is to certify that the project titled “AI-Powered Twitter Post Automation” is
the Bonafide work carried out by Khushal Rupala and Vraj Kansara, a student
of MSc-IT SEM - III during the academic year 2025 - 26, in partial fulfillment of
the requirements for the award of the degree of Master of Science in
Information Technology.

Internal Guide Signature: Head of Dept. Signature:

______________________ ______________________

Date: _________________ Date: __________________


Acknowledgement

We would like to express our heartfelt gratitude to our project guide Prof.
Manisha Bhatol for her invaluable guidance, support, and encouragement
throughout the development of this project. Her continuous supervision,
insightful feedback, and motivation played a crucial role in helping us
transform our ideas into a practical and successful solution.

We also extend our sincere thanks to our faculty members and mentors for
their consistent support and constructive suggestions at every stage of this
project.

We are grateful to our college for providing us with the opportunity,


infrastructure, and resources to work on this project, which enabled us to
explore and implement modern technologies such as FastAPI, [Link], Redis,
and cloud deployment in a real-world context.

A special thanks to our teammates for their collaboration, dedication, and


creative efforts that made this project possible.

Finally, we would like to acknowledge the open-source community and


online resources that greatly assisted us during our research and
implementation phases.

This project has been a remarkable learning journey for us, both technically
and personally, and we sincerely thank everyone who contributed in any way
to its successful completion.

THANK YOU
Table Of Contents

Sr. No. Contents Page No.


1 Introduction 1

2 Organization Profile 2

3 Existing system 4

4 Problem areas of existing system 6

5 Need for the new system 8

6 Proposed System 10

7 System Flow Diagram 14

8 UML Diagrams (Class, Activity, Sequence, Use 16


case)

9 Data Dictionary 21

10 User Interface Screens 26

11 Test Plan and Test Cases 30

12 Future Enhancement 32

13 References 34
INTRODUCTION

In today’s digital world, social media has become a powerful tool for
communication and outreach. Platforms like Twitter are widely used for
sharing ideas, promoting businesses, and engaging with communities in real
time. Yet, maintaining a consistent presence is difficult, as it requires frequent
content creation, timing, and management across different accounts. Manual
posting often leads to irregular activity and reduced impact, highlighting the
need for a system that automates and simplifies this process.

Our AI-Powered Twitter Post Automation is developed to meet this


requirement. It enables users to connect multiple Twitter accounts, create
campaigns, and define their preferences for posting. Unlike common
scheduling tools, we use artificial intelligence to generate human-like,
engaging tweets that align with the user’s chosen style. Users can set flexible
schedules, whether daily, on selected weekdays, or on custom dates, while
the platform automatically generates and posts content at the specified times.
This reduces effort and ensures consistent online activity.

The platform is built with a modern architecture, using FastAPI, Redis, and
Supabase on the backend with a [Link] frontend for smooth interaction.
Along with automated posting, we maintain posting history and supports
campaign-based planning, making it suitable for individuals, startups, and
organizations. By combining automation with AI-driven creativity, we offer a
practical solution that helps users stay active on Twitter while focusing more
on their core ideas and less on repetitive tasks.

PAGE 1
ORGANIZATION PROFILE

1. Development Team

AI-Powered Twitter Post Automation platform has been developed as an


academic/educational project to demonstrate the practical application of
artificial intelligence and automation in the domain of social media marketing.
The project follows an Agile-inspired methodology, enabling iterative design,
implementation, and testing cycles to maintain adaptability and quality. It has
been executed by a compact team of 2–4 student developers, allowing for
close collaboration and shared ownership of all phases, from requirements
gathering and system design to coding, testing, and documentation. The
entire project was developed over a span of 3–6 months, ensuring a
structured yet flexible development cycle similar to modern industry practices.

2. Technology Expertise

The development team brings together a variety of technical competencies


essential for building an AI-powered, web-based automation platform:

• Programming Languages: Proficiency in Python for backend services


and JavaScript/TypeScript for frontend development.
• Frameworks: Skilled in FastAPI for backend API development, [Link]
for creating modern, scalable frontends, and Redis for scheduling tasks
and caching.
• Database: Experience with Supabase (PostgreSQL-based) for
structured data storage, retrieval, and integration.
• Artificial Intelligence: Knowledge of prompt engineering and GPT-
based models to generate human-like, context-aware Twitter posts.
• Web Technologies: Familiarity with REST APIs, OAuth for Twitter
authentication, and responsive web design principles to ensure

PAGE 2
seamless user interaction.

3. Project Goals

The primary goals of us are to:

• Enable users to connect multiple Twitter accounts and manage them


from a unified platform.
• Allow creation of campaigns where users can define content type, tone,
and schedule (daily, weekly, or custom dates).
• Integrate artificial intelligence to generate human-like, witty, and
engaging tweets automatically.
• Automate the posting process using Redis scheduling while maintaining
a complete history of past posts.
• Demonstrate how modern AI and web technologies can be combined to
solve real-world challenges in digital marketing, bridging the gap
between academic learning and industry needs.

PAGE 3
EXISTING SYSTEM

1. Current Twitter Post Management Methods


At present, content posting and scheduling on Twitter is handled through a
mix of manual effort and third-party tools.

• Manual Posting: The most common method remains logging into a


Twitter account directly and publishing tweets manually. This gives
users full control but requires constant effort, attention, and
consistency.
• Basic Scheduling Tools: Platforms such as Buffer, Hootsuite, or
TweetDeck allow users to pre-schedule tweets. However, these rely
entirely on user-generated content and provide limited automation in
terms of creativity or personalization.
• Social Media Management Suites: Advanced enterprise tools integrate
multiple social platforms and provide analytics, but they are often too
complex and expensive for individuals or small teams.
• AI Text Generators: While separate AI tools can help generate tweet
text, they are not directly integrated with scheduling or posting
platforms, forcing users to juggle multiple tools.

2. Limitations of Existing Systems


Although current methods provide basic functionality, they suffer from several
limitations that reduce their effectiveness:

• Effort-Intensive: Manual posting demands continuous effort and


discipline, which is often unsustainable for busy individuals or teams.
• Lack of Integration: AI text generators and scheduling tools exist
separately, requiring users to switch between platforms to prepare and
publish content.
• Repetitiveness: Many scheduling platforms cannot ensure variety in
content, increasing the risk of repetitive or low-quality tweets.

PAGE 4
• Cost Barriers: Professional social media management tools with
advanced features are priced at a level unaffordable to students, small
startups, or individual users.
• Limited Focus: Existing systems are general-purpose across multiple
social networks, but none are tailored specifically for consistent, high-
quality Twitter content creation and automation.

3. Market Analysis
Despite these challenges, the market environment reveals strong potential for
improved, AI-powered solutions:

• Social Media Growth: Twitter remains one of the most widely used
platforms for startups, creators, and professionals to build their voice
and influence.
• Need for Consistency: Influencers, businesses, and communities
increasingly recognize the importance of regular posting to maintain
visibility and engagement.
• AI in Marketing: Artificial intelligence is gaining rapid adoption in
content creation, yet most existing tools lack seamless integration with
automated publishing workflows.
• Affordable Automation: There is a rising demand for lightweight, cost-
effective platforms that combine intelligent content generation with
automated posting, especially among students, small businesses, and
solo entrepreneurs.

PAGE 5
PROBLEM AREAS OF EXISTING SYSTEM

Existing systems also present technical shortcomings that reduce their


reliability, flexibility, and scalability in the context of Twitter automation:

• Content Quality Concerns: Many AI-generated text tools produce


generic or robotic-sounding posts, which fail to capture human
attention or spark engagement.
• Integration Gaps: Current tools are either focused only on scheduling
or only on content generation, lacking a seamless, end-to-end solution
for posting.
• Scalability Issues: Traditional schedulers may not handle multiple
accounts or large-scale campaigns efficiently, making them unsuitable
for professional or agency use.
• API Dependency: Heavy reliance on third-party APIs like Twitter’s can
result in instability, limited features, or sudden disruptions if rate limits
or policies change.
• Data Security: Existing platforms often provide limited assurance on
the safe storage of user credentials (e.g., access tokens for accounts),
raising concerns about privacy and misuse.

User Experience Problems


Shortcomings in user experience significantly limit adoption and consistent
usage of existing systems:

• Complex Workflows: Many tools have cluttered dashboards and


require users to switch between multiple platforms for writing,
scheduling, and analytics.
• Lack of Personalization: Generic suggestions fail to adapt to individual
user preferences, brand tone, or previous posting history.
• No History Tracking: Several systems do not provide a clear log of past
tweets, preventing users from monitoring campaign performance or
avoiding repetition.

PAGE 6
• Limited Feedback Loops: Few platforms allow users to refine AI output
through feedback, making it difficult to continuously improve content
quality.
• Overhead for Small Users: Enterprise-grade tools often overwhelm
casual users with unnecessary features, while still being too expensive
for them.

PAGE 7
NEED FOR THE NEW SYSTEM

The shortcomings of existing Twitter posting and scheduling systems create a


clear demand for a more advanced and intelligent solution. Our AI-Powered
Twitter Post Automation project is designed to overcome these limitations by
combining automated scheduling with AI-driven content generation. The
following points highlight the primary and secondary needs for such a system,
as well as the justification for its development.

1. Primary Needs
To effectively support consistent and engaging presence on Twitter, the new
system must meet several critical requirements:

• Automation: Provide reliable, automated scheduling of posts so that


users can maintain daily or custom posting routines without manual
effort.
• Human-Like Content: Deliver high-quality, engaging, and witty text
generated by AI that feels authentic and avoids robotic patterns.
• Flexibility in Scheduling: Support daily posts, weekday-specific
schedules, or custom calendar dates based on user preferences.
• Multi-Account Support: Allow users to connect and manage multiple
Twitter accounts under one platform.
• Campaign Management: Enable structured content planning through
campaigns, where users define type, tone, and frequency of posts.

2. Secondary Needs
In addition to the primary requirements, the system should integrate features
that enhance scalability, reliability, and user control:

• Data Security: Safely handle user authentication tokens and account

PAGE 8
data while ensuring compliance with privacy best practices.
• Scalability: Efficiently manage posting schedules for many users and
accounts without performance degradation.
• Integration: Provide smooth integration with Twitter APIs for publishing,
tracking, and account management.
• History Tracking: Maintain records of posted content so users can
review past activity and avoid repetition.
• User Feedback: Incorporate mechanisms for users to refine or improve
generated content, ensuring higher personalization over time.

3. Business Justification
Developing a robust, AI-powered posting platform offers substantial value for
users and stakeholders alike:

• Time Savings: Automation reduces the manual effort required to log in,
draft, and post tweets, freeing up user time for creative and strategic
tasks.
• Consistency: Regular posting increases audience engagement and
visibility, which is crucial for influencers, startups, and businesses.
• Cost Efficiency: Compared to expensive enterprise tools, a lightweight
and accessible platform provides advanced features at an affordable
scale.
• Market Opportunity: The growing reliance on social media for
marketing, networking, and influence creates strong demand for
intelligent automation tools.
• Educational Value: The project showcases how artificial intelligence,
scheduling systems, and web technologies can be applied to solve real-
world digital marketing challenges, bridging the gap between academic
learning and industry practice.

PAGE 9
PROPOSED SYSTEM

The proposed AI-Powered Twitter Post Automation system is designed to


overcome the limitations of existing Twitter management tools by combining
automated scheduling with intelligent, human-like AI content generation. The
system allows users to connect multiple accounts, create campaigns with
specific tones and posting preferences, and rely on automation to both
generate and publish tweets at the right times. By introducing background
services for continuous monitoring and content generation, the platform
ensures consistency, timeliness, and reduced user effort while maintaining
security and scalability.

1. System Architecture
The system follows a modular layered architecture that separates the user
interface, business logic, and data storage to ensure scalability and
maintainability.

• Frontend ([Link]): Provides users with an intuitive, web-based


interface to manage campaigns, connect accounts, and view posting
history.
• Backend (FastAPI - Python): Implements business logic, scheduling
endpoints, and integration with AI services and Twitter APIs.
• Database (Supabase - PostgreSQL): Securely stores user details,
campaign data, and posting history.
• Redis Store: Serves as a fast in-memory cache for scheduling and
storing generated content until it is posted.
• AI Content Generator (GPT Models): Produces high-quality, human-
like tweet drafts based on user preferences and campaign rules.
• Background Services:
o Scheduler Service: Runs every minute, checking if any campaign
requires content posting or fresh content generation. If posting is
due, it triggers the backend API to handle publishing. If content
generation is required, it calls the second service.
o Content Generation Service: Triggered when new content is

PAGE 10
needed (typically every 24 hours or when all queued tweets have
been used). It fetches the user’s preferences such as tone,
number of posts, and restrictions then runs the content
generation workflow. The newly generated tweets are stored in
Redis for fast retrieval.

2. Core Components
2.1 User Interface Layer

• Authentication: Secure login/signup system with support for multiple


Twitter account connections via OAuth.
• Dashboard: Centralized view of campaigns, connected accounts, and
scheduled posts.
• Campaign Builder: Allows users to specify campaign goals, tone,
number of posts per day, and posting schedule (daily, weekly, or custom
dates).
• History Tracking: Displays past tweets published through the system,
providing transparency and reducing repetition.
• Profile Management: Tools for updating user preferences,
connecting/disconnecting accounts, and managing campaigns.

2.2 Business Logic Layer

• Campaign Engine: Manages creation, updates, and scheduling logic for


campaigns.
• Content Engine: Handles prompt construction and AI-based tweet
generation aligned with campaign rules.
• Scheduler Service: Background job that ensures timely triggering of
both content posting and content generation.
• Posting API Service: Publishes generated tweets to Twitter via API calls
at the correct scheduled times.

2.3 Data Layer

• User Database: Stores user accounts, linked Twitter accounts, and


campaign details.

PAGE 11
• Campaign Database: Maintains campaign rules, schedules, and user
preferences.
• Posting History Database: Stores all past tweets for auditing, and
avoiding duplication.
• Redis Cache: Stores generated tweets temporarily for quick access
during scheduled posting cycles.

3. Key Features

3.1 Campaign & Posting Features

• Automated Scheduling: Post tweets at exact times based on daily,


weekly, or custom schedules.
• Recurring Content Generation: Ensure new tweets are generated every
24 hours or when all pre-generated content is exhausted.
• Multi-Account Support: Manage and post from multiple Twitter
accounts within the same user profile.
• Posting History: Keep a record of all past tweets for monitoring and
consistency.
• Content Variety: AI ensures tweets are non-repetitive, personalized,
and aligned with the campaign tone.

3.2 User Management Features

• Secure Authentication: Protects user accounts and Twitter API tokens


with industry standards.
• Profile Management: Allows users to connect/disconnect accounts,
adjust preferences, and manage campaigns.

3.3 Analytics & Insights (Future Enhancement)

• Engagement Tracking: Monitor likes, retweets, and impressions of


tweets.
• Performance Insights: Identify high-performing content styles and
timings.

PAGE 12
• Trend Avoidance: Prevent repetition of content by checking against
history.

PAGE 13
SYSTEM FLOW DIAGRAM

1. Client

PAGE 14
2. Server

PAGE 15
UML DIAGRAMS
ACTIVITY DIAGRAM

PAGE 16
SEQUENCE DIAGRAM

1. campaign-creation

PAGE 17
2. Posting

PAGE 18
CLASS DIAGRAM

PAGE 19
USE-CASE DIAGRAM

PAGE 20
DATA DICTIONARY
1. user Table

Field Name Data Type Constraints Description

uid UUID PRIMARY KEY, NOT NULL Unique user


identifier

uname TEXT NOT NULL User's display name

email TEXT NOT NULL, UNIQUE User's email


address

password TEXT NULLABLE User's encrypted


password

last_updated TIMESTAMP NULLABLE, DEFAULT Last profile update


CURRENT_TIMESTAMP time

created_at TIMESTAMP NULLABLE, DEFAULT Account creation


CURRENT_TIMESTAMP timestamp

two_factor BOOLEAN NULLABLE, DEFAULT false Two-factor


authentication
status
subscription_tier INTEGER NULLABLE, DEFAULT 0 User's subscription
level

auto_timezone BOOLEAN NOT NULL, DEFAULT true Auto timezone


detection setting

timezone JSONB NULLABLE Timezone


information object

PAGE 21
2. twitter_credentials Table

Field Name Data Type Constraints Description

cred_id INTEGER PRIMARY KEY, NOT Unique credential


NULL identifier

uid UUID NULLABLE, Reference to users table


FOREIGN KEY

access_token TEXT NOT NULL Twitter OAuth access


token

refresh_token TEXT NULLABLE Twitter OAuth refresh


token

token_expiry TIMESTAMP NULLABLE Token expiration


timestamp

twitter_user_id BIGINT NOT NULL Twitter user ID

username TEXT NOT NULL Twitter username

name TEXT NULLABLE Twitter display name

profile_image_url TEXT NULLABLE Twitter profile image URL

created_at TIMESTAMP NULLABLE, Credential creation time


DEFAULT now()
updated_at TIMESTAMP NULLABLE, Last credential update
DEFAULT now()

access_token_secret TEXT NULLABLE Twitter access token


secret

PAGE 22
3. subscriptions Table

Field Name Data Type Constraints Description

id UUID PRIMARY KEY, NOT Unique subscription


NULL identifier

userid UUID NOT NULL, FOREIGN Reference to users table


KEY

tier TEXT NOT NULL, DEFAULT Subscription tier


'Free'
subscription_id BIGINT NOT NULL, UNIQUE LemonSqueezy
subscription ID

subscription_status TEXT NOT NULL, DEFAULT Current subscription


'created' status

expires_at TIMESTAMPTZ NULLABLE Subscription expiration


date

created_at TIMESTAMPTZ NOT NULL, DEFAULT Subscription creation


CURRENT_TIMESTAMP time

price_paid NUMERIC NOT NULL, DEFAULT Amount paid for


0.00 subscription

PAGE 23
4. content_history Table

Field Name Data Type Constraints Description

post_id UUID PRIMARY KEY, NOT Unique post identifier


NULL

user_id UUID NULLABLE, Reference to users table


FOREIGN KEY

content TEXT NOT NULL Post content text

created_at TIMESTAMPTZ NULLABLE, DEFAULT Post creation timestamp


now()

core_post_id TEXT NULLABLE Twitter post ID after


publishing

posting_status TEXT NULLABLE Post status (published,


deleted, draft, failed)

twitter_cred_id INTEGER NULLABLE, Reference to


FOREIGN KEY twitter_credentials table

post_url TEXT NULLABLE URL of the published post

PAGE 24
5. campaigns Table

Field Name Data Type Constraints Description

cid INTEGER PRIMARY KEY, NOT Unique campaign identifier


NULL

uid UUID NOT NULL, Reference to users table


FOREIGN KEY

twitter_cred_id INTEGER NULLABLE, Reference to


FOREIGN KEY twitter_credentials table

campaign_name TEXT NULLABLE, Campaign display name


DEFAULT 'Draft
Campaign'

start_date DATE NULLABLE Campaign start date

end_date DATE NULLABLE Campaign end date


schedule_times TEXT[] NULLABLE, Array of posting times
DEFAULT '{09:00}'

agent_instruction TEXT NULLABLE AI agent instructions

hashtag_preference TEXT NULLABLE Hashtag usage preference

hashtag_preference TEXT NULLABLE Custom hashtag instructions


_other

status TEXT NOT NULL, Campaign status


DEFAULT 'draft'
created_at TIMESTAM NOT NULL, Campaign creation time
PTZ DEFAULT now()

PAGE 25
USER INTERFACE SCREENS

1. Home

PAGE 26
2. Twitter Account Connections & Time zone Management

PAGE 27
3. Post History

PAGE 28
4. Campaign Management

PAGE 29
5. Campaign Creation

PAGE 30
6. Subscriptions

PAGE 31
7. Profile Management

PAGE 32
TEST PLAN AND TEST CASES

1. Google Sign-In / Sign-Up


T_ID PAGE DATA EXPECTED ACTUAL DESCRIPTION
RESULT RESULT

1 User clicks "Sign in Redirected to Redirected to Valid Google


with Google" and Dashboard/Home Dashboard/Hom account login
grants access page e page successful.

2 User cancels Google Redirected back to Redirected back System handles


sign-in midway login page with error to login page cancelled
with error authentication.

3 User denies Error: "Permission Error: OAuth error


permissions (no denied" "Permission correctly handled.
profile/email access) denied"

2. Campaign Creation
T_ID PAGE DATA EXPECTED RESULT ACTUAL DESCRIPTION
RESULT

1 Campaign created Campaign saved Campaign Successful


with valid inputs and visible in saved and campaign
(tone, schedule, dashboard visible creation.
accounts)

2 Campaign created Error: "Please fill Error displayed Input validation


with missing out details" handled.
required fields

3 Campaign created Error: "Invalid time Error displayed System validates


with invalid format" schedule input.
schedule time

PAGE 33
3. Tweet Generation & Posting

T_ID PAGE DATA EXPECTED RESULT ACTUAL DESCRIPTION


RESULT

1 Scheduled Tweet generated Tweet posted Scheduler


campaign time and posted to triggered posting
reached connected account successfully.

2 All pre-generated Content generation New tweet System handles


tweets used up, new service triggered, generated and auto-generation +
posting required tweet posted posted posting.

3 Redis service Error logged, retry Error logged Scheduler


unavailable mechanism and retried handles Redis
triggered downtime
gracefully.

PAGE 34
FUTURE ENHANCEMENTS

• User Editing Before Posting: Allow users to review, edit, or refine AI-
generated tweets before they are published, giving more control over
the final content.

• Support for Media Content: Extend automation to include images,


GIFs, or videos along with text-based tweets for richer campaign
content.

• Advanced Scheduling Options: Provide more flexible rules such as


posting at multiple times per day or skipping holidays/weekends.

• Improved Personalization: Enhance the AI engine to better match each


user’s brand voice by learning from their past posts and writing style.

• Content Pooling: Let users generate and store multiple tweets in


advance so the system can automatically pick from the pool when
posting time arrives.

• Error Handling & Retry Logic: Strengthen background services to


automatically retry posting if Twitter API rate limits or temporary errors
occur.

• Analytics Integration: In future phases, integrate with Twitter’s


analytics API to display engagement data (likes, retweets, impressions)
for each post.

PAGE 35
• Scalability Improvements: Optimize Redis and backend services to
support a larger user base with many simultaneous campaigns.

PAGE 36
REFERENCES

1 Technical References

1.1 Frameworks and Libraries

• FastAPI Documentation: [Link]


• [Link] Documentation: [Link]
• Redis Documentation: [Link]
• Supabase Documentation: [Link]
• Pydantic Documentation: [Link]
• Python Official Documentation: [Link]

1.2 Artificial Intelligence & API Resources

• OpenAI GPT Documentations: [Link]


• Prompt Engineering Guide: [Link]
• Twitter API Documentation: [Link]

1.3 Web & Development Resources

• MDN Web Docs (JavaScript/TypeScript): [Link]


• OAuth 2.0 Simplified: [Link]
• Postman API Platform: [Link]

PAGE 37

You might also like