The portfolio is built with TanStack Start and Nitro, which supports multiple server runtime targets through its preset system. The default preset inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/santiagonieto09/portafolio/llms.txt
Use this file to discover all available pages before exploring further.
vite.config.ts targets Vercel (Build Output API), producing a .vercel/output directory ready for zero-configuration deployment. Cloudflare Workers is also fully supported and is the preset used automatically inside the Lovable sandbox, so live previews work without any extra configuration.
Vercel deployment
Push the repository to GitHub
Make sure your local changes are committed and pushed to a GitHub repository. Vercel connects directly to GitHub to trigger deployments on every push.
Import the repository in the Vercel dashboard
Go to vercel.com/new, click Add New → Project, and select your GitHub repository.
Set the framework preset to Other
Under Framework Preset, choose Other. Vercel auto-detects the Nitro Build Output API structure from the
.vercel/output directory, so no further framework-specific configuration is needed.Configure the build command
Set the Build Command to:If you are using npm instead of Bun, use
npm run build. Both invoke vite build, which triggers Nitro’s Vercel preset.Confirm the output directory
The Output Directory is
.vercel/output. Nitro’s Vercel preset writes the Build Output API structure here automatically — you do not need to set this manually in the Vercel dashboard; Vercel detects it from the preset output.Add environment variables
Before deploying, add the following environment variables in Settings → Environment Variables:
See Environment Variables for full details on each variable.
| Variable | Required | Purpose |
|---|---|---|
GITHUB_TOKEN | Recommended | Raises GitHub API rate limit to 5,000 req/hr |
CRON_SECRET | Required for sync | Protects POST /api/public/sync |
SITE_URL | Recommended | Canonical URL for sitemap and OG tags |
vercel.json at the project root provides the following configuration, which Vercel reads during the build:
vercel.json
"framework": null tells Vercel not to apply any opinionated framework defaults, deferring entirely to the Nitro Build Output API output. The nitro: { preset: 'vercel' } option in vite.config.ts is what activates this output:
vite.config.ts
Cloudflare Workers deployment
Switch the Nitro preset in vite.config.ts
Open The rest of the config (TanStack Start, Tailwind, TypeScript paths) is managed by
vite.config.ts and change the preset from "vercel" to "cloudflare_module":vite.config.ts
@lovable.dev/vite-tanstack-config and does not need to change.Build the project
Run the standard build command:Nitro compiles the SSR server entry and bundles it for the Cloudflare Workers runtime instead of Vercel’s Node.js-compatible edge functions.
Deploy with Wrangler
Use the Wrangler CLI to push the Worker to your Cloudflare account:Wrangler reads the generated
wrangler.toml (or .wrangler/) produced by Nitro’s Cloudflare preset and uploads the Worker script automatically.On Cloudflare Workers, the snapshot cache uses
caches.default (the Cloudflare Cache API), which is shared across all Worker instances running in the same datacenter. This gives significantly better cache hit rates than the in-memory Map-based fallback used in the Node.js and Vercel runtimes, where each serverless function instance keeps its own independent cache.Production checklist
Weekly sync cron
The portfolio’s GitHub data is fetched live on every request and held in a server-side cache. To force a full refresh of that cache on a schedule,POST /api/public/sync triggers a re-fetch and snapshot update. Because Vercel Cron Jobs cannot send custom request headers (the x-cron-secret header is required), the recommended approach is a GitHub Actions workflow:
.github/workflows/sync.yml
| Secret name | Value |
|---|---|
PORTFOLIO_URL | Your deployed portfolio URL, e.g. https://santiagonieto.dev |
CRON_SECRET | The same secret string set in your hosting environment |
POST to the sync endpoint with the shared secret in the x-cron-secret header, and prints the HTTP response code. A 200 response confirms the snapshot was refreshed successfully.