Replicating a Video Site in Two Hours with AI: Building a Programmable Information Portal
This article examines how AI coding tools can turn a clear specification into a working community-curated video site prototype in about two hours, without treating the tool as a substitute for architecture. It breaks down the engineering work behind the demo: metadata-only data modeling, community-signal filtering, API contracts, explainable recommendation, provenance display, safety and compliance boundaries, deployment operations, and a reusable checklist. The goal is not to clone a page but to show how developers can build a customizable information portal that replaces opaque platform recommendations with transparent, programmable rules and community-vetted content.
Replicating a Video Site in Two Hours with AI: Building a Programmable Information Portal
1. From Recommendation Fatigue to a Programmable Information Portal
A common scenario: a user opens a mainstream video platform intending to find valuable content, but is surrounded by exaggerated thumbnails, repeated topics, and aggressive algorithmic recommendations. The problem is not entirely the recommendation algorithm itself. It is the mismatch between the platform’s objective and the user’s objective: the platform optimizes for dwell time and engagement, while the user wants a set of content that has been filtered by a community and is traceable and explainable.
In the original case, a developer used an AI coding tool to replicate a video site layout in about two hours and limited the content source to videos repeatedly recommended by a technical community over several years. What matters is not “building a page in two hours.” It is the new path it demonstrates: turning the information portal from a platform’s black-box recommendation into a programmable system where individuals can define the rules, data, and interface.
For developers, this can be abstracted into a general technical problem: how to build a customizable content aggregation and browsing system based on public metadata, community signals, and lightweight recommendation logic. It involves data collection and normalization, filtering rules, metadata modeling, frontend layout, recommendation ranking, comment provenance, security and compliance, and deployment operations.
2. Breaking Down the Goal: The Key Is the Specification, Not the Page
“Two hours” can easily be misunderstood as meaning the model can complete everything from nothing. In real engineering, short delivery times depend on clear boundaries:
- Clear page scope: left navigation, video card feed, detail page, category page, and personalized recommendation area.
- Clear data source: do not download video files; store only metadata such as title, cover URL, duration, publish time, and view count, and link to or embed the official playback capability.
- Clear filtering rules: include only videos that have been repeatedly recommended in a technical community, have relatively high discussion quality, and have working links.
- Clear acceptance criteria: layout close to the target style, browsable categories, explainable recommendations, and a detail page that shows community recommendation count and timeline.
- Clear non-goals: no full copyrighted content hosting, no complex advertising system, and no large-scale transcoding or distribution.
Therefore, the value of an AI coding tool is not to replace architecture design, but to quickly turn a “specification” into runnable code. The more the prompt resembles a requirements document, the more stable the generated result. In the original case, a natural-language prompt was effective because implicit constraints still existed: video style, limited content sources, and no obvious mistakes. In engineering practice, these implicit constraints should be made explicit.
3. System Architecture: Collection and Filtering, Metadata, Recommendation, and Provenance
A practical community-curated video site can be divided into four layers.
3.1 Data Layer: Store Only Metadata and Signals
The data layer should store three types of data:
- Video metadata: normalized ID, title, cover URL, duration, publish time, view count, source link, and topic tags.
- Community signals: recommendation count, recommendation time, discussion heat, comment summary, and community discussion link identifier.
- User data: likes, history, watch later, and topic preferences. User data should be stored locally or minimized as much as possible.
Example data model:
{"canonicalId": "video:abc123","title": "Example video title","coverUrl": "https://example.invalid/cover.jpg","durationSec": 1830,"publishedAt": "2024-01-01","viewCount": 120000,"topics": ["software engineering", "history"],"communitySignals": {"recommendCount": 7,"firstRecommendedAt": "2020-03-01","lastRecommendedAt": "2024-02-10","commentCount": 42}}
Normalization is critical: the same video may be recommended multiple times with different links and different parameters. Deduplication is needed through title normalization, duration, author identifier, and link normalization. Otherwise, recommendation counts will be counted multiple times.
3.2 Filtering Layer: Repeated Community Recommendations as a Quality Signal
The filtering logic should not simply mean “it appeared in the community.” A more robust rule set is:
- The recommendation count reaches a threshold.
- The time span between the first and latest recommendation is long enough.
- Discussion content is not just a bare link and is not low-quality spam.
- The video link is accessible.
- Topic tags can be classified.
- Duplicate, invalid, and clearly irrelevant content is excluded.
Pseudocode:
for item in candidates:if not valid_source(item): continueif not accessible(item): continuesignals = community_signals[item.canonical_id]if signals.recommend_count < 3: continueif signals.span_days < 30: continuescore = log(1 + signals.recommend_count)* time_decay(signals.last_recommended_at)* quality_weight(signals.comment_count)if score >= threshold:publish(item, score)
This filtering mechanism uses “community consensus” as a proxy for quality and is more explainable than simply ranking by view count. High view count does not mean long-term value; being repeatedly recommended over years often indicates cross-time value.
3.3 Service Layer: API Contracts Before Page Generation
Before asking an AI coding tool to generate the frontend, define API contracts first, for example:
GET /api/videos?topic=&cursor=GET /api/videos/{id}GET /api/recommendations?userId=POST /api/historyGET /api/topics
Each endpoint should specify pagination, sorting, error codes, and fields. This makes it easier for the model to keep the frontend and backend consistent. Otherwise, problems such as frontend field names not matching the backend, missing pagination logic, and empty detail pages are common.
3.4 Presentation Layer: Layout Replication and Accessibility Together
A video site layout usually includes left navigation, top search, a video card grid, and a detail page. When replicating it, do not focus only on visual similarity. Also consider:
- Card information hierarchy: cover, title, duration, publish time, and view count.
- Responsive layout: single column on mobile and multiple columns on desktop.
- Keyboard accessibility and contrast.
- Empty state, loading state, and error state.
- Image lazy loading and performance budget.
4. Specification-Driven Generation: A Prompt Is Not One-Sentence Magic
A natural-language prompt can start generation, but in engineering, specification-driven generation is preferable:
- Role and boundary: state whether the task is frontend, backend, or full stack.
- Inputs and outputs: list the data model and API contracts.
- Constraints: do not download videos, do not store full content, and use metadata only.
- Acceptance checklist: page routes, category filtering, recommendation explanations, and detail-page provenance.
- Phased execution: scaffold first, then data layer, then pages, then tests.
- Prohibitions: do not introduce unnecessary dependencies and do not generate unauditable scripts.
Example specification fragment:
Goal: build a community-curated video site.Pages: home recommendation feed, topic page, detail page, history page, watch later.Data: store only metadata and community signals; do not host video files.Recommendation: score based on topic preference, community recommendation count, time decay, and diversity penalty.Security: escape all external content; minimize user data; APIs must support pagination.Acceptance: routes accessible, fields consistent, complete empty states, mobile usable.
Phased generation is more controllable than one-shot generation. After each phase, run static checks, unit tests, and page snapshots, and fix issues immediately.
5. Core Implementation Details
5.1 Recommendation Ranking: Explainability First
Personalized recommendation does not need a complex model at the beginning. A lightweight scoring method is enough for a personal site:
score =0.40 * topic_match(user, video)+ 0.25 * community_score(video)+ 0.15 * freshness(video)+ 0.10 * quality_score(video)- 0.10 * repetition_penalty(user, video)
Here, community_score can be obtained by normalizing the logarithm of the recommendation count, freshness uses time decay, and repetition_penalty prevents the same topic from dominating the feed repeatedly. Recommendation results should show reasons, such as “because you follow software engineering” and “this video has been recommended by the community 7 times.”
5.2 Categories and Topic Tags
Categories can be created through rules plus model assistance: first generate candidate tags from keywords and community discussion titles, then perform manual sampling verification. Category pages should support multiple tags, sorting, and pagination. The tag system should not be too granular. A recommended structure is 6–10 top-level topics and secondary tags expanded as needed.
5.3 Comment and Recommendation Provenance
The most valuable part of the detail page is provenance: how many times the video was recommended in the community, the first and latest recommendation times, and related discussion summaries. Show only necessary summaries and link identifiers. Do not scrape full comment content, and comply with source-site terms and copyright requirements.
6. Security, Compliance, and Model Guardrails
When using AI coding tools to generate code, security guardrails and compliance boundaries must be considered:
- Sandbox execution: generated code runs in an isolated environment, with dependencies locked and audited.
- Least privilege: collection jobs read only public metadata and do not bypass access controls.
- Copyright compliance: do not download, transcode, or host full videos; store only metadata and link to official playback.
- Content safety: escape and filter external titles and comment summaries.
- Model fallback plan: when an inference service is degraded or refuses a task due to safety policy, split the task, add clarification, or switch to manual review instead of trying to bypass the guardrails.
- Audit logs: record generation, modification, publishing, and collection actions for traceability.
The stronger the model capability, the more engineering constraints are needed. “Replicating in two hours” should be understood as efficient generation under clear specifications and human acceptance, not unreviewed automatic deployment.
7. From a Video Site to a General Information Portal
This pattern can be extended to more information portals: custom short-video feeds, long-video curated sites, technical news feeds, paper curation sites, podcast aggregation pages, and more. The core method is the same:
- Choose high-quality signal sources.
- Normalize and deduplicate.
- Establish explainable filtering rules.
- Design lightweight recommendation.
- Provide provenance and user control.
- Maintain copyright and compliance boundaries.
This allows individuals or teams to have “their own internet portal”: instead of watching whatever the platform recommends, they organize content according to their own interests, community consensus, and topic structure.
8. Deployment, Operations, and Generic Cloud Capabilities
During deployment, frontend static assets, API services, collection jobs, index storage, and log monitoring can be decoupled. Generic cloud services can be selected from categories such as container platforms, object storage, message queues, log services, and monitoring and alerting. For example, on Baidu AI Cloud, these generic capabilities can be combined as needed, but the specific selection should be evaluated against budget, region, compliance, and team operations capability. Collection jobs should have rate limits, retry backoff, and failure alerts. Recommendation indexes should support incremental updates. User data should provide export and deletion capabilities.
9. Engineering Checklist
- Is the data model using a unified canonical ID and deduplication?
- Are filtering rules explainable, configurable, and rollback-capable?
- Do API contracts come before page generation?
- Does recommendation include diversity penalty and reason display?
- Does the detail page show recommendation count and timeline?
- Is only metadata stored, without hosting full videos?
- Is external content escaped? Is user data minimized?
- Has generated code passed tests, audits, and sandbox validation?
- Are there logs, monitoring, alerting, and fallback plans?
10. Conclusion
Using AI coding tools to quickly replicate a video site looks like page generation, but it is essentially a combination of specification engineering, data engineering, recommendation engineering, and security engineering. The lesson of the two-hour case is that when requirement boundaries are clear, data signals are explicit, and acceptance criteria are executable, AI can significantly shorten the path from idea to prototype. However, a personalized information portal that can run long term still requires normalized data, explainable filtering, copyright compliance, security guardrails, and operations support. For developers, the more valuable practice is to turn this method into a reusable content aggregation framework, rather than replicating a page once.
