The cheapest credible architecture is not a collection of free libraries. It is a small system with strong boundaries and a clear path to replace components as usage grows.

For an initial release, one control plane and one isolated processing worker are enough.

Keep the application together

  • Laravel provides authentication, policies, queues, notifications and administration.
  • Inertia, React and TypeScript provide a rich file interface without maintaining a second API application.
  • PostgreSQL stores organizations, permissions, object metadata, workflows and audit history.
  • The Laravel database queue is sufficient until job volume requires SQS.

Use the browser before building a conversion service

  • PDF.js for PDF files.
  • Native browser rendering for supported images, audio and video.
  • Sanitized Markdown, text, JSON and CSV viewers.
  • hls.js when adaptive HLS playback is required outside native support.
  • Short lived delivery access with byte range support for media seeking.

Isolate the tools that process customer files

A separate container can run LibreOffice, FFmpeg, archive tooling, thumbnail generation and malware scanning. Each job needs temporary storage, resource limits, a timeout, restricted network access and a durable result.

Let customers fund provider work where practical

AWS STS can provide temporary credentials for a customer role. The role and any session policies determine what the session can access. Original files and most generated output can remain in customer controlled storage.

Defer infrastructure with no evidence yet

  • Do not begin with Kubernetes, OpenSearch or a distributed workflow engine.
  • Do not transcode every media file automatically.
  • Do not index every document for AI before the customer enables it.
  • Do not support every archive or object store in the first release.
  • Do not add a commercial viewer until its fidelity saves more engineering cost than its license consumes.
THE DECISION

Ship secure S3 access and browser native formats first. Make expensive processing asynchronous and replaceable, then scale the component that becomes a measured constraint.

Primary sources