Case study · Media · Marketplace

Montage India's stock media marketplace, rebuilt for a 15 TB archive.

Montage India runs an online marketplace for stock video, images and audio, priced in Indian rupees. Metageeks built the first version in 2024 and rebuilt it on NestJS, PostgreSQL and AWS through 2025 and 2026. About 15 TB of footage on Montage India's NAS is now moving to AWS through the rebuilt pipeline.

  • Web application
  • Cloud and DevOps
  • Media pipeline
Montage India stock media marketplace homepage at montageindia.com
Client
Montage India
Industry
Film production and stock media
What we built
A marketplace for 4K video, images and audio
Built
2024 to 2026; rebuild started June 2025
Status
Live; 15 TB archive moving to AWS
Stack
Next.js, NestJS, PostgreSQL, AWS CDK
Services
Web application development, Cloud and DevOps, Custom software development
15 TB
footage archive on Montage India's NAS, moving to AWS
3
media types: video, images and audio
3
sellable renditions per video: HD, Full HD and 4K
1,037
commits in the 2025 to 2026 rebuild

Summary

Montage India in brief.

Montage India is an Indian stock media marketplace that sells video, images and audio, with every price in Indian rupees. Buyers search by media type, check watermarked previews, pay through Razorpay and receive a GST invoice. Each video is sold in three renditions: HD, Full HD and 4K.

Metageeks built the first version in 2024 on Express, MongoDB and Firebase, running in Docker on EC2. The rebuild, started in June 2025, moved the platform to NestJS, PostgreSQL 16 and infrastructure defined with AWS CDK, and removed MongoDB and Firebase. Browsers upload files straight to Amazon S3. SQS queues, Lambda functions and AWS MediaConvert then produce the renditions and watermarked previews, and an asset missing any rendition is marked failed and cannot be sold. About 15 TB of footage on Montage India's NAS is now being uploaded to AWS through this pipeline.

The client

A 15 TB footage archive, sitting on a NAS.

Montage India runs a stock media marketplace at montageindia.com. It sells video in HD, Full HD and 4K, still images, and audio as WAV and MP3 files, with every price in Indian rupees.

The footage Montage India wants to sell starts on its own storage. By the company's figure, about 15 TB of footage sits on its NAS, and that archive is being uploaded to AWS, where the platform processes it for sale.

The problem

Files too big for a normal web app.

A 4K video file runs to several gigabytes, too large to pass through an API server on its way to storage.

Every file also has to be protected. Buyers need to preview footage before they pay, so previews carry a watermark, while the paid files stay private until someone buys them.

Payments had rules of their own. Checkout adds GST and issues a GST invoice, and every Razorpay order and subscription has to match what the platform records.

The platform

Version one, then a rebuild.

Metageeks built the first version between July 2024 and May 2025: an Express API on MongoDB, with Firebase, deployed in Docker on EC2. It already used S3, SQS and AWS MediaConvert for media, sharp and ffmpeg for processing, and Razorpay for payments. Version one ran to 829 commits.

The rebuild started in June 2025. The API moved to NestJS 11 with Prisma on PostgreSQL 16, sign-in moved to Better Auth, and the frontend moved to Next.js 16 and React 19. The AWS resources, from the queues to the database, are now defined in code with AWS CDK.

Between June and August 2026 the last MongoDB and Firebase code was removed, and PostgreSQL became the only database. The rebuild ran to 1,037 commits by August 2026.

Media pipeline

Uploads that never touch the server.

The API never handles the file itself. It issues a presigned URL, and the browser uploads straight to Amazon S3.

For video, the S3 event reaches an SQS queue, a Lambda function hands the file to AWS MediaConvert, and MediaConvert writes the HD, Full HD and 4K renditions with a watermarked preview and a thumbnail. For images and audio, the API queues the job once the upload completes: sharp resizes and watermarks images, and ffmpeg makes the audio previews. Every preview carries the watermark.

Each queue retries a failed job three times, then moves it to a dead-letter queue, where it stays for inspection. Processing status is recorded against the asset in PostgreSQL.

Diagram of the Montage India media pipeline: presigned upload to S3, SQS queues, Lambda and AWS MediaConvert producing HD, Full HD and 4K renditions
Files go from the browser to S3. Queues, Lambda functions and MediaConvert produce every rendition, and failed jobs wait in dead-letter queues. Open full size ↗

Buying

From preview to paid download.

Buyers search and filter by media type, then judge an asset from its watermarked preview: HD and SD previews for video, a waveform player for audio. They can keep assets in a wishlist or a cart, and request footage the library does not have yet.

Checkout runs through Razorpay, for single orders or for subscriptions with credits and top-ups. Coupons apply at checkout, GST is added, and each order produces a GST invoice as a PDF.

The paid file arrives as a short-lived presigned download link. The API issues a link only for a file that exists in S3.

Key decision

Nothing is sold until every rendition exists.

The key technical decision was to let the processing pipeline decide what the storefront can sell. Uploads go directly to S3, and each later step starts from an event or a queue message.

When processing finishes, the platform checks the asset against its full rendition set: HD, Full HD and 4K for video, WAV and MP3 for audio, and the complete size ladder for images. An asset missing any rendition is marked failed. Failed assets stay off the storefront listings, so a buyer cannot pay for a file that does not exist.

The same rule applies at download. The API checks that a file is present in S3 before it signs a link, and the link expires shortly after it is issued.

Diagram of the Montage India asset lifecycle from upload through rendition checks to a short-lived paid download link
An asset reaches the storefront only when every rendition exists, and a download link is signed only for a file present in S3. Open full size ↗

Access

Four roles, each with its own reach.

Role guards on the API decide what each account can do. PostgreSQL row-level security on user-owned tables means a buyer's own records, such as downloads, are readable only by that buyer and by admins.

Buyer

Searches, previews and buys assets, then downloads them and keeps their orders, subscriptions and invoices.

Staff

Works on assets for the media types an admin assigns, such as video only or audio only.

Admin

Runs categories and tags, watermark settings, orders, subscription plans, discounts, email templates and reports with CSV export.

Super admin

The top role in the platform's role model, holding every admin permission.

Technical detail

Under the hood.

The engineering choices behind the platform, and what each one does.

AWS CDK
Queues, Lambda functions, storage, the database and monitoring are defined as code in one CDK app.
SQS with dead-letter queues
Separate queues for image, audio, zip and video jobs. A job that fails three times moves to a dead-letter queue.
AWS MediaConvert
Transcodes every video to HD, Full HD and 4K, and makes the watermarked HD and SD previews and a thumbnail.
Lambda functions
Process images, convert audio, build audio zip packages, start MediaConvert jobs, handle their completion and send notifications.
sharp and ffmpeg
sharp resizes and watermarks images. ffmpeg makes the watermarked audio previews.
RDS PostgreSQL 16
Encrypted storage, with automated backups kept for seven days.
Row-level security and audit
Row-level security on user-owned tables, and an append-only audit table that the application can add to but not change.
Razorpay handling
Payment signatures are checked with a constant-time comparison, and each webhook event is recorded once in a processed-events table so a retry cannot apply it twice.
Integer paise
Money is stored as whole paise, and a lint rule blocks ad hoc arithmetic on amounts. Invoice numbers stay unique when checkouts run at the same time.
Request protection
Role guards, rate limiting, helmet headers, signed cookies and reCAPTCHA, with secrets held in AWS Secrets Manager.
Hosting and deploys
The Next.js frontend runs on AWS Amplify behind CloudFront. The API runs in Docker on EC2, deployed by GitHub Actions, which rolls back to the previous build if the health check fails.

Outcome

Where it stands.

The rebuilt platform runs montageindia.com. MongoDB and Firebase are gone, and the API, storefront and admin run on NestJS, Next.js and PostgreSQL.

About 15 TB of footage from Montage India's NAS is being uploaded to AWS through the pipeline described above. Each file becomes sellable once all of its renditions exist.

Good fit

If you hold a media archive.

The same build suits a business that owns large media files and wants to sell or license them online.

  • Video, image or audio files sit on local storage or a NAS and need to reach the cloud
  • Buyers must preview files before paying, and the originals must stay protected
  • Checkout needs GST invoices and Razorpay payments that reconcile
  • A first version has outgrown its stack and needs a rebuild

Real questions

Common questions

How do you handle very large video uploads?+

The browser uploads straight to Amazon S3 with a presigned URL, so the file never passes through the API server. Arrival in S3 starts processing through SQS, Lambda and AWS MediaConvert, and a job that fails three times goes to a dead-letter queue for inspection.

How do you stop people downloading previews for free?+

Previews are separate files that carry a watermark, made by MediaConvert for video, sharp for images and ffmpeg for audio. The original renditions stay private in S3. After purchase a buyer receives a short-lived presigned link, and the API signs one only for a file that exists.

Can you move an existing platform off MongoDB?+

Yes. Montage India's first version ran on MongoDB and Firebase. During the rebuild its data moved to PostgreSQL, and by August 2026 MongoDB and Firebase were removed from the code. The steps depend on your data, so we plan them with you before anything moves.

Do clients own the code Metageeks writes?+

Yes. Every engagement ends with the source code handed over, and you can change it or give it to another team without asking us.

Your archive

Tell us about your media files.

Describe the files you hold and where they are stored. We will tell you how we would get them online and what the build would take.

Related services

All case studies Web application development Cloud and DevOps Custom software development Tell us what you need