Skip to content

Shobon03/ts-ifc-api

Repository files navigation

ts-ifc-api

BIM Interoperability API for Revit, Archicad and IFC

Features β€’ Quick Start β€’ Development β€’ Production β€’ Documentation


🎯 Goals

This project provides a complete BIM interoperability layer for architectural software, enabling seamless conversion between:

  • Revit (.rvt) ↔ IFC
  • Archicad (.pln) ↔ IFC
  • Revit ↔ Archicad (via IFC)

Key Components

  • REST API (Node.js + TypeScript + Fastify)
  • Python Bridge (Flask + Archicad API)
  • Desktop Plugins (Revit C# + Archicad C++)
  • Web Interface (React + TanStack Router)
  • Documentation (Fumadocs + Code Hike)

✨ Features

  • βœ… Real-time conversion progress via WebSocket
  • βœ… Multi-format support: RVT, PLN, IFC
  • βœ… Chain conversions: Automatic Revit β†’ IFC β†’ Archicad workflows
  • βœ… Plugin status monitoring in real-time
  • βœ… Job management with automatic cleanup (TTL-based)
  • βœ… Internationalization: Portuguese and English support
  • βœ… File download after conversion
  • βœ… RESTful API with Scalar/Swagger documentation
  • βœ… WebSocket Context: Global state management for jobs
  • βœ… Dark mode support in web interface
  • βœ… Cross-platform backend (Windows, Linux, macOS)
  • βœ… Drag-and-drop file upload

πŸš€ Quick Start

Prerequisites

  • Node.js >= 22.0.0 (LTS)
  • pnpm >= 8.0.0
  • Python >= 3.13

Installation

Windows:

git clone https://github.com/Shobon03/ts-ifc-api.git
cd ts-ifc-api
scripts\setup.bat

Linux/Mac:

git clone https://github.com/Shobon03/ts-ifc-api.git
cd ts-ifc-api
chmod +x scripts/*.sh
./scripts/setup.sh

Or manually:

pnpm install
cd backend/python
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

πŸ’» Development

Start all services in development mode with hot-reload:

pnpm dev

Or start services individually:

pnpm dev:backend        # Node.js API (port 3000)
pnpm dev:python         # Python bridge (port 5000)
pnpm dev:frontend       # React app (port 3001)
pnpm dev:documentation  # VitePress docs (port 5173)

Ports After Initialization

Service URL Description
Backend API http://localhost:3000 Node.js REST API + WebSocket
Python Bridge http://localhost:5000 Archicad plugin communication
Frontend http://localhost:3001 React web interface
Documentation http://localhost:3002 Fumadocs documentation site
API Reference http://localhost:3000/docs Scalar API documentation

🏭 Production

Build

Windows:

scripts\build.bat

Linux/Mac:

./scripts/build.sh

Or with pnpm:

pnpm build

Run

Windows:

scripts\start.bat

Linux/Mac:

./scripts/start.sh

Or with pnpm:

pnpm start

Production with PM2

# Install PM2
npm install -g pm2

# Build
pnpm build

# Start with PM2
pm2 start ecosystem.config.js

# Configure to start on boot
pm2 startup
pm2 save

For detailed build and deployment instructions, see BUILD.md.


πŸ“š Documentation

Complete documentation is available at http://localhost:3002 (when running pnpm dev:documentation).

User Guide

  • Introduction: What is the system and how it works
  • Getting Started: Your first conversion
  • File Conversion: Detailed guide for all conversion types
  • Troubleshooting: Common issues and solutions

Developer Guide

  • Architecture: System overview and component interaction
  • Setup: Environment configuration
  • Backend Node.js: Fastify API and WebSocket
  • Backend Python: Flask bridge and Archicad integration
  • Frontend: React application with TanStack Router

Plugin Development

  • Revit Plugin: C# WebSocket plugin (~95% complete)
  • Archicad Plugin: C++ plugin with HTTP communication (~65% complete)

API Reference

  • Endpoints: Complete REST API documentation
  • WebSocket Protocol: Real-time communication spec
  • Data Models: TypeScript types and Zod schemas

Quick Links


πŸ—οΈ Project Structure

ts-ifc-api/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ node/                 # Fastify REST API + WebSocket
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ routes/      # API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ services/    # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ schemas/     # Zod validation
β”‚   β”‚   β”‚   └── types/       # TypeScript types
β”‚   β”‚   └── README.md
β”‚   └── python/              # Flask + Archicad API bridge
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ server.py    # Flask application
β”‚       β”‚   └── archicad/    # Archicad integration
β”‚       └── README.md
β”œβ”€β”€ frontend/                # React web application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/         # TanStack Router pages
β”‚   β”‚   β”œβ”€β”€ components/     # React components
β”‚   β”‚   β”œβ”€β”€ lib/            # WebSocket, i18n, utils
β”‚   β”‚   └── assets/         # Styles and static files
β”‚   └── README.md
β”œβ”€β”€ plugins/
β”‚   β”œβ”€β”€ revit/              # Revit C# plugin (95% complete)
β”‚   β”‚   └── IfcToRevitConverter/
β”‚   β”‚       └── README.md
β”‚   └── archicad/           # Archicad C++ plugin (65% complete)
β”‚       └── ArchiCAD-IFC-Plugin/
β”‚           β”œβ”€β”€ BUILD_INSTRUCTIONS.md
β”‚           └── README.md
β”œβ”€β”€ documentation/          # Fumadocs documentation site
β”‚   β”œβ”€β”€ content/docs/
β”‚   β”‚   β”œβ”€β”€ user-guide/
β”‚   β”‚   β”œβ”€β”€ developer-guide/
β”‚   β”‚   β”œβ”€β”€ plugins/
β”‚   β”‚   └── api/
β”‚   └── README.md
β”œβ”€β”€ scripts/                # Build and setup automation
β”‚   β”œβ”€β”€ setup.bat / setup.sh
β”‚   β”œβ”€β”€ build.bat / build.sh
β”‚   └── start.bat / start.sh
β”œβ”€β”€ BUILD.md               # Detailed build instructions
β”œβ”€β”€ DEPLOY_CHECKLIST.md    # Production deployment guide
└── README.md              # This file

πŸ”§ Technology Stack

Backend

  • Node.js 18+ with TypeScript
  • Fastify 5.6 - Fast web framework
  • Zod 4.1 - Schema validation
  • @fastify/websocket - WebSocket support
  • Axios - HTTP client
  • APS SDK - Autodesk Platform Services

Frontend

  • React 19.2 - UI library
  • TanStack Router 1.133 - File-based routing
  • TanStack Query 5.90 - Server state management
  • Tailwind CSS 4.1 - Styling
  • Vite 7.1 - Build tool
  • React Hook Form + Zod - Form validation
  • Lucide React - Icons

Python Bridge

  • Flask 3.1 - Web framework
  • Archicad 28.3000 - Archicad API

Plugins

  • Revit API 2025.4 + .NET 8.0 (C#)
  • Archicad API DevKit 28.4 + C++17
  • Boost.Beast - WebSocket/HTTP (Archicad)
  • WebSocketSharp - WebSocket server (Revit)

Documentation

  • Fumadocs - Documentation framework (Next.js 15)
  • Code Hike - Code highlighting and annotations
  • MDX - Markdown with React components

🚦 System Status

Component Status Completeness
Backend Node.js βœ… Production Ready 100%
Backend Python ⚠️ Basic 70%
Frontend βœ… Production Ready 100%
Revit Plugin βœ… Nearly Complete 95%
Archicad Plugin ⚠️ In Development 65%
Documentation βœ… Complete 100%

Known Limitations

  • Archicad Plugin: WebSocket not yet implemented (uses HTTP)
  • IFC Validation: Frontend UI exists but backend not implemented
  • Revit Plugin: Export functionality not yet implemented (import only)

🀝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

See BUILD.md for detailed development environment setup.

Areas Needing Help

  • Archicad Plugin WebSocket implementation
  • IFC validation backend
  • Revit Plugin export functionality
  • Unit and integration tests
  • Docker containerization

πŸ“ License

This project is licensed under GPL-3.0 - see LICENSE for more details.

About

This project is a part of my final thesis for my undergraduate Computer Science degree.

About

BIM Interoperability API, written in Typescript

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published