From Landing Page to Full Stack: A Practical Guide to Website Delivery with AI Agents
As open-source LLMs keep closing the gap with leading proprietary models on coding benchmarks that mirror real engineering work, AI agents can now carry a project much further than before. But a benchmark score is not the same as shipping a system that runs in production. Using one concrete example—building the complete website for a fictional suborbital space-travel brand, from brand visuals and a scroll-driven flight timeline to a 3D product showcase and a full booking flow—this guide breaks delivery into five stages: turning vague requirements into executable specs, engineering the visual layer, keeping the business layer consistent, using automated self-tests to hold quality, and running reliably in production. It shows how to translate adjectives like "premium feel" into measurable parameters, how to handle inventory, concurrency, and idempotency so seat booking never oversells, and why the scarce skill is shifting from writing code to knowing what to write and how to verify it.
Introduction: From “Can Write Code” to “Can Ship a System”
Over the past year, the capabilities of open-source large models have improved noticeably. On some public code benchmarks that focus on realistic software-engineering tasks, a few newer open-source models now trade wins with top closed-source models, and in some cases pull ahead. These benchmarks cover three kinds of tasks: fixing bugs in real repositories, completing builds and debugging in a terminal environment, and submitting code changes that are ready to merge in one pass.
It is worth being clear-eyed, though. A code-benchmark score measures a model’s local ability on a controlled task, and there is still a real gap between that and delivering a system that can actually go live. Real projects also involve clarifying requirements, making architectural trade-offs, data modeling, interface design, authorization checks, error handling, performance tuning, building observability, and ongoing maintenance. So the more meaningful test is: how far can an agent take a project from a vague idea, and where does it go wrong?
This article works through a concrete task: using an agent to build, from scratch, the official website for a “near-Earth orbital / suborbital travel” brand. The site must include brand visuals, a flight-timeline narrative, a 3D product showcase, and a complete end-to-end loop for selecting a flight, choosing a seat, and submitting a booking. It stands in for a typical enterprise site combined with a lightweight transactional flow. We break it into five parts:
- How requirements become executable specs;
- How to engineer the visual layer;
- How to keep the business layer consistent;
- How to use automated self-tests to hold quality;
- How to run reliably in a production environment.
Part 1: Translate “Premium Feel” into Executable Specs
The most common failure in practice is not that the agent lacks capability—it is that the requirements are described too vaguely. Phrases like “build a tech-feeling website” or “make it feel premium” produce completely different results depending on who implements them. The effective approach is to break requirements into four kinds of specs first, then hand them to the agent.
1. Product and content specs
- Page list and information architecture: hero brand section, flight timeline, cabin classes and pricing, booking flow, FAQ, and so on.
- Core user tasks: learn about the product, choose a flight, confirm a cabin/seat, submit booking information, and view the booking result.
- Content assets: brand name, route descriptions, narrative copy for each stage, cabin tiers and prices, and so on. It is best to organize these into a structured copy sheet up front to reduce rework later.
2. Visual specs
Visual specs turn adjectives into measurable parameters:
- Primary color, accent colors, and neutrals;
- Type scale for headings, body text, and monospace data;
- Corner radii, spacing, and grid;
- Animation duration, easing curves, and trigger conditions.
For the “space travel” site in this article, “premium feel” can be translated into:
- A deep space palette with teal-blue as the accent;
- Monospace type for numbers and times;
- A few orange highlights;
- Slow, non-disruptive animation pacing.
3. Technical specs
- Tech stack;
- Directory structure and module boundaries;
- Draft data model;
- Draft API contracts.
4. Acceptance specs
State which behaviors must pass tests, for example, “a full flight cannot be booked anymore” and “submitting the same order twice produces only one record.”
A structured prompt looks roughly like this:
# RoleYou are a full-stack engineer responsible for delivering a website that can go live.# ProductThe official website for a suborbital space-travel brand, aimed at high-net-worth travelers.# Pages and modules1. Hero: full-screen animated background + brand tagline + flight data panel2. Flight timeline: 6 stages, revealed progressively on scroll3. Cabins and pricing: seat layout + price + remaining seats4. Booking flow: choose flight → choose seat → enter passenger info → confirm5. FAQ# Visual guidelinesDark palette; teal-blue accent; orange for key timeline data;16px body text, line-height 1.7; animation 300–600ms, easing ease-out.# Technical constraintsSeparated front end and back end; server handles inventory checks and ordering;6 fixed seats per flight; booking data persisted;integration tests for key APIs.# Acceptance criteriaFull flights cannot be booked; duplicate submissions are idempotent; APIs return clear messages on errors.
This prompt carries three kinds of key information: clear boundaries, testable criteria, and technical constraints. The most critical is the inventory and idempotency rules within the constraints. If these are not stated up front, the agent will very likely generate only a shell—“the front end lets you pick a seat, and clicking confirm just succeeds.” By contrast, adjectives like “premium” or “cool” can be conveyed with example pages, but it is the structured constraints that truly determine delivery quality.
Part 2: The Visual Layer—Turning “Cool” into Maintainable Engineering
The visuals are the brand’s first impression, and also where an agent is most likely to overdo it. The typical cases below each represent a common implementation pattern.
1. Full-Screen Video Background: Balancing Performance and Accessibility
A common hero approach is a viewport-filling ambient video, such as the curve of the Earth seen through a spacecraft window. Embedding a video directly has at least three pitfalls:
- Autoplay restrictions: most mobile browsers require a video to be muted and inline to autoplay, or it will not start automatically.
- Bandwidth and decode contention: high-resolution video slows down the first load.
- Discomfort for sensitive users: a continuously moving background can cause discomfort.
Recommended approach:
- Use a poster image as a first-frame fallback;
- Preload only metadata;
- Compress the bitrate and provide multiple formats;
- Pause playback when the page is not visible;
- Respect the system’s “reduce motion” preference.
<div class="hero"><video class="hero__bg"autoplay muted loop playsinlinepreload="metadata"poster="/images/hero-poster.webp"aria-hidden="true"><source src="/videos/hero.webm" type="video/webm"><source src="/videos/hero.mp4" type="video/mp4"></video><div class="hero__content"><h1>See Earth differently, from 100 km up</h1><p>Suborbital flight · about 12 minutes end to end · 6 seats per flight</p></div></div>
.hero {position: relative;min-height: 100vh;overflow: hidden;}.hero__bg {position: absolute;inset: 0;width: 100%;height: 100%;object-fit: cover;}/* gradient overlay on the text layer keeps content readable on any frame */.hero__content {position: relative;z-index: 1;color: #fff;padding: 24px;background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 60%);}/* respect the user's reduced-motion preference */@media (prefers-reduced-motion: reduce) {.hero__bg { display: none; }.hero { background: url('/images/hero-poster.webp') center / cover; }}
const video = document.querySelector('.hero__bg');if (video) {// pause when the page goes to background, try to resume when it returns to foregrounddocument.addEventListener('visibilitychange', () => {if (document.hidden) {video.pause();} else {video.play().catch(() => { /* autoplay may be blocked; keeping the poster is fine */ });}});}
The video is hidden from assistive technology with aria-hidden, and any key information must also appear in visible text.
2. Data Panel and Breathing Status Dot: Engineering in the Details
A small flight-data panel in the lower-right lists altitude, speed, g-force, and mission time, laid out in a monospace font. The engineering point here: the countdown and real-time data change every second, and if the font is not monospaced the numbers will jitter left and right. You can explicitly enable tabular numerals and reserve a fixed width for each row’s value:
.telemetry {font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-variant-numeric: tabular-nums;font-size: 13px;letter-spacing: 0.02em;line-height: 1.8;}.telemetry__value {display: inline-block;min-width: 6ch; /* reserve character slots so changing values don't cause jitter */text-align: right;}
The teal “system online” breathing dot in the upper-left can be done in pure CSS. Note that you should not add a transition on box-shadow: in some browsers it is not continuously interpolable, and an abrupt change breaks the breathing effect:
.status-dot {width: 8px;height: 8px;border-radius: 50%;background: #7df9ff;box-shadow: 0 0 8px 2px rgba(125, 249, 255, 0.45);animation: breathe 2.6s ease-in-out infinite;}@keyframes breathe {0%, 100% { opacity: 0.45; }50% { opacity: 1; }}@media (prefers-reduced-motion: reduce) {.status-dot { animation: none; opacity: 1; }}
3. Vertical Timeline Narrative: Scroll-Driven Progressive Disclosure
The main body of the page is a flight timeline that runs through the whole journey:
- T-60:00: complete security screening at an equatorial spaceport and change into a custom pressure suit;
- T-02:00: strap into the seat inside the cabin; system self-check;
- T+00:00: ignition and liftoff, entering the peak g-force phase;
- T+02:30: engine cutoff, entering microgravity;
- T+09:00: atmospheric re-entry, drogue/parachute deployment;
- T+12:00: capsule splashes down at sea; the recovery team arrives.
Each node pairs one key orange data point with a scene image, revealed progressively on scroll. For implementation, an one-shot entrance animation via IntersectionObserver is recommended. It avoids reading layout frequently inside scroll events, which prevents forced synchronous reflow:
const observer = new IntersectionObserver((entries, obs) => {for (const entry of entries) {if (!entry.isIntersecting) continue;entry.target.classList.add('is-visible');obs.unobserve(entry.target); // play once, then release the observation}},{ threshold: 0.25, rootMargin: '0px 0px -10% 0px' });document.querySelectorAll('.timeline__item').forEach((el) => observer.observe(el));
.timeline__item {opacity: 0;transform: translateY(32px);transition: opacity 600ms ease-out, transform 600ms ease-out;}.timeline__item.is-visible {opacity: 1;transform: translateY(0);}
For effects that need continuous computation, such as a “top-of-page progress bar” or “nodes lighting up in sequence as you scroll,” you can throttle with requestAnimationFrame. The optimization principle: only update when the change exceeds a threshold, and only touch compositing-friendly properties like transform and opacity:
let ticking = false;function updateProgress() {const max = document.documentElement.scrollHeight - window.innerHeight;const ratio = max > 0 ? Math.min(1, window.scrollY / max) : 0;document.documentElement.style.setProperty('--scroll-progress', String(ratio));ticking = false;}window.addEventListener('scroll', () => {if (!ticking) {ticking = true;requestAnimationFrame(updateProgress);}}, { passive: true });
One easily overlooked detail on the timeline: relative times like T-60:00 must be derived from the “scheduled departure time” returned by the server—you cannot hardcode the string. Departure time should be stored using a timezone-aware database type, and the front end should format it for display based on the user’s local time zone.
4. 3D Product Showcase: Trading Off Between Effect and Cost
A fictional luxury fragrance brand’s website can serve as a typical “material and light” case. The hero is a single amber perfume bottle:
- resting on a marble surface, with the liquid inside slowly swirling;
- light passing through the glass, casting caustic patterns on the surface;
- the product name overlaid on the bottle in a high-contrast serif typeface.
There are three implementation paths for effects like these, with cost increasing in turn:
| Approach | How it works | Advantages | Limitations |
|---|---|---|---|
| Pre-rendered video | Produce a looping video in advance | High quality, mobile-friendly | Not interactive, larger file |
| CSS / composited layers | Multiple gradients, blend modes, blur, SVG filters | Small size, easy to make responsive | Limited realism |
| Real-time rendering | WebGL shaders | Controllable viewpoint, highly interactive | High development cost, must consider low-end devices and battery usage |
Whichever approach you use, two bottom lines must hold:
- Visuals are the finishing touch; core features like the booking flow must not depend on them;
- Prepare a static fallback for rendering failures or low-performance devices.
In the CSS approach, the caustic patterns are usually built from stacked semi-transparent radial gradients, the bottle body uses light-to-dark gradients to simulate glass thickness, and the serif typeface is layered on top of the bottle with a slight blend mode so it “adheres” to the glass surface. One thing to keep in mind: type is not better the smaller it is—on mobile, the brand name needs to be around 2rem to look dignified rather than cramped.
Part 3: The Business Layer—From “Looks Like It Runs” to “Survives Concurrency”
Visuals decide the first impression; the business logic decides whether the product is actually usable. Take the “6 seats per flight” space trip: it looks simple, but it involves a whole series of problems—inventory consistency, concurrency control, idempotency, authorization, and auditing.
1. Data Model
The minimum viable model has four tables: flights, seats, bookings, and passengers. Modeling seats with a fixed seat number is the least troublesome and most reliable approach:
CREATE TABLE flights (id BIGINT PRIMARY KEY, -- flight IDflight_no VARCHAR(16) NOT NULL UNIQUE, -- flight numberdepart_at TIMESTAMPTZ NOT NULL, -- departure time (timezone-aware)arrive_at TIMESTAMPTZ NOT NULL, -- estimated landing timetotal_seats SMALLINT NOT NULL DEFAULT 6,occupied_seats SMALLINT NOT NULL DEFAULT 0,status VARCHAR(16) NOT NULL DEFAULT 'scheduled',version INT NOT NULL DEFAULT 0, -- optimistic lock versionCHECK (occupied_seats >= 0 AND occupied_seats <= total_seats),CHECK (arrive_at > depart_at));CREATE TABLE seats (flight_id BIGINT NOT NULL REFERENCES flights(id),seat_no SMALLINT NOT NULL CHECK (seat_no BETWEEN 1 AND 6),seat_class VARCHAR(16) NOT NULL, -- standard / premiumPRIMARY KEY (flight_id, seat_no));CREATE TABLE bookings (id BIGINT PRIMARY KEY,idempotency_key VARCHAR(64) NOT NULL UNIQUE, -- idempotency key, prevents duplicate submissionsflight_id BIGINT NOT NULL REFERENCES flights(id),seat_no SMALLINT NOT NULL,status VARCHAR(16) NOT NULL, -- confirmed / cancelledcontact_email VARCHAR(255) NOT NULL,created_at TIMESTAMPTZ NOT NULL DEFAULT now(),UNIQUE (flight_id, seat_no) -- unique seat per flight);CREATE TABLE passengers (id BIGINT PRIMARY KEY,booking_id BIGINT NOT NULL REFERENCES bookings(id),full_name VARCHAR(64) NOT NULL,birth_date DATE NOT NULL,passport_no VARCHAR(32),CHECK (birth_date <= CURRENT_DATE));
Design highlights:
- Push constraints down to the database: seat range, non-negative counts, and departure earlier than arrival are all backed by
CHECKconstraints, so application-layer omissions are caught. - Optimistic lock version: the flights table keeps a
versionfield, preparing for an upgrade to high-concurrency deduction. - Bookings carry their own idempotency key: the client generates a unique request number for each submit click.
2. Inventory Deduction: Three Strategies and How to Choose
The seat-selection step must guarantee that, at any moment, a given seat can be held by only one valid order. There are three common approaches:
| Strategy | Principle | Suitable scenarios | Caveats |
|---|---|---|---|
| Conditional update | Use an UPDATE with built-in conditions to judge success |
Medium/small traffic, single deduction | Relies on database row locks; simple to implement |
| Row-level lock | Explicitly lock with SELECT ... FOR UPDATE |
Needs read-then-multiple-checks | Keep transactions short; avoid deadlocks |
| Atomic counter | Atomic operations on an in-memory counter | Very high concurrency, simple inventory dimensions | Must handle cache/database consistency |
For a “6 seats per flight, extremely high ticket price” scenario, QPS is very low but consistency requirements are extremely high. Here, a conditional update combined with a unique constraint is the safest choice: the database row lock is naturally mutually exclusive, and no extra component is needed.
It must be clear that an application-layer “query first, then insert” combination cannot prevent overselling. Two concurrent requests may both read the seat as free, then insert one after the other. Unless there is an outer lock, the database unique constraint will simply reject one of them, and the user sees an inexplicable failure. The correct approach is to put the inventory change and the order creation in the same transaction:
def create_booking(flight_id, seat_no, passengers, idempotency_key, contact_email):# 1. Idempotency check: return the existing result for a repeated keyexisting = repo.find_by_idempotency_key(idempotency_key)if existing:return existingwith db.transaction():# 2. Lock the flight row to serialize bookings for the same flightflight = repo.lock_flight(flight_id) # SELECT ... FOR UPDATEif flight is None or flight.status != 'scheduled':raise BizError('FLIGHT_UNAVAILABLE')# 3. Validate the seat is legal and belongs to this flightif not 1 <= seat_no <= flight.total_seats:raise BizError('INVALID_SEAT')# 4. Seat already taken (belt-and-suspenders: unique constraint + explicit query)if repo.seat_taken(flight_id, seat_no):raise BizError('SEAT_TAKEN')# 5. Create the booking and passengers; booking status is confirmed directlybooking = repo.create_booking(flight_id=flight_id, seat_no=seat_no,passengers=passengers, contact_email=contact_email,idempotency_key=idempotency_key,)# 6. Conditional inventory update; 0 affected rows means full or changedaffected = repo.increment_occupied(flight_id, expected_version=flight.version)if affected == 0:raise BizError('FLIGHT_FULL')return booking
The corresponding deduction statement:
UPDATE flightsSET occupied_seats = occupied_seats + 1,version = version + 1WHERE id = :flight_idAND version = :expected_versionAND status = 'scheduled'AND occupied_seats < total_seats;
Logically, once the row lock is acquired successfully, a failed conditional update can only come from a status change or a concurrency conflict, and both should be returned as business errors.
| Defect | Consequence |
|---|---|
| Query then modify, with no transaction or lock | Overselling under high concurrency, even exceeding the 6-seat limit |
| Inventory and order not in the same transaction | Inventory deducted but no order, or order succeeds but inventory not incremented |
| Front end validates, server does not | Calling the API directly bypasses the UI to place an unauthorized order |
Beyond the code, two more scenarios need dedicated handling:
- Cancellation and timeouts: when cancelling an order, inventory must be released and seat status updated in sync.
- Hold timeouts: if the flow introduces payment, set a hold timeout (for example, 15 minutes); if unpaid after that, cancel automatically and release inventory.
3. Idempotency: Two Double-Clicks Must Not Produce Two Tickets
Network jitter, repeated user clicks, and automatic client retries can all cause the same request to be submitted multiple times. The standard approach to idempotency is:
- The client generates a unique request number for each “booking intent”;
- The server stores that number as a unique key;
- On a repeated request, it directly returns the result of the first processing.
// generate one key per submit button; reuse it across retriesconst submitBtn = document.querySelector('#submit-booking');let pendingKey = null;submitBtn.addEventListener('click', async () => {if (submitBtn.disabled) return;pendingKey = pendingKey ?? crypto.randomUUID(); // requires HTTPSsubmitBtn.disabled = true;try {const resp = await fetch('/api/bookings', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({flightId: selectedFlightId,seatNo: selectedSeatNo,passengers,idempotencyKey: pendingKey,}),});if (!resp.ok) throw new Error('Booking failed');renderConfirmation(await resp.json());pendingKey = null; // reset after success so the next booking uses a new key} catch (err) {showError('Submission did not succeed, please try again later'); // keep pendingKey so the retry reuses it} finally {submitBtn.disabled = false;}});
The server needs a fallback too: when the same request number arrives concurrently, the database unique constraint ensures only one record is written; for a request still being processed, it can return “processing,” and the client can query the result later.
4. Security and Privacy: Protecting Passenger Information
This scenario involves sensitive personal data—names, dates of birth, ID document numbers, contact details—and must follow the principle of data minimization:
- Collect only the necessary fields;
- Encrypt the entire transport layer, and avoid passing sensitive information as plaintext URL parameters;
- Encrypt or mask sensitive fields at rest; when displaying an ID number, keep only the last few digits;
- Enable cross-site request protection on the submit API, and validate origin and frequency;
- Strictly authenticate the admin side, and forbid bulk data export without authorization;
- Render user input with officially maintained template components, so output escaping is handled by the framework and XSS is avoided.
To actually launch this in a real business, you should also complete a compliance review against the data-protection regulations of the region you operate in.
Part 4: The Acceptance Layer—Letting the Agent “Verify Itself”
An agent generates code far faster than a human can review it, and the parts most likely to break are exactly the ones no one looks at closely. A workable method is to write the acceptance criteria into the prompt and require the agent to write automated tests for every API, covering the following scenarios.
Boundary values:
- The 6th seat can be booked successfully; a 7th request should be rejected;
- A fully booked flight cannot be booked anymore;
- An out-of-range seat number (0 or 7) is rejected.
Concurrency scenario: 6 seats contested by 20 concurrent requests, with exactly 6 successful orders in the end.
Idempotency scenario: submitting the same request number 3 times produces only 1 order.
State scenario: a cancelled order cannot be operated on; a flight that does not depart from the relevant city cannot be booked.
An example concurrency test:
import asyncioasync def test_no_oversell():flight = await create_flight(total_seats=6)# 20 concurrent requests compete for 6 seats, each with its own idempotency keyresults = await asyncio.gather(*[post_json('/api/bookings', {'flightId': flight.id,'seatNo': 1,'passengers': [passenger_payload()],'idempotencyKey': f'load-test-{i}',}, expect_any_status=True)for i in range(20)])success = [r for r in results if r.status == 200]assert len(success) == 6, f'expected 6 successful orders, got {len(success)}'assert all(r.status in (200, 409) for r in results)assert await count_active_bookings(flight.id) == 6
On top of this, you can add end-to-end tests covering the full flow—“choose flight → choose seat → enter passenger information → confirm → receive booking confirmation”—and include error paths: backend timeout, insufficient inventory, and retry after a network interruption.
It is worth emphasizing that the tests an agent writes also need human review. In particular, watch out for tests that “pander to the implementation,” such as:
- asserting only the status code without checking the business result;
- catching all exceptions so the test “always passes”;
- relying on randomness without fixing the seed, causing unstable results.
Part 5: The Delivery Layer—Static Assets, Service Deployment, and Production Operations
As the system moves to launch, the recommended architecture separates the front end and back end:
- Static assets: serve website pages, images, videos, and so on from object storage, accelerated with a content delivery network (CDN).
- Server side: deploy in a containerized way on a container platform, with load balancing and autoscaling.
- Data layer: use a managed relational database with automatic backups and multi-availability-zone deployment.
- Cache: cache popular flights and seat maps in an in-memory database to reduce database load.
- Observability: connect logging services and a monitoring/alerting system.
| Area | Core metrics or means | Goal or purpose |
|---|---|---|
| Front-end performance | Largest Contentful Paint (LCP), Interaction to Next Paint (INP), Cumulative Layout Shift (CLS) | Fast first paint, no janky interactions |
| Resource optimization | Short video loops + multiple bitrates, image lazy loading and responsive sizes, font subsetting | Lower bandwidth and rendering overhead |
| Accessibility | Semantic tags, full keyboard operability, visible focus styles, contrast of at least 4.5:1 | Smooth use for users with disabilities |
| Security | API rate limiting, brute-force protection, anti-bot seat-grabbing, input validation | Prevent malicious seat-hogging and data leaks |
| Production monitoring | Order success rate, inventory conflict rate, API P99 latency, error rate | Detect and handle anomalies early |
| Common failure | Root cause | Response |
|---|---|---|
| Blank page after launch | Front-end build artifacts not reloaded per route | Add front-end error monitoring to catch it early |
| Intermittent order failures | Inventory row-lock contention, transaction wait timeout | Shorten transactions; show a friendly retry prompt on conflict |
| Hot-flight slowdown | Cache and database under sudden excessive load | Hot-data caching + rate limiting/degradation |
In practice, developers can build and operate a comparable system using the general cloud capabilities that major providers offer—object storage, container platforms, managed databases, and logging and monitoring services (Baidu AI Cloud is one such provider).
Conclusion: Agents Amplify Implementation Ability—and Design Flaws
Back to the opening question: what can an agent actually build? This article’s case gives a fairly complete answer:
- Starting from a single product idea, it can produce a systematic visual design and an interactive front end;
- It can also translate business rules into tables, transactions, and APIs, forming a closed loop that genuinely runs end to end.
But the case also shows that delivery quality depends on how people define the problem:
- Turn vague adjectives into quantifiable specs;
- Upgrade “looks like it runs” to “survives concurrency and retries”;
- Back up cool animations with fallback plans.
For development teams, the more rational division of labor is:
- People define the goals, constraints, and acceptance criteria;
- The agent handles implementation, testing, and refactoring;
- People review architectural trade-offs, security boundaries, and business correctness.
As the cost of implementation drops quickly, the truly scarce skill shifts from “being able to write code” to “knowing what to write and how to verify it is correct.”
