Inspiration

Developers and creators spend hours every day at their desks, yet planning a clean, ergonomic workspace usually involves static mood boards or heavy desktop CAD software. Inspired by tactile 3D configurators and cozy lo-fi desk setups, we built DeskCraft 3D so anyone can design, light, and share a personalized 3D workspace straight from a browser tab—with zero logins, zero backend latency, and full offline PWA installability.

What it does

DeskCraft 3D is an interactive 60 FPS 3D workspace studio where users can:

  • Customize Desk Materials: Switch instantly between Warm Oak, Dark Walnut, Nordic Birch, and Matte Carbon finishes with beveled tabletop geometry, steel T-frame legs, cable tray, and felt desk mat.
  • Place & Arrange 8 Procedural 3D Props: Spawn and drag an Ultrawide 34" Monitor, 75% Mechanical Keyboard, Pro Mouse, Articulated Desk Lamp, Studio Monitor Speaker, Ceramic Monstera Plant, Coffee Mug, and Dot Journal across the desk with raycast plane dragging and toggleable 0.08m snap-to-grid alignment.
  • Fine-Tune Every Detail: Rotate items (Q/E or inspector buttons), apply custom color swatches, duplicate props, or delete them with keyboard shortcuts.
  • Transform Room Atmosphere & Camera Angles: Toggle between Morning Daylight, Sunset Lo-Fi, and Cyberpunk Neon lighting moods—dynamically updating window glow, directional shadows, fog, and the rear desk LED light strip—while smoothly gliding between Hero, Top Grid, and Close-Up camera presets.
  • Share & Export Anywhere: Compress the entire 3D room state into a shareable URL (?setup=) with zero database required, export high-resolution PNG snapshots from the WebGL buffer, or install DeskCraft 3D as a standalone desktop/mobile Progressive Web App.

How we built it

  • Frontend & PWA Architecture: Built with Next.js 16 (App Router + Turbopack), React 19, TypeScript, and Tailwind CSS v4. Configured native Next.js 16 PWA support using app/manifest.ts, dynamic next/og PNG icon routes, and a custom network-first Service Worker (public/sw.js).
  • 3D Rendering Engine: Powered by Three.js, React Three Fiber (v9), and Drei (v10). Every room wall, window, desk frame, and prop is procedurally constructed in code with grounded y = 0 origins, ContactShadows, and GPU-generated <Lightformer> studio reflections so the app works 100% offline without external .glb or .hdr downloads.
  • State & Zero-Backend Sharing: Managed real-time 3D interactions via Zustand and implemented schema-validated URL state compression using lz-string alongside localStorage auto-save.

Challenges we ran into

  • Orbit Camera vs. Object Dragging Conflicts: Dragging a 3D item initially caused OrbitControls to rotate the entire room simultaneously. We solved this by locking camera orbit during active pointer-down events on props and projecting pointer movement onto an invisible horizontal desk raycast plane with boundary clamping.
  • Offline Studio Reflections & PNG Buffer Capture: Standard environment presets fetch remote HDR maps that fail offline, and WebGL canvases clear their drawing buffer after compositing. We replaced remote HDRs with procedural <Lightformer> rigs and enabled preserveDrawingBuffer with requestAnimationFrame flushing for crisp PNG exports.

Accomplishments that we're proud of

  • Delivering a rich, tactile 3D web experience that loads instantaneously, runs smoothly at 60 FPS, and works offline as an installable PWA without relying on paid APIs or external 3D asset servers.
  • Engineering seamless URL-based 3D scene sharing (lz-string) where any customized desk layout, finish, lighting mood, grid toggle, and camera angle reconstructs identically in another browser tab.

What we learned

  • Designing strict metric coordinate constants (DESK_SURFACE_Y) before modeling 3D props eliminates floating or clipping bugs across complex multi-part geometries.
  • Combining multi-layered lighting (key light, rim light, emissive window glass, fog, and rear desk LED strip) creates dramatically stronger mood immersion than changing a single light color.

What's next for DeskCraft 3D

  • Adding dual-monitor arms, pegboard wall accessories, and subtle ambient lo-fi synth audio generated via the Web Audio API.
  • Supporting multi-desk room layouts and GLTF scene export for creators who want to import their setups into Blender.

Disclosures (AI Tools & External Libraries)

  • External Libraries: Built with open-source libraries including next, react, three, @react-three/fiber, @react-three/drei, zustand, lz-string, and lucide-react. All 3D meshes and studio lighting environments are procedurally authored in code without third-party 3D model templates.
  • AI Tools: AI assistance was used during development for architectural planning, TypeScript debugging, and documentation drafting.

Built With

Share this project:

Updates

Submission history