No description
Find a file
mikl0s 9b6d8f0555 refactor: clean DB schema, remove users/sessions tables
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:50:10 +00:00
app Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
components Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
docs Add delivery cleanup implementation plan 2026-02-22 21:35:06 +00:00
lib refactor: clean DB schema, remove users/sessions tables 2026-02-22 21:50:10 +00:00
public Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
.env.example Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
.gitignore Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
.prettierignore Initial implementation of Foam King Gulve price calculator 2026-01-10 14:27:28 +00:00
.prettierrc.json Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
CLAUDE.md Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
eslint.config.mjs Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
middleware.ts Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
next.config.ts Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
package-lock.json Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
package.json Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
postcss.config.mjs Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
README.md Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
tailwind.config.ts Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +00:00
tsconfig.json Add admin dashboard, authentication, step wizard, and quote management 2026-02-22 20:59:11 +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