Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Xact - Twitter Trend Analyzer

A Next.js app that analyzes Twitter trends using Fireworks AI (Kimi K2 Instruct) to provide actionable insights and tweet suggestions. Users connect their own Twitter API keys while benefiting from AI-powered analysis.

Features

  • User-Controlled Twitter Access: Users provide their own Twitter API keys
  • AI-Powered Insights: Uses Fireworks AI (Kimi K2 Instruct) for intelligent trend analysis
  • Tweet Suggestions: Get ready-to-use tweet drafts
  • Keyword Recommendations: Top hashtags and keywords to use now
  • Secure: User API keys stored locally in browser
  • No Data Storage: Your Twitter data stays private

How It Works

  1. User connects their Twitter API: Users input their own Twitter Bearer Token
  2. AI Analysis: Fireworks AI (Kimi K2 Instruct) analyzes the Twitter data and provides insights
  3. Actionable Results: Get keywords, tweet drafts, and explanations

Setup

  1. Install dependencies:

    npm install
  2. Environment Variables: Copy env.example to .env.local and add your Fireworks API key:

    cp env.example .env.local

    Required:

    • FIREWORKS_API_KEY: Your Fireworks AI API key (for the AI analysis service)
  3. Run the development server:

    npm run dev
  4. Open http://localhost:3000 in your browser.

For Users

To use Xact, simply:

  1. Click "Connect with Twitter" button
  2. Authorize the app to access your Twitter data
  3. Start analyzing trends with AI-powered insights

No need to get API keys or tokens - we handle the OAuth flow for you!

API Endpoints

  • POST /api/analyze - Analyze Twitter trends (requires user's Twitter token)
  • GET /api/auth?action=login - Initiate Twitter OAuth
  • GET /api/auth/callback - Handle OAuth callback

Privacy & Security

  • βœ… User Twitter access tokens are stored locally in browser
  • βœ… No server-side storage of user credentials
  • βœ… Users control their own Twitter data access
  • βœ… Only analysis results are processed by Fireworks AI
  • βœ… Secure OAuth 2.0 flow with Twitter

Next Steps

  • Implement Twitter OAuth2 authentication
  • Add real-time streaming with WebSockets
  • Enhanced analytics (velocity, sentiment, token co-occurrence)
  • User dashboard with saved analyses
  • Export functionality for insights

Tech Stack

  • Frontend: Next.js 14, React, TypeScript, Tailwind CSS
  • APIs: Twitter API v2 (user-provided), Fireworks AI (service-provided)
  • Deployment: Vercel (recommended)

About

πŸš€ Xact - Twitter Trend Analyzer using Sentient AI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages