Skip to content

louistrue/ifc-data-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

IFC Data Browser

License: AGPL v3 TypeScript Next.js WebAssembly IfcOpenShell

A modern web application for exploring and analyzing IFC (Industry Foundation Classes) building model files. Transform complex BIM data into interactive SQL databases directly in your browser.

πŸš€ Features

  • Client-Side Processing: 100% privacy-first: all processing happens in your browser
  • Multi-Format Support: Compatible with IFC2X3 and IFC4 formats (IFC4X3 coming soon)
  • Interactive Database Viewer: Browse, search, and query your IFC data as SQL tables
  • WebAssembly Powered: Uses Pyodide and IfcOpenShell compiled to WebAssembly
  • Real-time Progress: Live updates during file processing and conversion
  • Dark/Light Theme: Modern UI with theme switching
  • Responsive Design: Works on desktop and mobile devices
  • No Upload Required: Files never leave your device

πŸ“‹ Table of Contents

🎯 Quick Start

  1. Open the Application: Navigate to the deployed application URL
  2. Upload IFC File: Drag and drop or click to select your .ifc file
  3. Wait for Processing: The app will convert your IFC file to a SQLite database
  4. Explore Data: Browse tables, view entities, and run custom queries

That's it! No installation, no server setup, no data sharing.

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Next.js UI    │────│  Pyodide Worker  │────│  IfcOpenShell   β”‚
β”‚   (React)       β”‚    β”‚  (WebAssembly)   β”‚    β”‚  (Python)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚   SQLite DB     β”‚
                       β”‚   (In-Memory)   β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Components

  • Frontend: Next.js 15 with React 19, TypeScript, and Tailwind CSS
  • WebAssembly Runtime: Pyodide for running Python in the browser
  • IFC Processing: IfcOpenShell compiled to WebAssembly
  • Database: SQLite compiled to WebAssembly for in-memory storage
  • UI Components: Radix UI with custom styling

πŸ›  Technology Stack

Frontend

  • Framework: Next.js 15
  • Language: TypeScript
  • UI Library: React 19
  • Styling: Tailwind CSS + Radix UI
  • Theme: next-themes
  • File Upload: react-dropzone

Backend (Client-Side)

  • Runtime: Pyodide (Python in WebAssembly)
  • IFC Library: IfcOpenShell
  • Database: SQLite (WebAssembly)
  • Geometry: Shapely
  • Web Worker: Multi-threaded processing

Development

  • Build Tool: Next.js
  • Package Manager: pnpm
  • Linting: ESLint
  • Type Checking: TypeScript

πŸ“¦ Installation

Prerequisites

  • Node.js 18+ and npm/pnpm
  • Modern web browser with WebAssembly support

Local Development

  1. Clone the repository

    git clone https://github.com/your-username/ifc-data-browser.git
    cd ifc-data-browser
  2. Install dependencies

    pnpm install
  3. Start development server

    pnpm dev
  4. Open your browser Navigate to http://localhost:3000

Production Build

pnpm build
pnpm start

πŸ“– Usage

Basic Workflow

  1. File Upload

    • Drag and drop IFC files or click to browse
    • Supported formats: .ifc (IFC2X3, IFC4)
    • File size limit: Browser-dependent (typically 2GB+)
  2. Processing

    • Real-time progress updates
    • Multiple processing steps:
      • Loading IFC file
      • Parsing entities
      • Building database schema
      • Converting to SQLite tables
      • Indexing for performance
  3. Data Exploration

    • Table Browser: View all converted tables
    • Entity Inspector: Examine individual IFC entities
    • SQL Query Interface: Run custom queries
    • Property Viewer: Explore entity properties and relationships

Example Queries

-- Find all walls
SELECT * FROM ifcwall;

-- Count entities by type
SELECT type, COUNT(*) as count
FROM entities
GROUP BY type
ORDER BY count DESC;

-- Find entities with specific properties
SELECT * FROM ifcwall
WHERE Name LIKE '%exterior%';

πŸ”’ Privacy & Security

Privacy First Design

  • Zero Data Transmission: Files never leave your browser
  • Client-Side Processing: All computation happens locally
  • No External Dependencies: No API calls or server requests
  • No Tracking: No analytics or user data collection

Security Features

  • WebAssembly Sandbox: Python code runs in secure WASM environment
  • No File System Access: Cannot read/write local files
  • Memory-Only Storage: Database exists only in browser memory
  • No Network Activity: Confirmed via browser developer tools

Verification

To verify privacy claims:

  1. Open browser developer tools (F12)
  2. Go to Network tab
  3. Upload an IFC file
  4. Confirm: 0 bytes uploaded, no external requests

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Project Structure

ifc-data-browser/
β”œβ”€β”€ app/                    # Next.js app router
β”œβ”€β”€ components/             # React components
β”‚   β”œβ”€β”€ ui/                # Reusable UI components
β”‚   └── ...                # Feature-specific components
β”œβ”€β”€ hooks/                 # Custom React hooks
β”œβ”€β”€ lib/                   # Utility libraries
β”œβ”€β”€ public/                # Static assets
β”‚   └── ifc2sql.py        # Python IFC processing script
└── styles/               # Global styles

πŸ“„ License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

Key Points

  • βœ… Open Source: Full source code available
  • βœ… Copyleft: Modifications must be shared under same license
  • βœ… Network Use: Network-accessible modifications must provide source
  • βœ… Commercial Use: Allowed with license compliance

See LICENSE for full license text.

πŸ“š Resources

IFC & BIM

Tools & Libraries

πŸ™ Acknowledgments

  • IfcOpenShell: For the incredible open-source IFC library
  • Pyodide Team: For making Python available in browsers
  • buildingSMART: For developing and maintaining IFC standards
  • Open Source Community: For the tools and libraries that make this possible

πŸ“ž Support

or reach out...


Made with ❀️ for the AEC industry

About

Transform complex BIM data into interactive SQL databases directly in your browser.

Topics

Resources

License

Stars

Watchers

Forks