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.

Before running Panahashi Admin, you need to supply credentials for Firebase Authentication and point the app at your backend API. All runtime configuration is injected through a .env file in the project root, which Vite reads at build time.

Environment variables

Panahashi Admin reads the following environment variables at build time. Create a .env file in the project root and populate each value before starting the development server or running a build.
.env.example
# Firebase Authentication
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
Vite only exposes variables prefixed with VITE_ to browser code. Variables without this prefix are not included in the bundle and will be undefined at runtime.
Never commit your .env file to version control. Add it to .gitignore to prevent accidental exposure of API keys and secrets.

Getting Firebase values

1

Open the Firebase console

Go to console.firebase.google.com and select your project. If you don’t have a project yet, create one before continuing.
2

Open project settings

Click the gear icon next to Project Overview in the left sidebar and select Project settings.
3

Find your web app

Scroll down to the Your apps section. If you haven’t registered a web app yet, click Add app, choose the web platform (</>), and follow the prompts.
4

Copy the config values

Under your web app, Firebase displays a config object. Map the fields to your .env file as follows:
Firebase config fieldEnvironment variable
apiKeyVITE_FIREBASE_API_KEY
authDomainVITE_FIREBASE_AUTH_DOMAIN
projectIdVITE_FIREBASE_PROJECT_ID
appIdVITE_FIREBASE_APP_ID

Backend API base URL

The base URL for all API calls is hardcoded in src/api/axios.js:
src/api/axios.js
import axios from "axios";
const api = axios.create({
  baseURL: "http://localhost:8080/api/v1",
});
export default api;
The baseURL is a literal string in source — there is no env var for it out of the box. To point the app at a different backend (staging or production), you must edit this file before building.
To change the API target, open src/api/axios.js and replace the baseURL value:
src/api/axios.js
import axios from "axios";
const api = axios.create({
  baseURL: "https://api.yourdomain.com/api/v1",
});
export default api;
If you want to manage the URL through an environment variable (recommended for CI/CD pipelines), update the file to read from import.meta.env:
src/api/axios.js
import axios from "axios";
const api = axios.create({
  baseURL: import.meta.env.VITE_API_BASE_URL ?? "http://localhost:8080/api/v1",
});
export default api;
Then add VITE_API_BASE_URL to your .env file:
.env
VITE_API_BASE_URL=https://api.yourdomain.com/api/v1

Build docs developers (and LLMs) love