Deployment
Kuviq is deployed to Firebase Hosting with automatic deployments on successful CI builds.
Automatic Deployment
When you push to main or master and all CI checks pass:
- Version is automatically updated (
npm run version:date) - Application is built for production
- Deployed to Firebase Hosting
- Version commit is pushed back to the repository
Manual Deployment
Full Deployment (App + Docs)
npm run deploy
App Only
npm run deploy:app
Documentation Only
npm run docs:build
npm run deploy:docs
Firebase Configuration
Hosting Targets
The project uses two Firebase Hosting sites:
| Target | Site | URL |
|---|---|---|
| app | ae-inspector | https://app.kuviq.io |
| docs | ae-inspector-docs | https://docs.kuviq.io |
Firebase Services Used
- Hosting: Static web hosting for app and docs
- Firestore: NoSQL database
- Authentication: User authentication (email/password, Google)
- Storage: File storage for images and documents
- Functions: Serverless backend functions
Environment Configuration
Required Environment Variables
The application requires Firebase configuration environment variables to be set during the build process. Vite bundles these variables at build time, so they must be available when running npm run build.
Required variables:
VITE_FIREBASE_API_KEY- Firebase Web API KeyVITE_FIREBASE_AUTH_DOMAIN- Firebase Auth Domain (e.g.,project-id.firebaseapp.com)VITE_FIREBASE_PROJECT_ID- Firebase Project IDVITE_FIREBASE_STORAGE_BUCKET- Firebase Storage Bucket (e.g.,project-id.appspot.com)VITE_FIREBASE_MESSAGING_SENDER_ID- Firebase Messaging Sender IDVITE_FIREBASE_APP_ID- Firebase App IDVITE_FIREBASE_MEASUREMENT_ID- Google Analytics Measurement ID (optional)
Development
For local development, create a .env file in the project root:
VITE_FIREBASE_API_KEY=your-api-key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=123456789
VITE_FIREBASE_APP_ID=1:123456789:web:abcdef123456
VITE_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXX
You can also use Firebase Emulator Suite for local development:
npm run emulators
Production / CI/CD
For automated deployments via GitHub Actions, configure the following secrets in your GitHub repository:
- Go to your repository Settings → Secrets and variables → Actions
- Add the following repository secrets:
VITE_FIREBASE_API_KEYVITE_FIREBASE_AUTH_DOMAINVITE_FIREBASE_PROJECT_IDVITE_FIREBASE_STORAGE_BUCKETVITE_FIREBASE_MESSAGING_SENDER_IDVITE_FIREBASE_APP_IDVITE_FIREBASE_MEASUREMENT_ID
Important: Without these secrets configured, the build will fail with a clear error message. The application will not deploy with placeholder/invalid Firebase configuration.
Getting Firebase Configuration Values
- Go to Firebase Console
- Select your project
- Go to Project Settings (gear icon)
- Scroll down to "Your apps" section
- Select your web app or create a new one
- Copy the configuration values from the
firebaseConfigobject
Version Management
Version is stored in package.json and follows the format:
DD.MM.YYYY-buildNumber
Example: 27.11.2025-348
Manual Version Update
# Update to current date
npm run version:date
# Semantic versioning
npm run version:major
npm run version:minor
npm run version:patch
Rollback
To rollback to a previous deployment:
- Go to Firebase Console
- Select the project
- Go to Hosting
- Click "Release history"
- Select a previous release and click "Rollback"
Pre-deployment Checklist
Before deploying manually:
- All tests pass (
npm run test:ci) - TypeScript compiles (
npm run typecheck) - ESLint passes (
npm run lint) - Firebase environment variables are set (see Environment Configuration above)
- Build succeeds (
npm run build) - Test locally with
npm run preview
Note: The build script will validate Firebase configuration and fail early if required environment variables are missing or invalid.