Agora

Roadmap

What @adonis-agora/media covers today — resumable/tus uploads, direct S3 presign, an S3 disk, a React client, transformers and an embedded console — and what is still intentionally deferred (more stores, richer conversions, collection reordering).

@adonis-agora/media is a focused core — owner collections, column attachments, image conversions, a pluggable store and processor, and a testing kit — grown outwards over @adonisjs/drive into uploads, transformations, delivery and a management console. Some capabilities are deliberately not in it. This page tracks the boundary.

Why call it out

The point of this page is honesty about scope. If you're evaluating the library for a use case below, you'll know whether it's here today — and, for the deferred ones, roughly where it would slot in when it lands.


Beyond the core

  • Resumable / tus uploads — the tus 1.0.0 protocol with a pluggable session store (in-memory + Lucid). See Resumable / TUS.
  • Direct S3 multipart presign — the direct upload mode (browser uploads straight to S3 via presigned part URLs) alongside proxy. See Upload modes.
  • A bundled S3 diskdisks.s3() with extended operations (copy / move / deleteMany / list / size / stat) and native multipart, over the optional AWS SDK peer. See S3 disk.
  • A browser client + React package@adonis-agora/media-react: useMediaUpload, MediaUploader, and a framework-free createMediaUploadClient.
  • A management console — the dashboard ships embedded in @adonis-agora/media itself (SPA + JSON API + a built-in session login), with cross-owner collection listing via MediaStore.list.
  • A Telescope extension — a "Media" overview dashboard via mediaTelescopeExtension.
  • Transformers + HLS video — the pluggable Transformer contract with a mediabunny-backed HLS transformer (remux to MPEG-TS segments + playlists, WebCodecs injectable), a metadata probe, and the HlsDeliveryHandler read path with m3u8 rewriting.

Still deferred

More MediaStore drivers

The package ships the in-memory and Lucid stores. Additional drivers (e.g. a document/Redis store) aren't built — but the MediaStore interface is small and stable, so you can write your own today.

More built-in transformers

The Transformer contract ships with HLS and a metadata probe; it was validated against this lineup, and each slots in without contract changes — they just aren't built yet:

  • ImageOptimizeTransformer — recompress / WebP / strip EXIF via sharp (single replaceable artifact).
  • PlaceholderTransformer — blurhash/thumbhash from pixel data (metadata-only, like the probe).
  • WatermarkTransformer — stamp a configured logo (auxiliary asset read through context.storage).
  • AudioExtractTransformer — video → .m4a by aac remux; .mp3 via the pure-JS @mediabunny/mp3-encoder.
  • PosterFrameTransformer — extract a poster frame. Needs a video decoder, so it requires an injected WebCodecs implementation (transformers.hls({ webcodecs })-style) and throws TransformerRuntimeMissingError without one.
  • TranscriptionTransformer.vtt subtitles via an external async provider.
  • Multi-quality HLS renditions — a 360p/480p/720p ladder on top of an injected WebCodecs encoder, via mediabunny's fan-out video options. Remux-only stays the default; the ladder is opt-in config on transformers.hls() once built.

Also still open from the image side: responsive srcset generation and an antivirus / scanning hook in the attach pipeline (a scanning hook would slot into attach before the write).

Lucid @media model decorator

Apps today hold a raw FK (bannerMediaId) and resolve records/URLs by hand — a dashboard listing N rows does N resolutions. The planned DX (prior art: @jrmc/adonis-attachment) is a decorator in a separate @adonis-agora/media/lucid module, keeping Lucid an optional peer:

class Course extends BaseModel {
  @media({ collection: 'banner' })
  declare banner: MediaAccessor // typed record + conversions + URLs, preloadable, serializable
}

The MediaRecord/conversions shape (including transformer meta and multi-artifact files) was designed with this accessor in mind; it needs no refactor to support it.

Named delivery route + Tuyau/Edge helpers

MediaDeliveryHandler / HlsDeliveryHandler exist, but the app mounts the route by hand. Planned (prior art: jrmc v5's router.attachments()): an opt-in, named route mount — a stable route name Tuyau can infer and Edge's route() can use — with a hook for the app to attach its middleware, keeping the standing rule that the library never decides authorization; plus an Edge helper for <img src> in server-rendered apps.

Collection reordering

Ordering is append-only — attach always takes the next order slot, and list returns by order ascending. There's no first-party reorder API yet; resequencing means updating the order field through your own store access.


What is in the library today

For contrast, the library ships:

  • Owner collections — MIME whitelist, single-file replacement, ordering, per-collection disk. See Collections & Conversions.
  • Column attachments — the adonis-attachment style, with eager image variants. See Attachments.
  • Image conversions — eager or lazy, cached on the record, via sharp. See Collections & Conversions.
  • Pluggable persistence — in-memory + Lucid stores with a published migration. See Stores & Processors.
  • Drive-backed storage plus a bundled S3 disk — reuse your local / s3 / gcs disks, or the S3 disk with extended operations; signed read URLs included.
  • Uploads for large filesproxy and direct-S3 modes and resumable TUS sessions.
  • A browser client and an embedded console@adonis-agora/media-react and the management console built into the core package.
  • A testing kit — in-memory doubles for every seam. See Testing.
  • Structural diagnosticsagora:media:* events, captured by Telescope when present.

Next steps

On this page