A powerful, user-friendly Mastodon post search application built for FossHack 2025. Search across multiple Mastodon instances using AI-powered hashtag suggestions.
- AI-powered hashtag suggestions using Google's Gemini API
- Real-time search across multiple Mastodon instances
- Intelligent query enhancement for better search results
- Search across popular Mastodon instances:
- mastodon.social
- infosec.exchange
- mas.to
- Customizable instance selection
- Parallel search processing for faster results
- Clean, responsive design
- Rich post cards with full post content
- Support for embedded links and cards
- Interactive engagement metrics
- User-friendly interface with real-time updates
- Frontend: Next.js 13+ with TypeScript
- UI Framework: Tailwind CSS
- State Management: React Hooks + SWR
- API Integration: Axios
- AI Integration: Google Gemini 1.5
- API Routes: Next.js API Routes
- Node.js 16+
- npm or yarn
- Google Gemini API key
- Clone the repository
git clone https://github.com/ssachin520280/mastodonlite.git
cd mastodonlite- Install dependencies
npm install- Set up environment variables
HUGGINGFACE_API_KEY=your_hugging_face_api_key
GEMINI_API_KEY=your_gemini_api_key- Run the development server
npm run devVisit http://localhost:3000 to see the application.
page.tsx: Main application interface with search functionalityPostCard.tsx: Reusable component for displaying Mastodon postsapi/search/: API routes for hashtag generation and post fetching- Custom types for TypeScript support
/api/search: Generates hashtag suggestions using Gemini AI/api/search/posts: Fetches posts from selected Mastodon instances
- Local-First Storage: Implementation of IndexedDB for offline data persistence
- P2P Communication: WebRTC integration for direct device-to-device communication
- Sync Management: WebSocket-based synchronization when internet connectivity returns
- Ephemeral Content: Snapchat-style temporary content with customizable retention periods
-
Travel Mode: Perfect for trips where internet access is limited
- Cache content before going offline
- Create and queue posts while offline
- Sync automatically when connection is restored
-
Local Network Communication: Share and interact within local networks
- Direct device-to-device communication
- Local content discovery
- Reduced dependency on central servers
-
Privacy-Focused Features
- Self-destructing messages and media
- Local-only content options
- Encrypted P2P communication
- WebRTC for peer discovery and direct communication
- IndexedDB for robust offline storage
- Service Workers for background sync
- WebSocket for real-time updates when online
- Conflict resolution for offline-online synchronization
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License.
- Mastodon API for enabling federated post search
- Hugging Face Models and Google Gemini API for powering hashtag suggestions
- The FOSS community for inspiration and support
This project was created as part of FossHack 2025, demonstrating the power of open-source social media tools and AI integration.