The portfolio is configured entirely through environment variables — there is no config file beyondDocumentation 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 and vercel.json. The .env.example file at the project root lists every supported variable with inline comments. In production, set these variables through your hosting provider’s dashboard or CLI rather than committing a .env file; in local development, copy .env.example to .env and fill in the values you need.
Variables
A GitHub Personal Access Token sent as
Authorization: Bearer <token> on all GitHub REST API requests made by the server./users/:username, /repos/:owner/:repo, /repos/:owner/:repo/releases, /repos/:owner/:repo/languages, /users/:username/events/public) is public-only and requires no OAuth permissions.
The token is read exclusively on the server side via process.env.GITHUB_TOKEN (with process.env.GITHUB_API_KEY accepted as a fallback). It is never included in the client bundle and never sent to the browser.
A shared secret string that must be supplied in the
x-cron-secret request header (or as an Authorization: Bearer token) when calling POST /api/public/sync.CRON_SECRET prevents this by requiring the caller to prove they know the secret.
Requirements:
- Should be at least 16 characters for practical security. Use a randomly generated string — for example, the output of
openssl rand -hex 32. - The same value must be set both in the portfolio’s runtime environment and in whatever system calls the endpoint (a GitHub Actions secret, a cron service, etc.).
- If
CRON_SECRETis not set, the sync endpoint returns503 Service Unavailablefor all requests rather than exposing an unprotected mutation endpoint. - The comparison between the incoming header value and the stored secret is timing-safe (implemented with a byte-by-byte XOR check), preventing timing-based secret enumeration attacks.
The canonical base URL of the deployed portfolio. Must include the scheme and hostname with no trailing slash, e.g.
https://santiagonieto.dev.SITE_URL is used in two places:
-
sitemap.xml— Each<loc>entry is built by prependingSITE_URLto the route path. Without it, the sitemap derives the origin from the incoming HTTP request’sHostheader, which is correct on most hosts but can produce inconsistent or private-network URLs when the app sits behind a reverse proxy or load balancer that rewritesHost. -
Open Graph meta tags — The
og:urlproperty on every page is set toSITE_URL + pathname, ensuring social share cards resolve to the canonical public URL rather than an ephemeral preview deployment URL.
Setting variables locally
Copy.env.example to .env in the project root and fill in your values:
.env
.env at dev-server startup and injects server-side variables into the Nitro runtime. You do not need a VITE_ prefix for server-only variables.
Never commit
.env to source control. The file is already listed in .gitignore. The .env.example file — which contains only empty placeholders and comment descriptions — is safe to commit and serves as the canonical reference for required variables.Setting variables on Vercel
Open your project in the Vercel dashboard
Navigate to vercel.com/dashboard and select the portfolio project.
Go to Settings → Environment Variables
Click the Settings tab, then Environment Variables in the left sidebar.
Add each variable with the appropriate scope
For each variable (
GITHUB_TOKEN, CRON_SECRET, SITE_URL), enter the name and value, then select the environment scopes where it applies:- Production — the main deployed branch (always required)
- Preview — pull-request and branch preview deployments (recommended for
GITHUB_TOKEN; use a separateCRON_SECRETor leave it unset) - Development — populated when using
vercel env pulllocally (optional)
Setting variables on Cloudflare Workers
Sensitive variables should be stored as encrypted secrets using Wrangler so they never appear in plain text inwrangler.toml or source control:
SITE_URL is not sensitive, so it can be declared as a plain variable in wrangler.toml:
wrangler.toml
[vars] are visible in the Cloudflare dashboard and in version control if you commit wrangler.toml — use this only for non-sensitive configuration.