GOAT Portfolio’s frontend is configured entirely through aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/giangartun/Tis-GOAT-Frontend/llms.txt
Use this file to discover all available pages before exploring further.
.env file at the project root. Vite reads this file at build time and exposes values prefixed with VITE_ to your application code as import.meta.env.VITE_*. No configuration is baked into TypeScript source files — every tuneable value lives in the environment, making it trivial to target different backends (local, staging, production) without changing code.
Environment variables
The table below documents every supported variable. Create a.env file in the project root (next to package.json) and set the values appropriate for your environment.
| Variable | Required | Default | Description |
|---|---|---|---|
VITE_API_URL | ✅ Yes | http://127.0.0.1:8000 | Base URL of the backend REST API without a trailing slash. The Axios client appends /api to this value, and the Vite dev-server proxy forwards all /api requests here. |
Vite will not expose a variable to the browser unless its name starts with
VITE_. Any secret that must not reach the client (database credentials,
private keys) should never be placed in this file..env.example
Commit this file to version control so teammates know which variables are needed. Copy it to .env and fill in your own values.
Vite dev server
During local development, the Vite dev server acts as a reverse proxy: any request your browser makes to/api/... is transparently forwarded to the backend URL defined in VITE_API_URL. This eliminates CORS errors without requiring any CORS configuration on the backend for local development.
The proxy is configured in vite.config.ts:
| Option | Value | Effect |
|---|---|---|
target | VITE_API_URL (trailing slash stripped) or http://127.0.0.1:8000 | The backend to proxy /api requests to |
changeOrigin | true | Rewrites the Host header to match the target, required for most backends |
secure | false | Allows proxying to backends with self-signed TLS certificates |
host | true | Binds the dev server to 0.0.0.0, making it reachable on your local network (useful for mobile testing) |
Tailwind color tokens
GOAT Portfolio extends Tailwind’s default palette with a set ofapp.* semantic color tokens defined in tailwind.config.js. Use these tokens in className strings (bg-app-header, text-app-muted, etc.) to keep the UI consistent and to make a global re-theme a one-file change.
Token reference
| Token | Hex value | Tailwind class examples | Purpose |
|---|---|---|---|
app.bg | #D9D9D9 | bg-app-bg | General page background — light grey canvas |
app.header | #2E3A4D | bg-app-header, text-app-header | Top app bar / navbar background (dark navy) |
app.topbar | #1F4E79 | bg-app-topbar | Primary horizontal navigation bar (deep blue) |
app.sidebar | #1F4E79 | bg-app-sidebar | Left sidebar column — shares colour with topbar |
app.surface | #F1F5F9 | bg-app-surface | Card and panel surfaces (near-white blue-grey) |
app.card | #f7f8fa | bg-app-card | Softer card background for nested content |
app.border | #ABB2BF | border-app-border, divide-app-border | Borders, dividers, and input outlines |
app.text | #000000 | text-app-text | Primary body text |
app.muted | #6b7280 | text-app-muted | Secondary / helper text, placeholders |
app.topbar and app.sidebar intentionally share the same hex value
(#1F4E79). They are defined as separate tokens so that either can be
independently recoloured in the future without a find-and-replace across the
codebase.Running locally
Install dependencies
Start the development server
http://localhost:5173 by default (exact port may vary). The dev server watches for file changes and hot-reloads the browser automatically.
Build for production
tsc -b (TypeScript type-checking) followed by vite build. Output is written to the dist/ directory, ready to be served by any static file host or CDN.
You can preview the production build locally before deploying: