Practices for Recreating an AI Chat Web App with Multi-Model Collaboration

    This article explains how to recreate a public AI chat webpage as a software-engineering task: product analysis, interaction fidelity, implementation, APIs, error handling, and iteration. It covers feature breakdowns, UI metrics, how coding agents work together, second-round prompts, a five-dimension acceptance checklist, and moving from a clone to a redesigned product.

    Recreating a mature AI chat webpage is not rewriting a few screens or wiring an input box, buttons, and a message list. Useful recreation spans product analysis, interaction fidelity, engineering, API integration, exception handling, and later optimization.

    Using a public chat site as the reference, this article discusses completing a recreation with multiple large models and coding agents, then building a redesigned, enhanced version. The focus is not brand comparison, but how different models approach complex software work, acceptance, and engineering reliability.

    1. Real difficulties of the recreation task

    A full chat webpage typically includes:

    1. Registration, login, and session persistence
    2. New chats, chat lists, and history
    3. Multi-turn sending and streaming replies
    4. Copy, regenerate, edit, and delete messages
    5. File upload, parsing, or attachment display
    6. Switching models or capabilities
    7. Share links, feedback, and help
    8. Interrupt, network errors, and retries
    9. Desktop and mobile layouts
    10. Dark mode, shortcuts, and accessibility

    These pieces interact. The message list must handle streaming, Markdown, code-block copy, collapsing long content, and scroll position. The chat list must stay consistent with the current chat, title generation, deletion, and restore after refresh.

    The first step is therefore not writing code, but decomposing the page into verifiable product capabilities.

    2. Write a product feature document first

    Before implementation, produce a product report covering at least a feature list, page structure, interaction flows, and acceptance criteria.

    Feature layers

    Layer as foundational — core flows — enhancements.

    Foundational

    • Page shell and routing
    • User state
    • Chat data structures
    • Message data structures
    • Request state
    • Errors and loading

    Core flows

    • Create a chat
    • Send a question
    • Receive a streaming answer
    • Render rich text
    • Follow-up questions
    • Switch history
    • Delete or rename chats

    Enhancements

    • File attachments
    • Message sharing
    • Answer ratings
    • Regeneration
    • Shortcuts
    • Personalization
    • Multi-device layout

    Page structure sketch

    1. AI chat webpage
    2. ├── User entry
    3. │ ├── Login state
    4. │ ├── Account
    5. │ └── Settings
    6. ├── Chat workspace
    7. │ ├── Top navigation
    8. │ ├── Message area
    9. │ │ ├── User messages
    10. │ │ ├── Assistant messages
    11. │ │ ├── Loading
    12. │ │ └── Action menu
    13. │ └── Input area
    14. │ ├── Text input
    15. │ ├── Attachments
    16. │ ├── Capability options
    17. │ └── Send and stop
    18. ├── History
    19. │ ├── Search
    20. │ ├── Grouping
    21. │ ├── Rename
    22. │ └── Delete
    23. └── Helpers
    24. ├── Share
    25. ├── Feedback
    26. ├── Shortcuts
    27. └── Theme

    The structure clarifies boundaries so developers can split work and testers can build checklists instead of judging only appearance.

    3. UI recreation is more than screenshots

    Visual fidelity usually has four kinds of metrics.

    Layout

    Overall width, sidebar ratio, max width of the message area, input placement, and mobile changes. After window resize, watch for horizontal scroll, crushed content, or overlapping buttons.

    Components

    Buttons, dropdowns, dialogs, bubbles, empty states, and loaders are reusable. Establish design tokens, for example:

    1. :root {
    2. --page-bg: #ffffff;
    3. --panel-bg: #f7f7f8;
    4. --text-main: #1f1f1f;
    5. --text-muted: #6b7280;
    6. --border-color: #e5e7eb;
    7. --radius-md: 10px;
    8. --content-width: 820px;
    9. }

    That speeds recreation and later theme changes.

    Interaction

    Whether the page “feels right” depends on details:

    • Input expands on focus
    • User message appears immediately after send
    • Stop appears while generating
    • Scroll stays reasonable
    • Clear feedback after copy
    • Confirm before deleting a chat

    These often matter more than color and type.

    Responsive

    Mobile is not a scaled-down desktop. Sidebars may become drawers; the input must clear the system keyboard; bottom chrome must respect safe areas; long messages must not overflow. Cover at least wide desktop, laptop, tablet, and phone.

    4. How models and coding agents collaborate

    In a unified test, several models and agents can receive the same brief and produce:

    1. A product document and structure diagram
    2. A recreation as close as possible to the reference
    3. An improved site based on their own judgment

    The same input reduces human variance. Record whether the agent can browse the reference, run code, inspect results, and iterate.

    Differences show up in strategy as well as code quality. Some generate a first version and stop once the page boots. Others keep checking edge flows—refresh, chat switching, failed APIs, mobile input—and fix issues.

    Code generation and engineering acceptance are different skills; for webpage recreation, the latter often matters more.

    5. Effect of a second-round prompt

    Work can run in two rounds. Round one states product goals, reference, scope, and deliverables. Round two supplies credentials or runtime conditions and asks the agent to keep validating.

    After round two, agents may:

    • Only check that the page opens
    • Check main buttons and request flows
    • Also check exceptions, visual gaps, and mobile

    The third path is closer to real development. “It runs” is not “it ships.” Early versions often have:

    • Input stuck after a failed request
    • Buttons not restored after streaming
    • Blank UI after deleting the last chat
    • Horizontal overflow from long code blocks
    • Input covered by the mobile keyboard
    • Share URLs that fail in a new environment

    Round two should require regression tests, exception checks, and fixes—not only “continue the task.”

    6. A reusable acceptance system

    Split acceptance into five dimensions.

    Functional: new chat, send, follow-ups, history switch, delete, stop, regenerate.

    Visual: structure, spacing, type hierarchy, color, icons, dialogs, layouts at different resolutions.

    Stability: timeouts, failures, empty responses, double clicks, refresh, network drop, and recovery.

    Data: chats saved, message order, state after refresh, deletes scoped to the target.

    Experience: first-use clarity, error copy, timely feedback, mobile input and reading.

    Record results in a table:

    Check Status Issue Priority
    New chat Pass None Low
    Streaming Needs fix Buttons wrong after interrupt High
    Mobile input Pass Input usable Low
    Share page Needs verify No state restore in new env Medium
    Error retry Pass Can resend Medium

    7. From recreation to product improvement

    A full clone tests understanding; it may not be the long-term product. Improvements can include:

    1. Stronger chat management: tags, search, favorites, auto-archive
    2. Better input: drafts, quick send, multi-line edit
    3. Clearer answers: outline, key points, collapse long content
    4. Error recovery: retry, continue generation, failure reasons
    5. Mobile: a touch-friendly bottom toolbar
    6. Accessibility: keyboard nav, visible focus, high contrast
    7. Data control: clear save, delete, and share scope

    Each extra feature should answer: what problem it solves, whether it adds UI complexity, and how it fails.

    8. Conclusion

    Multi-model recreation of an AI webpage is a small software-engineering exercise. Quality depends on requirement breakdown, observation, API design, automated checks, and multi-round fixes—not only code generation.

    What is worth keeping is a stable process, not a single prompt:

    1. Define the reference and delivery scope
    2. Write the product document
    3. Split pages and data structures
    4. Ship a runnable minimum
    5. Test function, visuals, and exceptions
    6. Keep fixing from tests
    7. Innovate only after a stable clone

    Enterprise teams can plug this into source control, automated tests, logging, and CI, and combine object storage, containers, logging, and monitoring—including general capabilities from Baidu AI Cloud—into a fuller intelligent-app pipeline. The goal is not a lookalike page, but a product that is stable, maintainable, extensible, and actually usable.