📌 Mirror any X (Twitter) thread on‑chain with a single mention — permanent, searchable, and shareable.
ThreadMirror lets you archive any X (Twitter) thread with a single mention. Reply @threadmirror under the thread—you'll receive a permanent link, an AI-generated summary, and a long shareable image, all stored immutably on Filecoin PDP.
- One-step archive (mention @threadmirror) – No plugin, no signup: just mention
@threadmirror
beneath any thread and the bot does the rest. - Immutable storage on Filecoin PDP – Threads are saved as content-addressable data that remain online permanently and cannot be tampered with, even after deletion.
- Instant AI summary – A concise, LLM-generated digest arrives with the reply so you can grasp the whole thread at a glance.
- Shareable permalink – Receive a clean
https://threadmirror.xyz/thread/<id>
link that never breaks—perfect for bookmarking or sharing anywhere. - End-to-end share image – The bot also returns a single long image of the full thread, great for posting in chats or saving offline.
- Multi-account support – Run multiple bot accounts to distribute load and rate limits, enhancing overall service robustness.
- On X (Twitter), reply to any thread with @threadmirror.
- The bot will:
- Fetch the entire thread.
- Store the tweets on PDP.
- Generate an AI summary.
- Reply with (a) a permanent link (e.g.,
https://threadmirror.xyz/thread/<id>
), and (b) a long image snapshot of the thread for easy sharing.
That's it—no additional setup required.
Watch ThreadMirror in action on YouTube: https://www.youtube.com/watch?v=J-D1DlNxQPY
-
🌐 Full‑thread translation
-
📥 Multi‑platform ingestion (Telegram, Bluesky, TruthSocial, …)
-
🖼️ Mint archived threads as NFTs for on-chain ownership
-
🖥️ Web UI upgrades: filtering, search, browser extension
- Go ≥ 1.24
- Node.js ≥ 22 (for frontend development)
- Docker & Docker Compose (optional, but the easiest way to start)
git clone https://github.com/ipfs-force-community/threadmirror.git
cd threadmirror
# Copy and adjust configuration
cp example.env .env
# Build images and start services (backend web, bot, db, redis)
docker compose up --build
Once started:
- API:
http://localhost:8089
- The sample frontend is located in the
web
sub-folder; you can deploy it separately.
-
Start Postgres & Redis (use the
db
andredis
services in the compose file or your own instances). -
Backend:
make setup # download deps & code generation make generate # generate SQLC and OpenAPI code make dev # run in debug mode (equivalent to: go run ./cmd/*.go --debug server)
-
Frontend:
cd web npm install npm start # http://localhost:3000
-
Bot:
./bin/threadmirror --debug bot
Command | Purpose |
---|---|
threadmirror server |
Start the HTTP API server |
threadmirror bot |
Run the @mention bot |
threadmirror reply |
Manually reply to a given mention |
Run threadmirror <command> --help
for flag details.
The project includes comprehensive test coverage with two testing modes:
# Unit tests (fast, no Docker required)
make test-unit
# Full integration tests (requires Docker)
make test
threadmirror/
├── api/v1/ # OpenAPI specification
├── cmd/ # CLI entry points (server, bot …)
├── internal/
│ ├── api/v1/ # API handlers (generated + custom)
│ ├── service/ # Business logic (SQL First)
│ ├── sqlc_generated/ # Generated database code
│ ├── task/ # Background jobs & cron
│ └── testsuit/ # Test utilities & mocks
├── pkg/ # Reusable libraries
│ ├── database/sql/ # Database connection & transactions
│ ├── ipfs/ # IPFS storage
│ ├── llm/ # AI/LLM integration
│ └── xscraper/ # Twitter/X scraping
├── sql/queries/ # SQLC query definitions
├── web/ # React frontend
├── Makefile # Development commands
├── sqlc.yaml # SQLC configuration
└── docker-compose.yml
- SQL First: Direct database queries via SQLC, no ORM
- Generated APIs: OpenAPI-first development with code generation
- Testcontainers: Real database integration testing
- Dependency Injection: Clean service layer with fx framework
We ❤️ contributions! To get started:
- Ensure
make test-unit
passes (ormake test
with Docker). - Run
make lint
and fix any issues. - Follow the SQL First architecture and coding guidelines.
- Generate code with
make generate
after API/schema changes.
Apache-2.0 © IPFS Force Community