Checklists

Remix implementation checklist

This checklist provides a technical framework for preparing a Remix application for production, focusing on server-side reliability, data integrity, and progressive enhancement patterns.

Progress0 / 30 complete (0%)

Data Fetching and Loading

0/5
  • Implement Route-Level ErrorBoundaries

    critical

    Ensure every route with a loader or action exports an ErrorBoundary to prevent server-side crashes from bubbling up to the root and breaking the entire application.

  • Optimize Non-Critical Data with Defer

    recommended

    Identify slow third-party API calls or heavy database queries and move them to a deferred promise using the Remix 'defer' utility to improve Time to First Byte (TTFB).

  • Set Cache-Control Headers in Loaders

    recommended

    Explicitly define Cache-Control headers in loader responses for static or slow-changing data to leverage CDN and browser caching.

  • Validate Loader Params

    critical

    Check that all dynamic route parameters (e.g., params.id) are validated using a schema library like Zod before passing them to database queries.

  • Handle 404 Responses in Loaders

    critical

    Throw a 404 Response object within loaders when a resource is not found to trigger the nearest ErrorBoundary with isRouteErrorResponse.

Form Mutations and Actions

0/5
  • Server-Side Input Validation

    critical

    Implement Zod or Valibot schemas within action functions to validate all incoming FormData before processing mutations.

  • Implement CSRF Protection

    critical

    Verify that all non-GET requests are protected against CSRF using remix-utils or custom header verification if not using the built-in authenticity token patterns.

  • Add Pending UI States

    recommended

    Use useNavigation to implement 'submitting' or 'loading' states on buttons and forms to provide immediate feedback during mutations.

  • Implement Optimistic UI

    recommended

    Use useFetcher or useNavigation.formData to optimistically update the UI for high-frequency actions like toggling checkboxes or deleting items.

  • Prevent Double Submissions

    recommended

    Disable submit buttons or implement server-side idempotency keys to prevent duplicate data entry on slow network connections.

Security and Session Management

0/5
  • Secure Cookie Configuration

    critical

    Verify that session cookies are configured with 'httpOnly: true', 'secure: true', and 'sameSite: "lax"' (or "strict") in the createCookieSessionStorage settings.

  • Rotate Session Secrets

    critical

    Ensure the SESSION_SECRET environment variable is long, random, and not committed to version control.

  • Validate Environment Variables at Startup

    critical

    Add a validation script in entry.server.tsx or a separate init file to throw an error if required production environment variables are missing.

  • Sanitize Redirect URLs

    critical

    Ensure that 'redirectTo' parameters in login or multi-step forms are validated against a whitelist to prevent Open Redirect vulnerabilities.

  • Content Security Policy (CSP) Headers

    recommended

    Implement a CSP header in the entry.server.tsx 'handleRequest' function to restrict script execution and style sources.

Performance and Assets

0/5
  • Configure Asset Fingerprinting

    recommended

    Verify that the Remix build process is correctly appending hashes to assets and that the server is serving them with long-lived 'immutable' cache headers.

  • Preload Critical Assets

    optional

    Utilize the 'links' function to preload critical fonts or hero images for specific routes to improve Largest Contentful Paint (LCP).

  • Bundle Analysis

    recommended

    Run a bundle analyzer (e.g., esbuild-visualizer) to identify and remove large dependencies that are inadvertently included in the client-side bundle.

  • Image Optimization Strategy

    recommended

    Ensure images are served in modern formats (WebP/AVIF) and use the 'srcset' attribute for responsive sizing.

  • Enable Gzip/Brotli Compression

    critical

    Confirm that the hosting provider or the Express/Node server adapter has compression enabled for text-based assets and HTML responses.

Deployment and Infrastructure

0/5
  • Production Build Verification

    critical

    Verify that 'remix build' is executed with NODE_ENV set to 'production' to ensure React development checks are disabled.

  • Health Check Endpoint

    recommended

    Create a resource route at /healthcheck that verifies database and cache connectivity for automated load balancer health checks.

  • Database Connection Pooling

    critical

    If deploying to a serverless environment (e.g., Cloudflare Workers or AWS Lambda), implement a connection pooler like Prisma Accelerate or PgBouncer.

  • Logger Integration

    recommended

    Replace console.log with a structured logging library (e.g., Pino or Winston) in loaders and actions for better observability in production logs.

  • Sentry or Error Tracking Setup

    recommended

    Integrate Sentry or a similar service within entry.client.tsx and entry.server.tsx to capture runtime exceptions and sourcemaps.

SEO and Metadata

0/5
  • Dynamic Meta Tags

    recommended

    Implement the 'meta' function for every public route to ensure unique titles, descriptions, and Open Graph tags based on loader data.

  • Canonical URL Implementation

    optional

    Ensure every page includes a canonical link tag to prevent duplicate content issues, especially when using query parameters for filtering.

  • Sitemap Generation

    recommended

    Configure an automated sitemap generation script or resource route that dynamically lists all public-facing URLs.

  • Robots.txt Configuration

    recommended

    Add a robots.txt file to the public directory or as a resource route to control crawler access to sensitive paths like /admin or /api.

  • Structured Data (JSON-LD)

    optional

    Inject JSON-LD structured data into the head for product, article, or organization pages to improve search engine rich snippets.