No description
Find a file
mikl0s 7d2bbae1c6 Initial implementation of Foam King Gulve price calculator
Features:
- Complete Next.js 16 app with TypeScript and Tailwind CSS
- Customer-facing price calculator form with validation
- Admin mode showing detailed price breakdowns
- Accurate price calculations matching business requirements
- Responsive design with custom shadcn/ui theme
- API endpoint for quote requests
- Danish postal code distance calculations
- Complete test coverage against documentation examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-10 14:27:28 +00:00
app Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
components Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
docs Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
lib Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
public Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
.gitignore Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
.prettierignore Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
.prettierrc.json Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
CLAUDE.md Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
eslint.config.mjs Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
next.config.ts Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
package.json Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
postcss.config.mjs Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
README.md Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
tailwind.config.ts Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
tsconfig.json Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00

Foam King Gulve - Prisberegner

En moderne price calculator/overslagsberegner til Foam King Gulve, bygget med Next.js, TypeScript, Tailwind CSS og shadcn/ui.

🚀 Features

  • Brugervenlig prisberegner - Enkel formular hvor kunder kan indtaste gulvareal, højde og kontaktoplysninger
  • Øjeblikkelig prisberegning - Automatisk beregning af pris baseret på komplekse forretningsregler
  • Admin mode - Detaljeret visning af alle priselementer og beregninger for Foam King medarbejdere
  • Responsivt design - Virker perfekt på desktop, tablet og mobil
  • Email integration - Sender tilbudsanmodninger til Foam King
  • Dansk lokalisering - Komplette danske tekster og valuta-formatering

🏗️ Teknologi

  • Next.js 16 - React framework med App Router
  • TypeScript - Type safety
  • Tailwind CSS - Utility-first CSS framework
  • shadcn/ui - Moderne, accessible komponentbibliotek
  • React Hook Form + Zod - Formular håndtering og validering
  • Lucide React - Ikoner

🧮 Priskalkulation

Kalkulatoren beregner priser baseret på:

  • Isolering: 3.730 kr/m³ (eller 75 kr/m² simpel arbejdsløn)
  • Gulvvarme: 205 kr/m² (altid inkluderet)
  • Syntetisk net: 49 kr/m² (altid inkluderet)
  • Flydespartel: 450 kr/m² (90 kg/m²)
  • Pumpebil-tillæg: 0-8.100 kr baseret på spartelvægt
  • Startgebyr: 3.500 kr fast
  • Transport: 18,75 kr/km (tur-retur fra Asnæs)
  • Storebælt-tillæg: 500 kr (kun Fyn)
  • Procenttillæg: 0,95% (afdækning + affald)
  • Moms: 25%

🗂️ Projektstruktur

├── app/                    # Next.js App Router
│   ├── api/               # API routes
│   ├── globals.css        # Global styles + custom theme
│   ├── layout.tsx         # Root layout
│   └── page.tsx          # Homepage
├── components/
│   ├── calculator/        # Calculator-specific components
│   └── ui/               # shadcn/ui components
├── lib/
│   ├── calculations.ts    # Price calculation logic
│   ├── constants.ts       # Pricing constants
│   ├── distance.ts        # Postal code distance lookup
│   └── utils.ts          # Utilities
├── docs/                  # Project documentation
└── public/               # Static assets

🚀 Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Start production server  
npm start

# Lint code
npm run lint

# Type check
npm run typecheck

# Format code
npm run format

🔧 Configuration

Environment Variables

Ingen environment variables er nødvendige for MVP version. I produktion:

# Email service configuration
SMTP_HOST=smtp.example.com
SMTP_USER=user@example.com  
SMTP_PASS=password

# Or use a service like SendGrid, AWS SES, etc.
SENDGRID_API_KEY=your_api_key

Distance Calculation

Projektet bruger en forudberegnet tabel over afstande fra 4550 Asnæs til danske postnumre. For øget præcision kan der implementeres:

  • Google Maps Distance Matrix API
  • OpenRouteService API (gratis op til 2.000 requests/dag)

🎯 Dækningsområde

  • Sjælland: Postnummer 2000-4999
  • Lolland-Falster: Postnummer 4800-4899
  • Fyn: Postnummer 5000-5999 (+500 kr Storebælt)

📱 Admin Mode

Klik på "Vis detaljer" for at se den fulde prissopgørelse med:

  • Alle priskomponenter
  • Beregningslogik step-by-step
  • Isolerings- og transportdetaljer
  • Procenttillæg og momsberegning

🧪 Testing

Test med eksempel fra dokumentationen:

  • Areal: 50 m²
  • Højde: 20 cm
  • Postnummer: 2100 (København)
  • Forventet resultat: Ca. 95.500 kr inkl. moms

📄 Licens

Proprietary - Foam King Gulve