Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Torrent File Laravel Package

arokettu/torrent-file

A PHP library for reading, creating, and editing BitTorrent .torrent files. It handles bencoding, v1 and v2 (and hybrid) torrents, and metadata, making it easy to generate or inspect torrents in your PHP applications.

Deep Wiki
Context7

Product Decisions This Supports

  • Tracker / seedbox upload pipeline. Every private tracker needs to accept a .torrent, prove it's well-formed, extract the file list and total size, compute the v1 infohash, and reject duplicates or malformed uploads before anything touches storage. This package is the format-level layer for that, instead of a bespoke parser.
  • Per-user torrent re-issuance. Parse the uploaded torrent, rewrite the announce URL with the user's passkey, re-serialize, serve it. That write-back capability is the main differentiator versus read-only parsers, and it unlocks "Download .torrent" buttons, RSS feeds, and passkey rotation without re-uploading.
  • Metadata surfaces and moderation. Infohash → magnet URI, file count, piece length, creation tool/date, single- vs multi-file layout. Cheap to surface on detail pages and in moderator review queues.
  • Publish-side generation. Ship release images, datasets, or media packs as .torrent from inside the app rather than shelling out to mktorrent or transmission-create — keeps the flow in-process, testable, and free of daemon dependencies.
  • Build vs buy. The format is specified; the edges are not. UTF-8 vs byte-string names, padding files, symlinks, hybrid v1/v2 layouts, hostile length prefixes, integer coercion. Buying is an afternoon of integration. Building is a parser plus a fuzz surface plus years of edge cases you'll discover in production.
  • Roadmap signal. v2/hybrid support is a low-cost way to claim modern client compatibility without touching the rest of the stack.
  • Integrity/audit. Recompute piece hashes over stored content to confirm published artifacts still match, useful for archival and takedown workflows.

When to Consider This Package

Adopt when:

  • The stack is PHP/Laravel and you don't want a sidecar Python/Go process or a torrent daemon for what is fundamentally a file-format task.
  • You need write support — parse, modify, re-encode — not just inspection.
  • Untrusted input is in scope and you'd rather not ship a bencode_decode() you wrote in an afternoon.
  • Torrents are metadata-sized concerns. Parsing is cheap; hashing is not.
  • You want MIT-licensed, dependency-light, modern typed PHP.

Look elsewhere when:

  • You must hash hundreds of gigabytes. PHP userland piece-by-piece hashing is I/O- and CPU-bound; offload to a C tool or an async worker and use this package for metadata only.
  • You need peer wire protocol, DHT, tracker announces, or seeding. This is a format library, not a client.
  • You already run a torrent daemon that exposes create/inspect endpoints — don't duplicate it.
  • You need a general-purpose bencode codec for non-torrent payloads.
  • Single-maintainer risk is disqualifying for an un-forkable critical path. At 25 stars and one author, you should vendor and pin it — but the surface is small enough that "we could own this" is a credible answer.

How to Pitch It (Stakeholders)

For executives. A small, MIT-licensed PHP library that reads and writes .torrent files. It removes a "we hand-rolled a binary format parser" risk from our upload and distribution flows, and it's the difference between shipping passkey-personalized .torrent downloads in a sprint versus a quarter. Cost is negligible; the alternative is roughly 2–4 engineer-weeks plus perpetual edge-case maintenance and a parser that has to eat hostile uploads on day one. The real risk is bus factor, not capability — mitigated by a permissive license and a codebase small enough to fork. Recommendation: one-day spike, then adopt for metadata only, with hashing offloaded if file sizes are large.

For engineering. Typed, immutable object model over bencode: parse → inspect → modify → serialize round-trip, infohash computation, magnet generation, file and piece metadata, v1 with hybrid v2 where relevant. No extensions, no daemon, no network. Treat uploads as untrusted: cap payload size, cap nesting depth, run inside a worker with memory limits. Pin the version — the maintainer is active but the project is small.

The ask. Approve a spike and add it as a dependency on the upload/download path, with a documented fallback of shelling out to a native torrent tool if hashing throughput becomes the bottleneck.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox