TwitterGPT: Your high performance twitter assistant.
Tags: githubhack23, flutter, twitter, ai
Published: 2023-05-23 16:58:35

## What I built 

**TwitterGPT**, a personalised **Twitter content generation app**. 

Our aim with TwitterGPT is to bring the power of AI to social media, starting with Twitter. 

Making it easier for anyone to reach from 0 to 100K followers within a year by following twitter's best engagement practices.

### Category Submission: 

**Phone Friendly**: TwitterGPT isn't just a mobile app; it's a buddy that fits right into your pocket. Tailored for both iOS and Android, it's also prepped to be a Progressive Web App (PWA). The world of AI-driven Twitter content is now just a tap away!

**Wacky Wildcards**: TwitterGPT is not your average run-of-the-mill app. It's a delightful fusion of AI and social media - a truly unique concept that's hard to slot into regular categories. Welcome to a refreshing, unconventional experience!

### App Link

- [Android Application Package (APK)](https://drive.google.com/file/d/18F_XfwpcyXBlOXILmSSeCkdq5PwFaFDE/view?usp=share_link)

- **iOS IPA File**: The iOS IPA file isn't readily available due to the costs associated with enrollment in the Apple Developer Program. Please note, the application has been built and tested successfully on an iOS emulator in demo mode. For a visual walkthrough of the app functioning on iOS, please refer to the demo below.

### App Demo

{% embed https://youtu.be/vJLFh4BL52E %}

### Screenshots 

![App Screens](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hoaaauh44j4sfo5leee9.png)


### Description 

**TwitterGPT** is an app that leverages the power of **OpenAI's GPT-4** to generate personalised tweets and Twitter threads for users. 

During this hackathon, I focused on building the most crucial features of TwitterGPT: 

1. **User Authentication:** Provides a secure login mechanism for users to access their Twitter accounts.
2. **Profile Analysis:** Analyses a user's Twitter profile, history, and style of tweeting. It considers elements such as tone, common phrases, topics, and hashtags used.
3. **Generating Twitter threads:** Generates Twitter threads on user-provided topics, maintaining the user's style and tone.
4. **Generating Tweets:** Uses OpenAI's ChatGPT to generate personalised tweets based on the user's style and preferred topics. The user can review and approve the generated tweets before posting.

The app will include several features further down the line:

- **Topic Suggestions**: Based on the user's profile analysis and current Twitter trends, suggests topics to increase the user's Twitter following.
- **Schedule Tweets**: Allows users to schedule tweets or threads for future posting.
- **Interactive Dashboard**: Features an intuitive dashboard displaying user's Twitter profile data, generated tweets and threads, and suggested topics.
- **Performance Analysis**: Tracks the performance of the posted tweets and threads, including likes, retweets, and follower growth.

We aim to continue building out the rest of the features and refining our application in the near future.

### Link to Source Code 

[GitHub](https://github.com/yatendra2001/twitter_gpt)

### Permissive License 

[MIT License](https://github.com/yatendra2001/twitter_gpt/blob/master/LICENSE)

## Background 

I'm an active Twitter user, always eager to share my tech learnings and engage with the community. However, I found it tough to come up with **high-performing tweets and threads consistently**. I often stumbled when it came to identifying trendy topics that I could base my content on.

I wanted to enhance my Twitter presence, but the **best practices for Twitter engagement** seemed complicated and overwhelming. I needed a tool that could make content generation simpler and more effective.

So, I decided to build TwitterGPT. It's a solution I've created for myself and others like me, who find it challenging to create engaging content on Twitter. TwitterGPT helps you understand and implement best practices for Twitter engagement. It's all about making the Twitter experience more enjoyable and less overwhelming, backed by the **power of AI**.

## How I built it 

Building TwitterGPT was like assembling a complex puzzle with many intricate parts. Each piece, from Flutter and Firebase, to Twitter API and OpenAI's API, was a stepping stone in my quest to bridge the gap between AI and social media. In this odyssey, I've learned, stumbled, and grew as a developer, and I'm thrilled to share the highlights of this journey with you.

### The Tech Stack
Flutter was my go-to for crafting an interactive and intuitive front-end. I leaned on Firebase for reliable back-end operations, creating a symbiotic relationship between the two technologies that resulted in an efficient, responsive application.

To bring in the world of Twitter, I interfaced with Twitter API for user authentication and tweet fetching. This integration bridged the chasm between our app and the vast universe of Twitter data. To complete the bridge, I used OpenAI's API to infuse the power of AI into our app, allowing users to automate their Twitter content generation with a touch of personalization.

### The Power of Automation with GitHub Actions
When it comes to CI/CD, GitHub Actions became my Swiss Army knife. This powerful tool helped automate my software workflow, taking care of tasks from running tests to deploying the app. The magic of GitHub Actions lies in its efficiency, transforming tedious tasks into automated workflows that smoothly integrate with the GitHub repository.

### A Journey of Project Management
As the project progressed, I adopted GitHub Projects for task management. Tasks were categorized into 'ToDo', 'InProgress', and 'Done', creating a clear roadmap of my development journey. This categorization served as my compass, guiding me through the development process while keeping track of my progress.

### Navigating Through GitHub's Best Practices
Before embarking on this coding expedition, I laid out a clear path by defining all issues upfront. This preemptive approach streamlined my workflow, resulting in effective and productive coding sessions. During the journey, I adhered to the best practices of GitHub, which became my pillars for maintaining a healthy repo:

- Regular, meaningful commits
- Creating dedicated branches for each feature/issue
- Frequently merging updates from the main branch into feature branches
- Closing issues via commit messages
- Thorough code reviews prior to merging
- Keeping the repo clutter-free with .gitignore

### Lessons Learned
Throughout this journey, I gained valuable insights into integrating multiple APIs into a single project and automating workflows using GitHub Actions. The twists and turns of this development process provided a deep understanding of the possibilities and complexities of AI models.

Building TwitterGPT has been more than just a coding project; it's been a journey filled with learning, discovery, and growth. The challenges were many, but each one presented an opportunity to learn and innovate. As I continue to refine and expand TwitterGPT, I look forward to the new lessons that lie ahead.
### Additional Resources/Info

**OpenAI API Documentation**: [https://platform.openai.com/docs/introduction](https://platform.openai.com/docs/introduction)

**Twitter API Documentation**: [https://developer.twitter.com/en/docs](https://developer.twitter.com/en/docs)

**Flutter Documentation**: [https://docs.flutter.dev/](https://docs.flutter.dev/)


### Last Note

If you're intrigued and interested in collaborating with me on this project or even want to have just a chit chat on sports, podcast, books (basically a mutual interest topic), ping me on [LinkedIn](https://www.linkedin.com/in/yatendra2001/) or [Twitter](https://twitter.com/yatendrakumar27).

Ciao 👋