Skip to content

Brijuval/Tweetforge-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TweetForge AI 🐦✨

An AI-powered social content generator that creates on-brand posts using 3 intelligent voice analysis methods.

πŸ”— Live Demo: https://tweetforge-ai.vercel.app
πŸ“ GitHub: https://github.com/Brijuval/tweetforge-ai


πŸ“Œ What It Does

TweetForge takes your brand details, analyzes your brand voice, and generates 10 on-brand social posts in multiple styles (promotional, engaging, witty, informative, inspirational, and question-style).

You can now choose a target platform before generation:

  • Twitter/X
  • LinkedIn
  • Instagram

πŸ†• What's New (June 2026)

  • Added a more professional landing experience with feature highlights, testimonials, how-it-works flow, and footer links.
  • Added multi-platform generation support for Twitter/X, LinkedIn, and Instagram.
  • Added tweet history with local storage persistence for completed generations (brand + timestamp).
  • Added history actions: restore form state, regenerate from history, delete individual entries, and clear-all with confirmation.
  • Added Copy All to copy all generated posts in one click, while preserving per-post copy and export.
  • Improved error handling with clearer API errors, retry action, and loading skeletons.
  • Refined UI polish with responsive breakpoints, icon accents, and micro-interactions.
  • Refactored codebase to separate logic and UI into dedicated modules (constants, lib, utils, components).

🧠 Three Brand Voice Analysis Methods

Method How it works Best for
πŸ“‘ Social Post Analysis Paste real posts β€” AI extracts tone, themes, voice patterns Existing brands with content
🧠 AI Inference Describe your brand β€” AI infers everything automatically New brands or quick testing
πŸŽ› Manual Definition Hand-pick tones, themes, audience yourself Full creative control

✨ Features

  • Professional Landing Page β€” Hero, feature highlights, testimonials, how-it-works flow, and polished footer
  • Brand Voice Analysis β€” 5-dimension scoring (Professionalism, Friendliness, Humor, Authority, Engagement)
  • 10 Post Mix β€” Promotional, Engaging, Witty, Informative, Inspirational, Question
  • Platform-aware Generation β€” Optimized prompting for Twitter/X, LinkedIn, and Instagram
  • Filter by Style β€” View tweets by category
  • Tweet History β€” Saves completed generation results to localStorage with brand name and timestamp
  • History Actions β€” Restore form, regenerate output, delete one item, or clear all with confirmation
  • Copy & Export β€” Copy individual tweets, copy all 10 at once, or export full report as .txt
  • Regenerate β€” Instantly re-generate with same brand settings
  • Better Error Handling β€” Specific API errors, retry action, and loading skeletons
  • Responsive UI β€” Works on desktop and mobile

πŸ›  Tech Stack

Layer Technology
Frontend React 18 + Vite
Styling Modular CSS (src/tweetforge.css for global + component styles)
AI Model Groq API β€” LLaMA 3.3 70B
Architecture Separated modules (constants, API/lib, utils, UI components)
Fonts Outfit + Lora (Google Fonts)
Deployment Vercel (free)

πŸš€ Getting Started Locally

Prerequisites

Installation

# Clone the repo
git clone https://github.com/Brijuval/tweetforge-ai.git
cd tweetforge-ai

# Install dependencies
npm install

# Create .env file
echo "VITE_GROQ_API_KEY=your_key_here" > .env

# Start dev server
npm run dev

Open http://localhost:5173

Note: if port 5173 is occupied, Vite automatically starts on another port (for example 5174).


πŸ“ Project Structure

tweetforge-ai/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ TweetForge.jsx    ← Main screen/state orchestrator
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ DimBar.jsx
β”‚   β”‚   └── TweetCard.jsx
β”‚   β”œβ”€β”€ constants/
β”‚   β”‚   └── tweetforge.js
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   └── groq.js
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── tweetforge.js
β”‚   β”œβ”€β”€ tweetforge.css    ← Main app styling and responsive design
β”‚   β”œβ”€β”€ App.jsx           ← Entry point
β”‚   β”œβ”€β”€ main.jsx          ← React root
β”œβ”€β”€ public/
β”‚   └── screenshots/
β”‚       └── ...
β”œβ”€β”€ index.html
β”œβ”€β”€ .env                  ← API key (not committed)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ vite.config.js
β”œβ”€β”€ package.json
└── README.md

πŸ§ͺ Test Cases

Brand 1 β€” Zomato (Witty / Humorous)

  • Mode: AI Inference
  • Industry: Food & Beverage
  • Tone Hints: Witty, Humorous, Casual
  • Products: Food delivery, restaurant discovery, Zomato Gold
  • Objective: User Engagement

Expected output: Funny, relatable tweets with food puns and meme-style content


Brand 2 β€” Tesla (Bold / Inspirational)

  • Mode: Manual Definition
  • Tones: Bold, Inspirational, Minimal, Authoritative
  • Themes: Product Features, Motivation, Announcements
  • Industry: Automotive
  • Objective: Brand Awareness

Expected output: Short, powerful tweets about innovation and a sustainable future


Brand 3 β€” Nike (Social Post Analysis)

  • Mode: Social Post Analysis β†’ Platform: Twitter/X
  • Paste real or sample Nike tweets
  • Brand Name: Nike, Industry: Sports

Expected output: Motivational, bold tweets matching Nike's real voice


πŸ“Š Approach Document

How Brand Voice is Analysed

Method 1 β€” Social Post Analysis

  • User pastes real social media posts
  • A separate Groq API call analyzes the posts
  • Extracts: dominant tones, target audience, content themes, voice observations, 5 dimension scores
  • This voice profile is then injected into the tweet generation prompt

Method 2 β€” AI Inference

  • User provides brand description, industry, audience, and optional tone hints
  • AI infers all voice attributes from context
  • Single API call handles both analysis and generation

Method 3 β€” Manual Definition

  • User directly selects tones (12 options), themes (12 options), audience, and voice notes
  • User-defined parameters are passed directly into the generation prompt

Prompt Engineering Strategy

  • Strict JSON schema enforced in every prompt β€” AI returns only raw JSON
  • System role set to "brand strategist and social media copywriter."
  • Style distribution explicitly specified: 2 promotional, 2 engaging, 2 witty, 2 informative, 1 inspirational, 1 question
  • Platform-specific constraints in prompt:
    • Twitter/X: concise, tweet-like outputs near 280 chars
    • LinkedIn: more professional long-form style
    • Instagram: caption-friendly style with CTA and hashtag usage
  • Voice context dynamically injected based on selected analysis method
  • Temperature 0.9 for creative variation while staying on-brand

πŸ“Έ Screenshots

🏠 Home Page

Home Page

🎯 Choose Analysis Method

Mode Selection

πŸ“ Brand Input Form

Brand Form Brand Form

βœ… Generated Tweets & Voice Analysis

Results Results

🌐 Deployment

Deployed on Vercel (free tier):

  1. Connect GitHub repo to Vercel
  2. Add VITE_GROQ_API_KEY as an environment variable
  3. Auto-deploys on every git push

πŸ“ License

MIT License β€” free to use and modify.


πŸ‘€ Author

Built by Valmeeki / Brijuval as part of an AI Tools & Workflows assignment.

Powered by Groq Β· LLaMA 3.3 70B Β· Vite Β· React

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors