Installasjon¶
Forutsetninger¶
- Node.js v20+ (tested med v24.11.1)
- npm v11+
- Git
- Firebase CLI (
npm install -g firebase-tools) - GitHub account (Golfklubb-IT org)
1. Klone Repository¶
git clone https://github.com/Golfklubb-IT/gkit-meeting-suite.git
cd gkit-meeting-suite
2. Installér Dependencies¶
npm install
Dette installerer: - React 19 + React DOM - TypeScript 5.7 - Vite 6.1 build tool - Firebase SDK 11.3.1 - Tailwind CSS 3.4 - Lucide React icons - Andre 900+ transitive packages
Størrelse: ~500 MB node_modules (ikke commit til git)
3. Konfigurér Firebase¶
Option A: Bruk Eksisterende Firebase Project¶
firebase login
firebase use --add
# Select: gkit-meeting-suite
Appen vil bruke .firebaserc:
{ "projects": { "default": "gkit-meeting-suite" } }
Option B: Opprett Nytt Firebase Project¶
firebase init
# Select: Firestore, Functions, Hosting, Storage
# Select region: europe-north1 (GDPR)
# Select language: TypeScript
4. Lag .env.local¶
cp .env.example .env.local # Hvis den finnes
Fyll inn Firebase credentials:
VITE_FIREBASE_API_KEY=your_api_key_here
VITE_FIREBASE_PROJECT_ID=gkit-meeting-suite
VITE_FIREBASE_AUTH_DOMAIN=gkit-meeting-suite.firebaseapp.com
VITE_FIREBASE_STORAGE_BUCKET=gkit-meeting-suite.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=390932420298
VITE_FIREBASE_APP_ID=1:390932420298:web:4f3b99bf122a5bb9534633
VITE_GEMINI_API_KEY=your_gemini_api_key_here # Optional
Hent Firebase config:
firebase apps:sdkconfig web
5. Lokal Utvikling¶
Start Dev Server¶
npm run dev
Åpner automatisk http://localhost:3000
(Valgfritt) Start Firebase Emulator¶
Krever Java JDK installert:
firebase emulators:start --only firestore,auth
Emulator UI: http://localhost:4000
6. Build for Produksjon¶
npm run build
Output: dist/ folder (optimert for produksjon)
7. Deploy¶
Deploy til Firebase Hosting¶
firebase deploy --only hosting
URL: https://gkit-meeting-suite.web.app
Deploy Cloud Functions¶
firebase deploy --only functions
Deploy Security Rules¶
firebase deploy --only firestore:rules
Vanlige Problemer¶
❌ "Cannot find module 'firebase/firestore'"¶
npm install firebase@latest
❌ Java not found (for emulator)¶
- Installer Java JDK fra oracle.com
- Eller skip emulator og bruk produksjon Firestore
❌ Port 3000 allerede i bruk¶
npm run dev -- --port 3001
❌ TypeScript errors ved build¶
npx tsc --noEmit # Check types
npm run build # Full build
Neste Steg¶
- Les Konfigurering for miljøvariabllar
- Les Utvikling for kodekvalitet
- Les Deploying for CI/CD setup