How to Build a Self-Hosted Content Portal in Two Hours with AI: Architecture, Ranking, and Deployment
This article explains how to build a self-hosted information portal that replaces algorithmic recommendations with transparent, auditable filtering rules. Using AI coding tools, a developer can recreate a video-site experience in about two hours. The guide covers a three-layer data design (raw, standardized, and serving layers), URL normalization and deduplication, a multi-factor quality score with time decay, a pluggable filtering and reranking pipeline, prompt structures for AI-assisted development, and the cloud services needed for long-term operation. It also outlines compliance, filter-bubble, maintenance, and availability risks. The approach applies to video, news, papers, and open-source projects alike.
1. From Algorithmic Feeds to a Self-Built Information Portal
It is late Friday night, you want to relax with a video, and the homepage is packed with exaggerated thumbnails and repeated topics. This is the typical content consumption experience today. Recommendation systems optimize for dwell time and click-through rate, not for whether a piece of content is worth your time. So someone ran an extreme but representative experiment: using an AI coding tool, they described their needs in a single natural-language sentence and built, in about two hours, a site that only collects videos that have been repeatedly recommended over a long period.
The value of this experiment is not that it cloned a video site. It validates a path: when the cost of writing code approaches zero, the power to filter information can shift from platforms back to individuals. This article sets aside the specific product and discusses only the general engineering methods and architecture design behind it.
2. Core Idea: Replace “Recommendation Power” with Explainable Filtering Rules
The logic of a traditional information portal is: the platform models your behavior, then pushes content to you. A self-built portal works the opposite way: you define the sources and the rules, and the machine only executes and presents them.
There are three key abstractions:
- Sources are taste. Choosing which communities, columns, or subscription lists form the candidate set is equivalent to declaring “I trust whose judgment.” The approach in the original work extracts repeatedly recommended videos from years of accumulated discussion in a technical community. In essence, it replaces individual clicks with group consensus.
- Rules are auditable. Every item entering your feed should be able to answer “why is it here.” Keeping metadata such as the number of recommenders, the first time it was recommended, and discussion activity turns black-box ranking into white-box ranking.
- The portal is replaceable. Videos, news, papers, open-source projects, and podcasts are structurally the same problem: candidate set → filter → rank → present → feedback.
3. Data Layer Design: Candidate Sets, Deduplication, and Metadata
The place where a self-built portal most easily fails is not the frontend but data quality. A three-layer model is recommended:
- Raw layer: Store the original text, links, and timestamps of scraped items without any processing, for traceability.
- Standardized layer: Unify fields, for example
id / title / url / topic / published_at / source_refs[] / score. For multiple sources, normalize URLs and deduplicate (strip tracking parameters, unify case, and expand short links). - Serving layer: Materialized views or cache tables that store results aggregated by topic and time window, ready for pages to read directly.
An illustrative data structure (pseudocode):
class Item:id: strtitle: strurl: strtopic: str # topic labelpublished_at: datetimementions: int # number of independent recommendationsfirst_seen: datetime # first time discovereddiscuss_count: int # discussion volumequality: float # overall quality score
The quality score should use “multi-factor weighting plus time decay” so that old content does not stay on top forever:
def quality(item, now, half_life_days=180):age = (now - item.first_seen).daysdecay = 0.5 ** (age / half_life_days)base = 0.4 * norm(item.mentions) + 0.3 * norm(item.discuss_count) \+ 0.3 * norm(item.persisted_days) # degree of not being forgotten over the long termreturn base * decay
Three engineering points matter: scraping must respect the target site’s access frequency and authorization terms; incremental updates should take priority over full rebuilds; and all raw data should retain source references for later review in case of disputes.
4. Filtering and Ranking: From Piling Up Volume to Selecting What Is Worth Watching
The filtering pipeline should be a pluggable chain in which each stage does one thing:
- Hard rules: language, duration, topic whitelist, blacklist keywords, and removal of dead links.
- Consensus rules: the number of independent recommendations reaches a threshold, and the recommendation time span is long enough (still mentioned months later, indicating lasting value).
- Quality rules: detect exaggerated titles, remove items whose thumbnails contain too much text, and cluster duplicate topics to keep only the representative work.
- Diversity rules: cap the share of a single topic on one page to avoid “the whole site being the same kind of content.”
- Personalization rules: rerank within the candidate set rather than recall again. This is important — personalization happens only inside the high-quality pool you have defined, so there is no “the more you scroll, the narrower it gets” collapse.
A minimal reranking function:
def rerank(items, user_profile, limit=20):scored = []for it in items:s = it.qualitys *= 1.0 + 0.5 * topic_affinity(it.topic, user_profile)s *= 1.0 - 0.3 * seen_penalty(it.id, user_profile)scored.append((s, it))scored.sort(key=lambda x: -x[0])return [it for _, it in scored[:limit]]
5. Application Layer: What You Can Build in Two Hours
With AI coding tools, the frontend can reach an interaction skeleton similar to mainstream video sites: left navigation (history, watch later, favorites, subscriptions), a central recommendation feed (thumbnail, title, publish time, view count), related recommendations on the right, and a detail page showing source discussions and recommender information. For technology choices, an all-in-one frontend-backend application framework plus a relational database plus scheduled tasks is enough to support a scale of tens of thousands of items.
The key is how the prompt is expressed. The plain natural-language sentence in the original work succeeded because it provided all of the following at once: the target form (video-site style), content constraints (only collect a certain kind of repeatedly recommended content), and quality requirements (no errors). A reusable prompt structure is:
Role: You are a senior full-stack engineerGoal: Build a <form> siteData constraints: <candidate set source and filtering criteria>Page structure: <navigation/list/detail>Non-functional requirements: <performance, accessibility, error handling>Deliverables: <directory structure + how to run + data initialization script>
In practice, it is better to break a large task into five steps and confirm them one by one — data pipeline → data model → page skeleton → ranking logic → deployment script — which has a higher success rate than generating the whole site at once and makes problems easier to locate.
6. Deployment and Operations: Keeping a Self-Built Portal Alive Long Term
Running locally is only the beginning. For the cloud, four general capabilities are usually enough: a container platform to host application instances, object storage for thumbnails and static assets, a managed database for items and user state, and scheduled tasks and a message queue to drive incremental scraping. Adding a logging service and monitoring and alerting lets you detect scraping failures, data delays, and rising API error rates as soon as they happen.
The keys to cost control are batching scraping and parsing, caching page results, and tiering cold data storage. For a personal-scale site, the bottleneck most of the time is data updates rather than page rendering, so it is more cost-effective to prioritize the budget for the data pipeline.
7. Boundaries and Risks
- Compliance: only index and link, do not republish content; respect source sites’ terms and access frequency limits.
- Echo chamber: a self-built portal naturally reinforces existing preferences, so actively introduce “random exploration slots” and cross-topic recommendations.
- Maintenance cost: rules become outdated, so review filtering thresholds and topic weights once per quarter.
- Availability: a single-point database and no backups are common sources of incidents; enable automatic backups early.
8. Conclusion
Recreating a video site in two hours does not really recreate the interface; it recreates control over information distribution. When generation costs are low enough, an individual can fully own a customized portal: only content validated by time, organized only by one’s own topic system, with personalization happening only inside the pool one has defined. This method works equally well for video, news, and papers, and it is worth doing your own version.
