Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/gcsconsultores/gcs-website/llms.txt

Use this file to discover all available pages before exploring further.

The GCS website is a standard Next.js 15 application optimized for Vercel deployment. Vercel auto-detects the Next.js configuration, so no custom build settings are required. The Sally AI assistant uses Vercel’s AI Gateway for zero-config Google Gemini integration — no additional API credentials need to be configured beyond the optional CRM variables.

Prerequisites

  • A Vercel account (free tier is sufficient to start)
  • Push access to the GitHub repository containing the GCS website source
  • CRM API credentials (CRM_API_URL and CRM_API_KEY) if you want lead submissions to reach your CRM on day one — these are optional and can be added after the initial deploy

Deployment steps

1

Push code to GitHub

Ensure all changes are committed and pushed to the main branch (or whichever branch you want Vercel to deploy from). Vercel watches this branch and triggers a new deployment on every push.
git add .
git commit -m "chore: prepare for production deploy"
git push origin main
2

Import the project in Vercel

Go to vercel.com/new and click Import Git Repository. Authorize Vercel to access your GitHub account if prompted, then select the GCS website repository from the list.
3

Configure environment variables

Before clicking Deploy, expand the Environment Variables section in the Vercel import wizard and add your CRM credentials if connecting to a CRM at launch:
KeyValue
CRM_API_URLFull URL of your CRM’s create-contact endpoint
CRM_API_KEYBearer token or API key for the CRM
You can skip this step and add the variables later under Settings → Environment Variables. Until they are set, leads are logged to the server console.
4

Deploy

Click Deploy. Vercel auto-detects Next.js and runs next build using the configuration in next.config.mjs. The initial build typically completes in under two minutes. You will receive a *.vercel.app preview URL once it finishes.
5

Configure a custom domain (optional)

In the Vercel dashboard, go to your project’s Settings → Domains and add consultoresgcs.com (or your desired domain). Vercel provides the DNS records to add at your registrar. Propagation usually completes within minutes but can take up to 48 hours depending on your registrar’s TTL settings.

Build configuration

Scripts are defined in package.json and used by Vercel automatically:
ScriptCommandPurpose
buildnext buildProduction build — run by Vercel on every deployment
startnext startStarts the production server locally after a build
devnext devLocal development server with hot reload
linteslint .Static analysis — run in CI or pre-commit hooks

next.config.mjs

The project’s Next.js configuration is minimal by design:
/** @type {import('next').NextConfig} */
const nextConfig = {
  typescript: {
    ignoreBuildErrors: true,
  },
  images: {
    unoptimized: true,
  },
}

export default nextConfig
typescript.ignoreBuildErrors: true — Allows the production build to complete even if there are TypeScript type errors. This is appropriate for rapid iteration on v0-generated code; tighten this to false once the codebase is fully typed. images.unoptimized: true — Disables Next.js’s built-in image optimization pipeline. All images in public/ are served as-is. This avoids the need for a configured image loader and keeps the deployment self-contained, at the cost of automated format conversion (WebP/AVIF) and responsive resizing.

Analytics

@vercel/analytics is already installed (v1.6.1) and imported in app/layout.tsx. No additional configuration is needed — Vercel automatically activates the Analytics dashboard once the <Analytics /> component is present in the component tree. Custom business events are tracked through lib/analytics.ts, which provides a single trackEvent() function used by every component. Events are pushed to window.dataLayer for Google Tag Manager / GA4 forwarding, and logged to the console in development:
// lib/analytics.ts
type EventName =
  | 'cta_click'
  | 'lead_submitted'
  | 'lead_error'
  | 'sally_opened'
  | 'sally_message_sent'
  | 'center_opened'
  | 'insight_opened'

type EventPayload = Record<string, string | number | boolean | undefined>

export function trackEvent(name: EventName, payload: EventPayload = {}) {
  if (typeof window === 'undefined') return

  const event = { event: name, ...payload, ts: Date.now() }

  // 1. Data layer for GTM / GA4
  window.dataLayer = window.dataLayer || []
  window.dataLayer.push(event)

  // 2. Console output in development
  if (process.env.NODE_ENV !== 'production') {
    console.log('[v0][analytics]', name, payload)
  }
}
The Sally chat widget fires sally_opened when a visitor opens the chat panel and sally_message_sent on each user message. To connect these events to GA4 without code changes, create corresponding triggers in Google Tag Manager pointing at the window.dataLayer events.
Vercel’s AI Gateway handles Google Gemini authentication automatically — no GOOGLE_API_KEY or extra API key configuration is needed for Sally to work in production on Vercel.
The export const maxDuration = 30 in app/api/sally/route.ts sets the maximum serverless function execution time to 30 seconds. This is required for Vercel’s streaming response limits — the Sally route streams tokens back to the client, and without this setting the function would be cut off at Vercel’s default 10-second timeout.

Production checklist

Before announcing the site publicly, verify each item below:
  • CRM_API_URL and CRM_API_KEY set in Vercel Settings → Environment Variables
  • Custom domain configured in Vercel and DNS records propagated
  • Vercel Analytics enabled in the dashboard (auto-activated once <Analytics /> is in the layout)
  • Test Sally chat widget — open it, send a message, confirm a response streams back correctly (verifies AI Gateway connectivity)
  • Submit a test lead via the Orientación Estratégica form and confirm the contact appears in the CRM
  • Verify the data-treatment consent checkbox (dataConsent) is not pre-checked — the leadSchema enforces z.literal(true) so the form cannot be submitted without explicit user action, in compliance with Ley 1581 de 2012

Build docs developers (and LLMs) love