A simple Next.js app for viewing Twitter/X posts based on search queries organized in buckets.
- Install dependencies:
npm install- Create a
.env.localfile with your X API credentials:
cp .env.local.example .env.local- Add your X Bearer Token to
.env.local:
X_BEARER_TOKEN=your_actual_bearer_token
- Run the development server:
npm run dev- Click "+ New Bucket" in the sidebar
- Give it a name (e.g., "Tech News", "Sports Updates")
- Buckets are collections of search queries
- Select a bucket from the sidebar
- Add search queries using X API query syntax
- Examples:
from:elonmusk- tweets from a specific user#ai- tweets with a hashtagbitcoin lang:en- tweets containing "bitcoin" in Englishfrom:nasa OR from:spacex- tweets from multiple users
- Posts from all queries in the selected bucket will be fetched and displayed
- Switch between buckets to see different sets of posts
- Each bucket independently manages its own queries
Refer to the X API documentation for query syntax.
Common operators:
from:username- posts from a specific userto:username- replies to a user#hashtag- posts with a hashtag"exact phrase"- posts with exact phrasekeyword1 OR keyword2- posts with either keywordkeyword1 -keyword2- posts with keyword1 but not keyword2lang:en- posts in English
- 📦 Organize queries into buckets
- 🔍 Multiple queries per bucket
- 📊 Fetch from all queries in parallel
- 💾 LocalStorage persistence
- 🎨 Simple, clean UI
- ⚡ Fast with TanStack Query
- Next.js 15 (App Router)
- TanStack Query (React Query)
- Tailwind CSS
- X API v2