Vibe Coding a Website: A Developer’s Checklist for Security, Performance, Accessibility, and SEO
AI can build a convincing website quickly, but production readiness requires more than a polished interface. Learn the engineering checks that make vibe-coded websites safer, faster, more accessible, and easier to maintain.
// TABLE OF CONTENTS+
Why a Website That Looks Finished May Not Be Production-Ready
Vibe coding uses natural-language instructions and AI coding tools to generate, modify, and debug software. Instead of manually writing every component, a developer describes the desired behavior, reviews the generated implementation, and iterates until the application meets its requirements. This approach can accelerate website development, particularly for prototypes, portfolios, dashboards, and small web applications. However, generating a working interface is only one part of building reliable software.
A website can look polished while containing exposed API credentials, ineffective access controls, inaccessible forms, unnecessary JavaScript, broken metadata, and untested error handling. AI-generated code can also introduce duplicate logic, excessive dependencies, or architectural decisions that become difficult to maintain. These problems may remain invisible during a demonstration because a successful screenshot does not prove that the application behaves correctly under real conditions.
The solution is not to abandon AI-assisted development. It is to establish a repeatable engineering process around it. Use AI to accelerate implementation, but independently review security-sensitive behavior, measure performance, test important workflows, and verify production configuration. The central principle is simple: generated code is a proposal, not proof of correctness. A feature is ready when its behavior and limitations have been verified to a level appropriate for its risk.
1. Follow a Disciplined Vibe-Coding Workflow
Begin with requirements rather than immediately requesting an entire website. Define the intended users, essential pages, primary user journeys, data requirements, permissions, and constraints. For example, a developer portfolio might need project listings, technical articles, a contact form, responsive navigation, and search metadata. A dashboard with user accounts and private records needs additional decisions about authentication, authorization, data storage, and account recovery before implementation begins.
- Define the website's purpose and acceptance criteria.
- Plan the page structure, design system, and application architecture.
- Implement one feature or cohesive group of changes at a time.
- Review the generated code and inspect the changed files.
- Run appropriate tests and verify failure scenarios.
- Audit performance, accessibility, security, and privacy.
- Deploy using controlled production configuration.
- Monitor the live website and maintain its dependencies.
Small implementation steps make problems easier to isolate. If an AI tool simultaneously rewrites routing, authentication, database queries, and the visual design, a regression may be difficult to trace. Ask it to complete one coherent task, inspect the diff, run relevant checks, and explain important decisions before moving to the next task. Use version control so changes can be reviewed and reverted. Avoid accepting large, unrelated rewrites simply because the new interface looks better.
2. Security: Verify What the Website Actually Protects
Security should influence architecture from the beginning rather than being postponed until launch. The OWASP Top 10:2025 identifies major web application risk categories, including broken access control, security misconfiguration, software supply-chain failures, cryptographic failures, injection, insecure design, and authentication failures. It is an awareness resource, not a complete security audit, but it provides a useful starting point for reviewing AI-generated applications. Read the OWASP Top 10 guidance.
Protect Secrets and Validate Inputs
Anything delivered to a browser should be treated as visible to the user. Private database credentials, signing secrets, privileged API tokens, and service-role keys must not be embedded in frontend bundles. Keep private credentials in server-side environment configuration or an appropriate secrets manager, and restrict public-facing keys according to their provider's security model. Environment variable naming alone does not provide protection: a variable becomes exposed if the build process places its value into public client code.
Treat all external input as untrusted, including requests from authenticated users. Validate request bodies, query parameters, uploaded files, and third-party API responses. Enforce expected types, allowed values, length limits, and business rules on the server. Use parameterized database queries instead of constructing SQL statements by concatenating user-controlled strings. Render user-generated content safely and use context-appropriate output encoding. Client-side validation improves usability, but an attacker can bypass it by sending requests directly to an endpoint.
Enforce Authentication and Authorization
Authentication answers the question, “Who is this user?” Authorization answers, “What is this user allowed to do?” A valid login does not automatically grant permission to read every database record or perform administrative operations. Every protected server operation must verify the authenticated user's permissions. Hiding an admin button, disabling a form field, or protecting a page only in frontend code does not secure the underlying API or database.
Consider a website where users can view their orders. If one user changes an order identifier in a request, the server must check whether that user is allowed to access the requested order. This is an example of an object-level authorization problem. Test both permitted and denied access, including attempts to access another user's data. If the application uses PostgreSQL or a managed backend, review database roles, table permissions, and row-level security policies where applicable. Never assume that a frontend filter protects stored records.
| Assumption | Correct engineering approach |
|---|---|
| Hiding an admin button protects administration | Enforce administrative authorization on the server. |
| TypeScript guarantees valid request data | Validate untrusted inputs at runtime. |
| A secret-named environment variable is private | Verify that the build and deployment never expose it. |
| A login page protects every API route | Check permissions on every protected operation. |
| A successful database connection proves safe access | Review privileges, isolation, and data-access policies. |
| A passing automated scan proves complete security | Combine automated checks with targeted manual review and testing. |
Sessions, Errors, Dependencies, and Abuse Controls
For account-based applications, review password handling, session expiration, logout behavior, account recovery, and rate limits. Prefer established authentication systems instead of inventing a protocol. Cookies used for sessions should have appropriate Secure, HttpOnly, and SameSite settings. Error messages should help users recover without exposing stack traces, database details, tokens, or internal paths. Logs should support debugging and security monitoring without collecting unnecessary personal information or credentials.
AI tools can introduce unnecessary or vulnerable dependencies. Review package manifests and lockfiles, remove packages that are not needed, and use dependency and secret scanning where available. Check production CORS rules, security headers, HTTPS configuration, upload limits, request timeouts, and database privileges. Apply rate limits to operations vulnerable to abuse or excessive resource consumption. For applications handling important data, create backups and test restoration. A security review should identify concrete risks and their mitigations rather than merely asking the AI whether the application is secure.
3. Code Readability and Maintainability
Readable code is code another developer can understand, debug, test, and safely modify. AI-generated projects sometimes accumulate giant components, repeated business logic, unexplained type assertions, and abstractions that solve no real problem. The goal is not to maximize the number of files or force every application into the same architecture. It is to make responsibilities clear and keep related behavior understandable.
A medium-sized Next.js application might separate routes, reusable components, validation, database access, and business logic into recognizable modules. Pages connect URLs to user experiences; components render interface elements; services coordinate application operations; validation modules check incoming data; and database modules manage persistence. This is an example, not a universal folder structure. A static portfolio may need far less organization than a multi-user application with complex business rules.
src/
app/
page.tsx
projects/
page.tsx
api/
projects/
route.ts
components/
layout/
navigation/
projects/
ui/
lib/
auth/
database/
validation/
services/
projects.ts
types/
project.tsNaming is another practical part of readability. A function called processData gives little indication of its purpose, while publishProjectDraft communicates an intention. Focused functions should have understandable inputs, outputs, and side effects. Avoid components that simultaneously handle navigation, authentication, database operations, analytics, and unrelated modal dialogs. Extract responsibilities when doing so makes the code easier to reason about, but do not introduce elaborate abstraction layers for trivial functionality.
Static types do not validate external data at runtime. A request may be labelled as a Project in TypeScript while containing missing fields or malicious values. Validate network input before trusting it. Avoid excessive any, unexplained type assertions, and assumptions that third-party API responses always match their declared types. After each significant AI-generated change, inspect the files changed, understand the assumptions, review error handling, and run the appropriate tests. If you cannot explain a security-sensitive implementation, it is not ready for uncritical deployment.
4. Performance: Measure Before Optimizing
A polished interface is not necessarily a fast one. AI-generated websites can ship oversized images, large JavaScript bundles, unnecessary client-side rendering, repeated API requests, and expensive database queries. Performance optimization should begin with measurement, not guesswork. Use browser developer tools, production telemetry, and Lighthouse to establish a baseline. Identify which resources and operations are responsible for slow loading or interactions, then prioritize changes that address measured problems.
Optimize Images, JavaScript, and Rendering
Serve appropriately sized images and use modern formats when supported. Provide responsive image variants and reserve layout space using image dimensions or aspect ratios. Images below the initial viewport can often load lazily, but the main image or content responsible for the initial visual experience should not be delayed unnecessarily. Use server rendering or static rendering when appropriate, and introduce client-side JavaScript only when interaction requires it. A small interactive component does not automatically justify making an entire page client-rendered.
Review bundle size, duplicate libraries, unnecessary state updates, and sequential network requests. Split large features when it reduces the amount of code needed for initial loading. Avoid adding memoization everywhere: caching calculations and stabilizing function references can help in particular situations, but they are not automatic performance improvements. Measure first and compare results afterward. Excessive optimization can make code more complicated without delivering a meaningful benefit.
Optimize APIs and Databases
Slow database queries can dominate response times even when the frontend is lightweight. Inspect query plans where appropriate, identify missing or unsuitable indexes, avoid retrieving fields the page never uses, and look for N+1 query patterns. Paginate large collections and set suitable connection-pool limits. Avoid repeated requests for identical data when a safe caching strategy is available. Caching must respect user permissions: accidentally serving one user's private response to another is a security defect, not a successful optimization.
| Metric | What it measures | Good target |
|---|---|---|
| Largest Contentful Paint (LCP) | Loading performance of the main visible content | 2.5 seconds or less |
| Interaction to Next Paint (INP) | Responsiveness to user interactions | 200 milliseconds or less |
| Cumulative Layout Shift (CLS) | Unexpected visual movement | 0.1 or less |
Google's Core Web Vitals use these thresholds to describe a good user experience, evaluated at the 75th percentile of page visits and segmented by device type. They are useful targets rather than guarantees that every user will experience the same speed. A laboratory score can help diagnose a page, but field measurements are needed to understand real-world conditions. See the official Core Web Vitals documentation for measurement guidance. Google for Developers +1
5. Design Consistency and Accessibility
AI tools can produce an attractive first draft, but they may create inconsistent spacing, typography, buttons, and page layouts as new features are added. Establish a design system with reusable color tokens, typography scales, spacing conventions, content widths, and component states. Define styles for hover, focus, disabled, loading, success, and error states. Reuse established components rather than allowing each page to invent a new visual language.
Good design also includes the states that are less visually exciting. A form needs understandable validation messages; a list needs an empty state; an API-driven page needs loading and error behavior; and an unavailable resource needs a useful recovery path. Buttons must perform the actions they advertise. Decorative gradients, animations, and oversized hero sections should not make essential content harder to find. A restrained design with clear hierarchy often works better than a collection of unrelated effects.
Accessibility must be considered during implementation rather than added as a final cosmetic pass. The W3C recommends using the current WCAG guidance, including WCAG 2.2, to improve accessibility across a wide range of needs. A practical target for many websites is WCAG 2.2 Level AA, although the applicable legal and contractual requirements depend on the project. Read the WCAG 2.2 specification. W3C
- Use semantic HTML and a logical heading hierarchy.
- Make interactive controls usable with a keyboard.
- Provide visible keyboard focus and accessible names.
- Associate form fields with labels and explain validation errors.
- Use sufficient text and interface contrast.
- Give meaningful images appropriate alternative text.
- Support browser zoom and responsive layouts.
- Consider reduced-motion preferences.
- Test menus, dialogs, and dynamic updates with assistive technologies where possible.
Automated accessibility scanners are valuable for finding common issues, but a passing scan does not prove that an entire website is accessible. Manually test the primary journeys using only a keyboard. Confirm that focus remains visible and is not trapped unexpectedly. Check that errors are understandable and that users can identify which fields need attention. When practical, use a screen reader to evaluate important workflows. Accessibility is part of usability and should influence component design, content structure, and interaction behavior.
6. Privacy Policies and Legal Pages
Privacy is one of the easiest parts of a website to overlook during vibe coding. A developer may add analytics, contact forms, authentication, embedded media, or third-party APIs without documenting the resulting data flows. A privacy policy should describe what the website actually does, not what a generic template assumes it does. Identify the information collected, the reasons for collection, the services that process it, retention practices, and the rights or choices applicable to users.
A website may process personal information through more places than its main database. Hosting providers can maintain request logs; analytics tools may record events; contact forms may send submissions to email services; and embedded content can introduce third-party processing. Review the complete flow before making claims such as “we collect no personal data” or “we never share information.” Those statements can be misleading if they ignore service providers or infrastructure behavior.
- A privacy review should consider:
- The identity and contact information of the responsible operator, where applicable.
- The categories of information collected and why they are needed.
- Relevant legal bases or other requirements that apply to the service.
- Cookies, analytics, embedded media, and third-party processors.
- Data retention, deletion, and security practices.
- Applicable user rights and how to exercise them.
- Relevant international transfers and jurisdiction-specific disclosures.
Terms of service may be appropriate for websites with accounts, paid features, subscriptions, user-generated content, or other ongoing services. Depending on the business and jurisdiction, terms may cover permitted use, account responsibilities, payment and cancellation, intellectual property, service limitations, and dispute handling. A personal portfolio may not need an elaborate terms document. Choose legal pages according to the service and applicable obligations, not simply to make the footer look complete.
Cookie banners also require careful judgment. A banner alone does not make tracking compliant, and not every website has identical consent obligations. Inventory analytics, advertising scripts, session recording, and embedded services first. Then implement the consent or control mechanisms required by the applicable rules. Where prior consent is required, ensure non-essential tracking does not run before consent is provided. Make it possible to change preferences where applicable.
Contact forms and account features need practical data-handling rules. Collect only necessary fields, explain how submissions are used, validate requests on the server, restrict access, and prevent sensitive information from leaking into logs or analytics. Define appropriate retention and deletion practices. If the website stores accounts or personal information, determine how applicable requests for access, correction, deletion, or other user rights will be handled. Do not publish legal promises that the implementation cannot support.
7. SEO, Sitemap, robots.txt, and Discoverability
A website can work correctly when opened manually but remain difficult for search engines to discover. Search engine optimization requires useful content, sensible navigation, descriptive metadata, and correct technical configuration. A sitemap helps search engines discover URLs, while robots.txt provides instructions about crawling. Neither mechanism guarantees indexing. They serve different purposes and should not be treated as substitutes for one another.
Build and Verify the Sitemap
An XML sitemap should list canonical URLs that you want search engines to discover. It should not be filled with private pages, irrelevant duplicates, staging URLs, or links to a development domain. For a content-heavy website, generate the sitemap from the actual published content so it remains consistent as articles and projects change. Check that the file is accessible at its intended production URL and submit it to the relevant search tools when appropriate.
Configure robots.txt and Page Metadata
The robots.txt file should be served from the root of the intended domain and reviewed for accidental restrictions on important pages or assets. It is not a security boundary and should never be used to hide confidential information. Blocking crawling also does not reliably remove a URL from search results. Use appropriate indexing directives and access controls for their respective purposes, and test the live configuration rather than assuming that a generated file is correct.
Important pages should have descriptive titles, useful meta descriptions, sensible canonical URLs, and appropriate indexing directives. Social-preview metadata can improve how links appear when shared. Use meaningful headings, human-readable URLs, and internal links that help readers navigate related content. Structured data is useful only when it accurately represents the visible page and follows the relevant guidelines. Valid structured data does not guarantee enhanced search results or better rankings.
After launch, configure Google Search Console where appropriate, verify the property, inspect representative URLs, and monitor indexing problems. Fix broken internal links and remove outdated metadata. For a developer portfolio, clear project case studies and technically useful articles are more valuable than adding every possible schema type. Search visibility depends on many factors, so avoid promises of rankings, traffic growth, or AI citations based solely on adding metadata.
8. Testing, Deployment, and Monitoring
A successful build proves only that the code passed certain build-time checks. It does not prove that user journeys work, that access controls are correct, or that the application behaves safely when a dependency fails. Test the website as a user would, then deliberately test conditions that are likely to break it. This is especially important for authentication, forms, payments, database operations, and any feature that modifies important records.
- Test what happens when:
- The API returns an error or times out.
- The database becomes unavailable.
- A user submits malformed or unexpectedly large input.
- A user submits the same form twice.
- An authenticated session expires.
- A user requests a record they are not authorized to access.
- An image or third-party service fails.
- The network disconnects or reconnects.
- A record has been deleted or no longer exists.
Use automated tests appropriate to the application. Unit tests check focused logic; integration tests verify interactions between services and data stores; end-to-end tests exercise real workflows. Type checking and linting catch additional classes of mistakes, while dependency and secret scans help identify certain security risks. Accessibility scanners and performance tools provide further evidence. No single tool verifies everything, so combine automated checks with targeted manual testing.
Production deployment requires separate attention. Configure environment variables correctly, protect credentials, use HTTPS, verify database permissions, and apply migrations through a controlled process. Ensure data persists across restarts and backups can be restored. Review caching rules for private responses, configure safe error monitoring, and establish a rollback plan. After deployment, test the actual production domain, browser console, network requests, forms, and critical routes. A local success does not prove that production configuration is correct.
Maintenance continues after launch. Monitor server errors, failed API calls, resource consumption, and meaningful user-facing failures. Update dependencies through a controlled process, review new security advisories, and periodically test recovery procedures. If a release breaks a critical workflow, the team should know how to roll it back. For small projects, the process can remain lightweight; what matters is having a realistic method for detecting and responding to failures.
9. Give AI Persistent Engineering Rules
A vague instruction such as “build a beautiful production-ready website” leaves too many important decisions unspecified. Provide reusable engineering rules in the project's instruction file or initial planning prompt. Tell the AI to inspect the existing architecture, preserve working behavior, make small changes, validate external data, enforce server-side authorization, and report the tests it actually ran. This reduces ambiguity, although it does not guarantee that the generated code follows every rule correctly.
Act as a senior software engineer reviewing an AI-assisted
website project.
Before implementing:
- Inspect the existing structure and conventions.
- Identify requirements, data flows, permissions, and risks.
- Propose a concise plan for significant changes.
Code quality:
- Prefer readable, focused components and functions.
- Reuse existing patterns and justified dependencies.
- Separate presentation, validation, data access, and
business logic where appropriate.
- Avoid giant components, duplicated logic, and needless
abstractions.
- Validate external data at runtime.
Security and privacy:
- Never expose private credentials in browser code.
- Enforce authorization on protected server operations.
- Validate untrusted input on the server.
- Use safe database access and output encoding.
- Protect sessions and restrict data access.
- Avoid logging secrets or unnecessary personal data.
- Do not claim compliance without evidence.
Performance and accessibility:
- Measure before optimizing.
- Avoid unnecessary JavaScript and repeated requests.
- Optimize images and review slow database queries.
- Use semantic HTML, labels, visible focus, and keyboard
accessible interactions.
- Handle loading, empty, success, and error states.
SEO and deployment:
- Review titles, descriptions, canonical URLs, sitemap,
robots.txt, and indexing directives where applicable.
- Verify production environment variables, HTTPS, database
permissions, backups, and error reporting.
Verification:
- Run the relevant available tests, lint checks, and type
checks.
- Report the actual commands executed and their results.
- Identify untested cases and remaining limitations.
- Summarize changed files and review the final diff.
- Never claim a feature is secure or production-ready
solely because it compiles or looks correct.
Make changes in small, reviewable increments.
Do not silently replace working functionality with
placeholders or perform destructive operations without
the required approval.The prompt should be adapted to the actual project rather than treated as a universal specification. A static portfolio does not need the same authentication controls as a financial application. A content site may need a publishing workflow and sitemap generation, while a dashboard may require stricter authorization and data isolation. Persistent instructions establish expectations, but the developer must still inspect implementation details and test whether those expectations were met.
10. The Final Website Launch Checklist
Before launch, organize the review by risk. Security and data integrity come first because failures can expose information or permit unauthorized actions. Core functionality comes next, followed by reliability, accessibility, performance, discoverability, and privacy documentation. Some checks belong earlier in development: authorization design, data minimization, and accessibility should not be postponed until the final review. The checklist is a final verification step, not a reason to defer fundamental engineering decisions.
- Security and data integrity
- Private credentials are not exposed in browser bundles or source control.
- Server-side authorization has been tested for permitted and denied operations.
- Inputs are validated and database access uses safe patterns.
- Authentication and session behavior have been reviewed where applicable.
- Production errors and logs do not reveal sensitive information.
- Dependencies and production configuration have been reviewed.
- Functionality and reliability
- Buttons, forms, navigation, and important links work.
- Loading, empty, success, and error states are handled.
- Main user journeys and failure cases have been tested.
- Mobile and desktop layouts work as intended.
- Backups and recovery procedures exist where needed.
- Monitoring and rollback procedures are defined.
- Accessibility and performance
- Keyboard navigation and focus visibility have been checked.
- Forms have labels and understandable validation messages.
- Contrast, zoom, and responsive behavior have been reviewed.
- Images are appropriately sized and important content is not delayed unnecessarily.
- Performance has been measured using suitable tools.
- Privacy and SEO
- Data collection and third-party services have been inventoried.
- Privacy disclosures match actual practices.
- Applicable consent controls have been assessed.
- Sitemap, robots.txt, canonical URLs, and indexing directives have been verified where appropriate.
- Page titles, descriptions, and social metadata are correct.
- Legal content and asset licenses have been reviewed.
Conclusion: Use AI to Build Faster, Not to Skip Engineering
Vibe coding reduces the effort required to generate and modify code, but it does not remove the need to understand, test, and maintain that code. A professional website must do more than render an attractive interface. It should protect user data, enforce permissions, remain understandable as it evolves, perform well under realistic conditions, support accessible interactions, and communicate honestly about its practices.
The strongest workflow combines AI's speed with engineering discipline. Define requirements before implementation, work in small changes, review generated code, measure performance, test failure scenarios, and verify production configuration. Treat privacy, accessibility, SEO, and recovery as real parts of the product rather than optional polish. Most importantly, distinguish what the AI generated from what you actually verified.
The goal is not to produce the largest application in the fewest prompts. It is to build a website you can explain, maintain, and trust at a level appropriate to its purpose. Use AI to accelerate the work, but let evidence—not confidence, screenshots, or a successful build—determine whether the result is ready to ship.
OPEN
Thoughts on the article.