Skip to content
linuxcoding-ADAMPublic

About

Parametric CAD tool for cabinet & furniture technical drawings in the browser — configure, dimension, and export print-ready PDF fabrication plans.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

LhadjCAD

A specialized parametric CAD engine for cabinet & furniture technical drawings — right in the browser.

LhadjCAD lets furniture makers, joiners, and interior fit-out professionals configure a cabinet (doors, drawers, shelves, legs, handles, materials) through an interactive parametric editor, then generate a clean, dimensioned, print-ready fabrication plan as a PDF.

➡️ Live demo: lhadjcad.vercel.app

Next.js React TypeScript Tailwind CSS License


Overview

LhadjCAD is a flat, deterministic cabinet data model paired with a real-time SVG rendering engine. Every parameter you change — width, door count, drawer rows, handle style, leg type — flows through a geometry solver that recomputes the layout instantly, so what you see in the workspace is exactly what gets exported to the PDF fabrication plan.

It is built as an internal engineering tool for producing consistent, professional technical drawings without needing a full desktop CAD suite.

Key Features

  • Parametric cabinet editor — configure global dimensions (width, height, depth, unit), frame thickness, back panel, and gap/reveal in real time.
  • Doors, drawers & shelves — add any number of doors, drawer rows/columns, and shelves, each independently configurable (material, color, visibility) or synced with "same settings" mode.
  • Handles & hardware — a dedicated handle library (bar, knob, industrial, hidden, lock, glass clamp, etc.) with position, rotation, and size control.
  • Materials system — wood, melamine, glass, steel, aluminium, PVC, or custom finishes with per-component color.
  • Legs / base configuration — square or round metal, wood, hidden plinth, or adjustable legs with height, width, and inset.
  • Automatic dimensioning — an architectural dimension solver draws width/height/depth, internal, door, and drawer dimensions with configurable arrow styles, fonts, offsets, and extension lines.
  • Live SVG workspace — pan, zoom, and inspect the cabinet on an interactive canvas (Workspace.tsx) with full mouse/wheel navigation.
  • Undo / redo & keyboard shortcuts — Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z / Ctrl/Cmd+Y, Ctrl/Cmd+S, and Delete to remove the selected element.
  • PDF export — one-click export of the current design to an A4 fabrication plan (SVG → PDF via jsPDF + svg2pdf.js), auto-scaled and centered on the page.
  • Project management — create, list, duplicate, and revisit projects (name, customer, notes), persisted locally in the browser.

Tech Stack

Layer Technology
Framework Next.js 16 (App Router)
UI React 19, Tailwind CSS 4, Radix UI, shadcn/ui primitives
State management Zustand
Drag & drop dnd-kit
Rendering engine Custom SVG geometry & layout solver (src/engine)
PDF export jsPDF + svg2pdf.js
Icons lucide-react
Language TypeScript

Project Structure

src/
├── app/                      # Next.js routes
│   ├── page.tsx               # Home — project list & creation
│   └── editor/[id]/page.tsx   # Cabinet editor for a given project
├── components/               # Shared low-level UI components
│   └── ui/                    # shadcn/ui primitives
├── engine/                   # Core CAD engine
│   ├── defaults.ts             # Default cabinet / door / drawer / shelf factories
│   ├── geometry/               # Geometry primitives & types
│   ├── layout/                 # Layout & dimension solvers
│   └── renderer/                # SVG renderer + sub-renderers (materials, handles, dimensions)
├── modules/
│   ├── pdf-engine/             # SVG → PDF export pipeline
│   ├── project/                # Project creation & listing UI
│   ├── ui-components/          # Configuration sidebar, selectors, dimension panel
│   └── workspace/               # Interactive canvas & keyboard shortcuts
├── store/                     # Zustand stores (projects, furniture/cabinet state)
└── types/                     # Cabinet data model (TypeScript types)

Getting Started

Prerequisites

  • Node.js 18.18+ (LTS recommended)
  • npm (or yarn / pnpm / bun)

Installation

git clone https://github.com/linuxcoding-ADAM/LhadjCAd.git
cd LhadjCAd
npm install

Development

npm run dev

Open http://localhost:3000 to start creating a project.

Production Build

npm run build
npm run start

Linting

npm run lint

Usage

  1. Create a project from the home screen — give it a name, customer, and notes.
  2. Configure the cabinet in the editor: set global dimensions, frame, doors, drawers, shelves, and legs from the configuration sidebar.
  3. Fine-tune hardware — pick handle types, materials, and colors per door/drawer.
  4. Adjust dimensioning — toggle which dimensions are shown and style the annotation (font, arrows, offsets).
  5. Navigate the workspace — scroll to zoom, drag to pan, use the toolbar to fit/reset the view.
  6. Export the finished design as a PDF fabrication plan, ready to send to the workshop.

Data & Persistence

Projects are currently persisted in the browser via localStorage (key lhadjcad-projects-v3), so designs remain available across sessions on the same device/browser without requiring a backend.

Roadmap Ideas

  • Backend/cloud persistence and multi-user collaboration
  • Additional furniture types beyond cabinets (wardrobes, kitchen units, custom carcasses)
  • 3D preview alongside the 2D technical drawing
  • Cut-list / bill-of-materials export

Contributing

This is currently maintained as an internal engineering tool. Issues and pull requests are welcome — please open an issue to discuss significant changes before submitting a PR.

License

No license has been specified for this repository. All rights reserved by the author unless a license file is added.

About

Parametric CAD tool for cabinet & furniture technical drawings in the browser — configure, dimension, and export print-ready PDF fabrication plans.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages