Section 1
Context, problem and scope
FlickPond started as a working video application with everything in one program. Project 2 turned it into a platform: the video workflow is offered through one public API, and the CPU-heavy encoding runs as its own service with its own data.
1aThe business problem
Many small content teams need the same four things for video: upload what they own, convert it so it plays on any device, see whether conversion worked, and keep playback private. Each team rebuilds them, and the conversion work competes with everything else the application does.
Training providers, course teams, small studios and community publishers all handle video. Each needs:
- secure upload of videos the uploader owns;
- conversion into formats that play on any device: an MP4 file plus HLS, which splits the video into short segments at several resolutions so a player can switch quality as bandwidth changes;
- visibility of progress and failures;
- playback restricted to the owner.
Today each application rebuilds these or copies another team's code, which duplicates effort and produces inconsistent security. There is also a capacity problem. Transcoding takes minutes of CPU per video and arrives in bursts (a course team uploads a whole folder at once). When it shares a deployment unit with the user-facing API, a backlog of uploads competes with logins and status checks for the same machine.
What the business needs from the platform
| Driver | What it means in practice | Where the design answers it |
|---|---|---|
| Reuse | A new application gets authenticated upload, processing, status and owner-only playback by calling one published API. It copies no code and holds no database credentials. | 3 · Producers and consumers |
| Independent capacity | Encoding capacity follows the backlog without scaling or redeploying the user-facing API. | 3 · Contexts, 4 · Launcher |
| Repeatable, secure releases | Every change passes automated tests and security gates; each service is released on its own and checked by an automated upload-to-playback test. | 5 · Continuous delivery |
| Low idle cost | A small team's platform is idle most of the time, so idle should cost almost nothing. The design target is scale-to-zero, about USD 3–5 a month when idle. | 4 · Cost model |
Who uses it
| Group | What they need | Use cases |
|---|---|---|
| Content owners | Upload one video or a whole folder, see each result, retry failures, play the output. Nobody else can see their videos. | UC-1 to UC-5 |
| Application developers (integrators) | Build a new client against the published API without the service code or database access. | UC-1, UC-3 to UC-5 |
| Platform operators | Change encoding capacity and release Processing without touching Media; see failures and recover. | UC-6, UC-7 |
| Course lecturer and assessors | Approved the team and the proposal; assess the architecture, evidence and delivery. | All |
The project has no external sponsor; the team proposed it. The owner, integrator and operator groups were defined as planning assumptions in week 1, not from interviews with customers.
1bPlatform thinking
A platform is something other applications build on. FlickPond's reusable unit is an owned video and its processing job; applications reach it only through the public API, and the team proved that with a second, independently written client.
The course frames a platform in terms of a seed (the core unit of value that is created and exchanged), the producers who create it and the consumers who use it. In FlickPond:
| Role | In FlickPond | How they interact with the platform |
|---|---|---|
| Seed | An owned video (an Asset) and its processing Job, linked by one shared identifier | Created when an upload is verified; the Asset ID is also the public job ID |
| Producers | Content owners submitting videos through the browser app (one file at a time) or the Publisher CLI (whole folders) | Reserve an upload slot, send bytes directly to storage, confirm; then poll status, retry, edit or delete |
| Consumers | The same owners, playing their own processed output | Ask Media for the job; receive short-lived signed links to the MP4 and HLS streams |
| Integrators | Developers building a new client | Two published OpenAPI documents and the message contracts; the Publisher is the worked example |
| Operators | The team | Delivery pipeline, release and restore tools, dashboards; encoder capacity is started automatically |
How each client calls the API, step by step, is in 3c · Producers and consumers.
What makes it a platform rather than an application
Three properties, each of which can be checked in the code:
- One public contract. Both clients use the same HTTPS API, documented as two OpenAPI files (one per service, version 1.0.0). Neither client has a private shortcut.
- An independent second client. The Publisher CLI is 491 lines of Python in 6 files, uses only the standard library and
httpx, imports nothing from the services and holds no database credentials. A test fails the build if that changes. It does bulk upload, which the browser app does not, so it is a different product on the same platform. publisher - Capacity that belongs to the platform. Encoding runs in the Processing service, which scales from zero to a capped number of encoders by itself. A client never provisions or waits for a worker of its own.
Reuse is demonstrated by two clients the team wrote, not by outside adoption. The only consumer of a video is its owner: the contract reserves a read-only viewer role, but nothing issues it, so there is no sharing with other people.
1cProject scope: what was inherited, what Project 2 built
Project 2 kept FlickPond's working video engine and changed everything around it: who owns which data, how the parts communicate, where it runs, how it is released, and who can reuse it.
The starting point
FlickPond was a Project 1 application built by a five-member team. It ran FastAPI, PostgreSQL, Redis with the RQ job queue, MinIO object storage, nginx and a browser frontend on one cloud virtual machine. FFmpeg workers already produced an MP4 and HLS at 360p, 480p and 720p, and owners played the result through an owner-checked link.
It worked, but as one application. A single API handled identity, uploads, jobs and playback. The API, the workers and the recovery task shared one job model and one database, and the jobs table had a foreign key to the users table. Another product could not reuse the video workflow without importing FlickPond's code or reading its database.
Team 17 has three members from two Project 1 teams. Ibrahim Mammadov was on the FlickPond team (worker, queue and media-type checks); Guruprasath Gopal and Nguyễn Kim Long came from a different team. The team chose FlickPond as its baseline because it already contained a real, CPU-heavy asynchronous workload. The code was frozen at the start and no Project 1 feature work continued. baseline
Inherited versus added
| Area | Inherited from FlickPond (Project 1) | Added by Team 17 (Project 2) |
|---|---|---|
| Service structure | One FastAPI application; workers and recovery share its job code | Two services, Media and Processing, found through domain analysis and connected only by versioned asynchronous messages |
| Data ownership | One database; jobs reference users | media_db and processing_db, each on its own Aurora cluster, with separate migration histories and least-privilege roles; no keys across databases |
| Reuse | One browser application | A second, independent client (Publisher CLI) built against the published API only |
| Runtime | One VM with nginx, Redis/RQ and MinIO | Serverless AWS: CloudFront, API Gateway, Lambda, SQS, Aurora Serverless v2, S3, finite Fargate encoders that scale 0 → 3 → 0, and a Lambda lane for short clips |
| Security | Login, owner checks, TLS, signed output links, CI scans | A Media-owned gateway authorizer, per-function IAM roles, queue access policies, time-limited direct-to-S3 upload grants, pinned source versions, negative tests run in the cloud |
| Delivery | Tests and scans in CI; manual deployment | Per-service CI lanes, image scans and dynamic scanning; automated delivery after every green build, with per-service release, smoke test and automatic restore |
FFmpeg encoding, the HLS output, running several worker replicas and the basic CI workflow are inherited. Team 17 reshaped and reused them but does not count them as its own work.
Use cases in scope
| ID | Use case | How it is delivered |
|---|---|---|
| UC-1 | Register, log in, upload an owned video (100 MiB maximum) | Direct upload to S3 under a 15-minute grant; bytes verified and the S3 version pinned before the Asset exists |
| UC-2 | Process into MP4 and HLS (360p/480p/720p, never above the source height) | Fargate encoders, or the Lambda lane for short clips. HLS is best effort: if it fails, the job still succeeds with the MP4. |
| UC-3 | Track status and play the result | Owner-only status from Media's local copy of the job; MP4 and HLS through short-lived signed links |
| UC-4 | Retry a failed job from the stored source | A new Attempt over the same pinned source; no re-upload |
| UC-5 | Bulk-publish a folder and report each result | Publisher CLI |
| UC-6 | Scale processing without touching Media | Encoders started automatically from the backlog, 0 → 3 → 0 |
| UC-7 | Release a new Processing version on its own, with smoke test and rollback | Per-service release by image digest, automatic restore if the smoke test fails |
Three small capabilities were added beyond the proposal, each reusing the same domain objects: owner edit operations (clip, crop, scale, convert) that create a new derived Asset; delete, recorded as a tombstone in both services and followed by cleanup of the source; and operator-only admin routes.
Out of scope
Recorded in the proposal: the rest of the Project 1 feature list (profiles, password reset, titles, tags, sharing modes); any viewer other than the owner (public sharing, student or LMS access, team ownership, tenants, billing); search, moderation and analytics; thumbnails, 4K and resumable uploads over 100 MiB; Kubernetes and general-purpose autoscaling; multi-zone database and multi-region failover; migration of Project 1 data; a third client and a separate staging environment. The proposal also excluded autoscaling, but the delivered platform starts encoders automatically from the backlog with a hard cap of three. That is bounded task launching, not a general autoscaler.
Timeline
| Phase | Dates (2026) | Delivered |
|---|---|---|
| 0 · Baseline and design | 22 Sep – 9 Oct | Team approval, proposal (4 Oct), lecturer feedback, frozen baseline, use cases, domain model, contracts |
| 1 · V1: two services on AWS | 10 – 18 Oct | Processing extracted (12 Oct), Media and Publisher adapted (13 Oct), AWS template and pipeline (15 Oct), three cloud proof runs, tag project2-v1 (18 Oct) |
| 2 · V2: one persistent environment | 18 Oct – 16 Nov | dc2-live deployed (18 Oct), automatic delivery, automatic encoder start, security tests, rollback proof, freeze (20 Oct), short-clip Lambda lane and per-service databases (21 Oct), presentation (26 Oct), final report (16 Nov) |
Planned versus actual dates and effort per member are in 2b.
Questions a professor may ask
What makes this a platform and not just a video website?
The video workflow is offered as a contract that other applications call, not as screens in one app. Two clients use the same public API: the browser app and the Publisher CLI, which was written against the API documents alone, imports no service code and holds no credentials beyond a login cookie. Capacity is also a platform concern: encoding scales inside Processing, so a client never provisions workers.
The limit is that both clients were written by the team. There is no external adoption, no developer portal and no billing, so this is a reusable capability with a demonstrated second consumer, not a marketplace.
Why choose an inherited Project 1 codebase instead of starting fresh?
The course is about architecting for scale, and FlickPond already had a real asynchronous, CPU-heavy workload (FFmpeg transcoding) with known pain points: one database shared by API and workers, and encoding competing with interactive requests. That made the architectural change measurable. A fresh project would have spent the same time building features before there was anything to scale.
The cost is the need to separate credit carefully. FFmpeg encoding, HLS, worker replicas and the basic CI are inherited and listed as such; the boundaries, contracts, cloud runtime, delivery pipeline and the second client are Project 2 work.
Why is Processing the part you extracted, and not identity or playback?
Processing has its own rules (one job per video, numbered attempts, a lease that decides which worker may write a result), its own lifecycle, and a different scaling profile: minutes of CPU per item, in bursts. Identity and playback do not: every playback or retry decision needs the owner and the Asset together, and in one database that is a single query. Splitting them into separate services would turn those joins into calls between services without giving either piece rules or release needs of its own.
The alternative considered in the proposal was four services (identity, media, processing, delivery). It was rejected as more contracts and operations than the problem justifies. The detailed reasoning is in 3c · Contexts.
Can a lecturer share a processed video with students?
No. Ownership belongs to the uploading account, and only the owner can read, retry, edit, delete or play an Asset; anyone else gets a 404, so they cannot even tell it exists. Sharing was excluded in the proposal. The message contract already accepts a viewer role so that a read-only role could be added later without a contract change, but the authorizer never issues it. Adding sharing would need a grant model in Media (who may view which Asset) and a change to the playback route's owner check; Processing would not change.
Why make low idle cost a business driver?
A small team's platform is idle most of the day and busy in bursts, so a design that keeps servers, a message broker and a NAT gateway running would spend most of its money on waiting. The target was scale-to-zero: Lambda, paused Aurora, SQS and finite Fargate tasks cost nothing when unused, leaving a fixed estimate of about USD 3–5 a month for alarms, secrets, logs, image storage and data. The price is latency after idle: a paused database takes seconds to resume, and a Fargate encoder takes tens of seconds to start. That trade-off is measured in 4 · Cost model and 4 · Lanes. The USD 3–5 is an estimate; the actual bill has not yet been read.
You added edit, delete and admin routes. Isn't that feature work outside the brief?
They are small and each reuses the same domain objects rather than adding new ones. Edit creates a new derived Asset whose source is a pinned copy of the parent's output, then goes through the normal job path. Delete is a tombstone plus a cancel message, which exercised the hardest ordering case (a cancel that arrives before its submit). Admin routes exercise the operator role. The main contribution remains the change in boundaries, contracts, runtime and delivery.