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.
- 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
- User connects their Twitter API: Users input their own Twitter Bearer Token
- AI Analysis: Fireworks AI (Kimi K2 Instruct) analyzes the Twitter data and provides insights
- Actionable Results: Get keywords, tweet drafts, and explanations
-
Install dependencies:
npm install
-
Environment Variables: Copy
env.exampleto.env.localand add your Fireworks API key:cp env.example .env.local
Required:
FIREWORKS_API_KEY: Your Fireworks AI API key (for the AI analysis service)
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
To use Xact, simply:
- Click "Connect with Twitter" button
- Authorize the app to access your Twitter data
- Start analyzing trends with AI-powered insights
No need to get API keys or tokens - we handle the OAuth flow for you!
POST /api/analyze- Analyze Twitter trends (requires user's Twitter token)GET /api/auth?action=login- Initiate Twitter OAuthGET /api/auth/callback- Handle OAuth callback
- β 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
- 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
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- APIs: Twitter API v2 (user-provided), Fireworks AI (service-provided)
- Deployment: Vercel (recommended)