Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/EricMartinez758/corpointa-frontend/llms.txt

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

Corpointa is a Vite-powered application, which means only variables prefixed with VITE_ are statically inlined into the client bundle at build time. Any variable without that prefix stays server-side and is never accessible to browser code. Variables are accessed at runtime via import.meta.env.VITE_* — there is no process.env in the browser context.

Available Variables

NameRequiredDefaultDescription
VITE_CLERK_PUBLISHABLE_KEYOptionalClerk publishable key. Required if you are using Clerk-authenticated routes. Leave unset to disable Clerk integration.

Setting Variables

Development — create a .env or .env.local file in the project root. Vite loads .env.local automatically and excludes it from version control by default (it is already in .gitignore). Production — set variables directly in your hosting platform’s environment settings. For Netlify, go to Site configuration → Environment variables and add each key there. The values are injected at build time when Netlify runs pnpm build.
.env
VITE_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxxx
Never commit .env files that contain real API keys, publishable keys, or other credentials to version control. Use .env.local for local secrets, and rely on your hosting platform’s environment variable panel for production values.

Build Commands

The following scripts are defined in package.json:
CommandWhat it does
pnpm buildRuns tsc -b && vite build. TypeScript is type-checked first, then Vite bundles the application and writes output to dist/.
pnpm previewServes the contents of dist/ locally on port 4173. Use this to verify the production build before deploying.
pnpm devStarts the Vite dev server with HMR for local development.
The full build script from package.json:
package.json
{
  "scripts": {
    "dev": "vite",
    "build": "tsc -b && vite build",
    "preview": "vite preview"
  }
}

Build Output

Vite outputs all compiled assets to the dist/ directory. The build uses TanStack Router’s automatic code-splitting (autoCodeSplitting: true in vite.config.ts), which means each route is emitted as a separate JavaScript chunk and loaded lazily on demand. This keeps the initial bundle size small — the user only downloads code for the pages they actually visit.
vite.config.ts
plugins: [
  tanstackRouter({
    target: 'react',
    autoCodeSplitting: true,
  }),
  react(),
  tailwindcss(),
],
The dist/ folder contains a static index.html entry point plus hashed asset files (*.js, *.css). It can be served by any static file host or CDN — no Node.js server is required at runtime.

Build docs developers (and LLMs) love