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.0protocol with a pluggable session store (in-memory + Lucid). See Resumable / TUS. - Direct S3 multipart presign — the
directupload mode (browser uploads straight to S3 via presigned part URLs) alongsideproxy. See Upload modes. - A bundled S3 disk —
disks.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-freecreateMediaUploadClient. - A management console — the dashboard ships embedded in
@adonis-agora/mediaitself (SPA + JSON API + a built-in session login), with cross-owner collection listing viaMediaStore.list. - A Telescope extension — a "Media" overview dashboard via
mediaTelescopeExtension. - Transformers + HLS video — the pluggable
Transformercontract with a mediabunny-backed HLS transformer (remux to MPEG-TS segments + playlists, WebCodecs injectable), a metadata probe, and theHlsDeliveryHandlerread path with m3u8 rewriting. - Video streaming, HLS and DASH —
transformers.video()packages CMAF segments described by both an HLS master and a DASH manifest (TS for HLS-only on request; pure JS by default, ABR ladders via ffmpeg),media.access.streamRoute()serves packages behind the collection's authorization with package-wide signed URLs, anduseMediaStreamplays them in your own<video>.
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, DASH 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 →
.m4aby aac remux;.mp3via the pure-JS@mediabunny/mp3-encoder. - PosterFrameTransformer — extract a poster frame. Needs a video decoder, so it requires an injected WebCodecs implementation (
transformers.video({ webcodecs })-style) and throwsTransformerRuntimeMissingErrorwithout one. - TranscriptionTransformer —
.vttsubtitles via an external async provider. - Multi-quality renditions on the WebCodecs engine — a ladder via mediabunny's fan-out video options. (The ffmpeg engine already ships ladders:
transformers.video({ engine: engines.ffmpeg({ ladder: engines.ladders.standard }) }).)
Also still open from the image side: an antivirus / scanning hook in the attach pipeline (it 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
media.access.deliveryRoute() is a ready handler (authorization from the collections' access rules, resize, signed URLs, HTTP errors), but the app still registers it on a path of its own. Planned (prior art: jrmc v5's router.attachments()): an opt-in, named mount, a stable route name Tuyau can infer and Edge's route() can use, plus an Edge helper for <img src> in server-rendered apps.
A ready upload policy
Collections declare access.write, and media.access.authorize(ctx, 'write', { collection }) applies it, but the upload routes still need your own DirectUploadPolicy to call it and to key uploads by the user. Planned: a ready policy that does both from the identity resolver.
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, with focal points and content-aware crops. See Collections & Conversions.
- Responsive images —
media.library.image()(srcset, intrinsic size, blur-up),<MediaImage>/<MediaPicture>,responsive: truecollections. See Responsive images. - On-demand resizing and signed delivery URLs —
?w=/?q=throughMediaDeliveryHandler, WebP (or opt-in AVIF) byAccept, HMAC-signed expiring URLs. See Delivery. - Metadata stripping —
stripMetadata: trueremoves EXIF/GPS from originals. 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/gcsdisks, or the S3 disk with extended operations; signed read URLs included. - Uploads for large files — proxy and direct-S3 modes and resumable TUS sessions.
- A browser client and an embedded console —
@adonis-agora/media-reactand the management console built into the core package. - A testing kit — in-memory doubles for every seam. See Testing.
- Structural diagnostics —
agora:media:*events, captured by Telescope when present.
Next steps
- Getting Started — what you can build today
- Stores & Processors — extend the deferred seams yourself