Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndrewwCO/Admin-Pana/llms.txt

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

Panahashi Admin is a Vite-powered single-page application. The build process compiles your source files into a dist/ folder containing plain HTML, CSS, and JavaScript — static assets that any web server or CDN can serve without a Node.js runtime.

Deployment steps

1

Configure environment variables

Set all required VITE_ variables for your target environment before building. The build process bakes these values into the output bundle, so they must be set at build time, not at runtime.
.env
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_APP_ID=your_firebase_app_id
See the Configuration page for a full explanation of each variable, including how to override the backend API base URL for production.
2

Build the application

Run the build command from the project root:
npm run build
Vite compiles the application and writes the output to the dist/ directory. The folder contains all the static files needed to serve the app.
3

Preview the production build locally

Before uploading to a hosting provider, verify the production build locally:
npm run preview
This starts a local server at http://localhost:4173 that serves the contents of dist/ exactly as a production server would. Use this step to catch any environment or routing issues before deploying.
4

Deploy the dist/ folder

Upload the dist/ folder to your chosen hosting provider. The section below covers Netlify and Vercel, but the same dist/ folder works with any static host — Firebase Hosting, Nginx, Apache, AWS S3 + CloudFront, or GitHub Pages.
The backend API at VITE_API_BASE_URL must be reachable from the deployed URL. Update your backend’s CORS settings to allow requests from your production domain, otherwise API calls will be blocked by the browser.
Firebase Authentication rejects sign-in attempts from domains not listed in the authorized domains allowlist. After deploying, open the Firebase console, go to Authentication → Settings → Authorized domains, and add your production domain.

Hosting options

Drag-and-drop
  1. Build the app locally with npm run build.
  2. Open app.netlify.com and log in.
  3. Drag the dist/ folder onto the Netlify drop zone on the Sites page.
  4. Netlify deploys the site and provides a URL immediately.
Netlify CLIInstall the CLI and deploy in one command:
npm install -g netlify-cli
netlify deploy --prod --dir=dist
On the first run, the CLI will prompt you to log in and link or create a site. Set your VITE_ environment variables under Site settings → Environment variables in the Netlify dashboard so they are available for future CI builds.

Build docs developers (and LLMs) love