Metadata-Version: 2.4
Name: openconstructionerp
Version: 11.3.0
Summary: Open-source construction cost estimation, multi-currency BOQ, AI vector matching, CAD/BIM takeoff without IfcOpenShell, resource-based cost DB import with example templates, 48 regional catalogues, 27 languages. AGPL-3.0. After install, run: openconstructionerp
Project-URL: Homepage, https://datadrivenconstruction.io/erp
Project-URL: Documentation, https://openconstructionerp.com/docs
Project-URL: Repository, https://github.com/datadrivenconstruction/OpenConstructionERP
Project-URL: Issues, https://github.com/datadrivenconstruction/OpenConstructionERP/issues
Project-URL: Changelog, https://github.com/datadrivenconstruction/OpenConstructionERP/blob/main/CHANGELOG.md
Author-email: Artem Boiko <info@datadrivenconstruction.io>
Maintainer-email: Data Driven Construction <info@datadrivenconstruction.io>
License-Expression: AGPL-3.0-or-later
Keywords: ERP,bim,boq,construction,construction-management,cost-estimation,cwicr,din276,dxf,estimation,gaeb,ifc,openconstructionerp,takeoff
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.12
Requires-Dist: alembic<2,>=1.14.0
Requires-Dist: asyncpg>=0.30.0
Requires-Dist: bcrypt>=4.0.0
Requires-Dist: defusedxml>=0.7.1
Requires-Dist: duckdb<2,>=1.2.0
Requires-Dist: email-validator>=2.1.0
Requires-Dist: ezdxf>=0.18.0
Requires-Dist: fastapi<1,>=0.116.0
Requires-Dist: hijridate>=2.5.0
Requires-Dist: httpx<1,>=0.28.0
Requires-Dist: itsdangerous>=2.1.0
Requires-Dist: laspy>=2.5.0
Requires-Dist: lazrs>=0.6.0
Requires-Dist: opencv-python-headless>=4.10.0
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: orjson>=3.10.0
Requires-Dist: pandas<3,>=2.2.0
Requires-Dist: pdfplumber>=0.11.0
Requires-Dist: pixeltable-pgserver<0.6,>=0.5.1
Requires-Dist: psycopg2-binary>=2.9.10
Requires-Dist: pyarrow<25,>=23.0.1
Requires-Dist: pycollada>=0.8
Requires-Dist: pydantic-settings<3,>=2.6.0
Requires-Dist: pydantic<3,>=2.10.0
Requires-Dist: pymupdf>=1.25.0
Requires-Dist: pypdf>=4.0.0
Requires-Dist: python-dateutil>=2.9.0
Requires-Dist: python-jose[cryptography]>=3.3.0
Requires-Dist: python-multipart>=0.0.27
Requires-Dist: pyyaml>=6.0
Requires-Dist: rapidfuzz>=3.0.0
Requires-Dist: reportlab>=4.0.0
Requires-Dist: simpleeval>=0.9.13
Requires-Dist: sqlalchemy[asyncio]<2.1,>=2.0.36
Requires-Dist: structlog>=24.4.0
Requires-Dist: trimesh>=4.0.0
Requires-Dist: uvicorn[standard]<1,>=0.32.0
Provides-Extra: ai
Requires-Dist: flagembedding>=1.3.0; extra == 'ai'
Requires-Dist: polars>=1.0.0; extra == 'ai'
Requires-Dist: qdrant-client>=1.12.0; extra == 'ai'
Requires-Dist: sentence-transformers>=3.3.0; extra == 'ai'
Provides-Extra: all
Requires-Dist: aioboto3>=12.0.0; extra == 'all'
Requires-Dist: boto3>=1.35.0; extra == 'all'
Requires-Dist: celery[redis]>=5.4.0; extra == 'all'
Requires-Dist: fastembed>=0.4.0; extra == 'all'
Requires-Dist: flagembedding>=1.3.0; extra == 'all'
Requires-Dist: lancedb>=0.17.0; extra == 'all'
Requires-Dist: paddleocr>=2.9.0; extra == 'all'
Requires-Dist: pillow>=12.1.1; extra == 'all'
Requires-Dist: polars>=1.0.0; extra == 'all'
Requires-Dist: pye57>=0.4.0; extra == 'all'
Requires-Dist: qdrant-client>=1.12.0; extra == 'all'
Requires-Dist: sentence-transformers>=3.3.0; extra == 'all'
Provides-Extra: analytics
Provides-Extra: cv
Requires-Dist: paddleocr>=2.9.0; extra == 'cv'
Requires-Dist: pillow>=12.1.1; extra == 'cv'
Provides-Extra: dev
Requires-Dist: factory-boy>=3.3.0; extra == 'dev'
Requires-Dist: httpx>=0.28.0; extra == 'dev'
Requires-Dist: lxml>=5.0.0; extra == 'dev'
Requires-Dist: mypy>=1.13.0; extra == 'dev'
Requires-Dist: pre-commit>=4.0.0; extra == 'dev'
Requires-Dist: pyinstaller>=6.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
Requires-Dist: pytest-split>=0.8.2; extra == 'dev'
Requires-Dist: pytest-timeout>=2.3.0; extra == 'dev'
Requires-Dist: pytest-xdist>=3.5.0; extra == 'dev'
Requires-Dist: pytest>=8.3.0; extra == 'dev'
Requires-Dist: ruff==0.15.20; extra == 'dev'
Provides-Extra: pointcloud
Requires-Dist: pye57>=0.4.0; extra == 'pointcloud'
Provides-Extra: s3
Requires-Dist: aioboto3>=12.0.0; extra == 's3'
Provides-Extra: semantic
Requires-Dist: flagembedding>=1.3.0; extra == 'semantic'
Requires-Dist: polars>=1.0.0; extra == 'semantic'
Requires-Dist: qdrant-client>=1.12.0; extra == 'semantic'
Requires-Dist: sentence-transformers>=3.3.0; extra == 'semantic'
Provides-Extra: server
Requires-Dist: boto3>=1.35.0; extra == 'server'
Requires-Dist: celery[redis]>=5.4.0; extra == 'server'
Provides-Extra: vector
Requires-Dist: fastembed>=0.4.0; extra == 'vector'
Requires-Dist: lancedb>=0.17.0; extra == 'vector'
Description-Content-Type: text/markdown

# OpenConstructionERP

Open-source construction cost estimation: BOQ, cost matching, CAD/BIM takeoff.

> ### After `pip install`, type one command: **`openconstructionerp`**
>
> That's the only thing you need to remember. It prints a welcome,
> asks you to **press `o` + Enter** to open the app in your browser, then
> starts the server at **http://127.0.0.1:8080** (and shows a login).

---

## Install

```bash
pip install openconstructionerp
```

Python 3.12+ required. No Docker, no separate PostgreSQL, no Redis. An embedded PostgreSQL database is bundled and starts on its own.

## First run

```bash
openconstructionerp
```

This single command:

1. Starts an embedded PostgreSQL database in your home data folder (no Docker, nothing to install)
2. Seeds demo data (projects, BOQs, cost catalogues)
3. Starts the API and UI at **http://127.0.0.1:8080**
4. Prints demo login credentials

No config files. No environment variables. It just works.

> **If `openconstructionerp` is not found** right after install, pip most likely
> put the launcher in a Scripts folder that is not on your PATH (this is common
> on Windows). Run it through Python instead. This works from any folder and is
> the exact same app:
>
> ```bash
> python -m openconstructionerp
> ```

## Subsequent runs

```bash
openconstructionerp
```

Same command every time. Your data persists between runs.

## Other commands

```bash
openconstructionerp init-db    # create the local database
openconstructionerp serve      # start the server
openconstructionerp doctor     # health check if anything looks wrong
openconstructionerp welcome    # re-print the welcome screen
```

## CLI reference

```bash
openconstructionerp serve   [--host HOST] [--port PORT] [--data-dir DIR] [--open] [--quiet]
openconstructionerp init-db [--data-dir DIR]    # Create the local database + data dirs
openconstructionerp doctor  [--port PORT]       # Run installation health checks
openconstructionerp seed    [--demo]            # Load demo project data
openconstructionerp version                     # Show version
```

## What you get

- **BOQ editor**: hierarchical bill of quantities with assemblies, formulas, multi-currency
- **Cost database**: import your own rates (Excel/CSV) or use the bundled example templates
- **Cost matching**: vector search matches line items to historical cost data
- **CAD/BIM takeoff**: quantities from DWG/DXF and IFC/RVT (via DDC, no IfcOpenShell)
- **4D / 5D**: cost-loaded schedule, earned value (SPI/CPI), cash-flow, what-if scenarios
- **Validation**: DIN 276, GAEB, NRM, MasterFormat rule packs flag issues at import
- **Reporting**: PDF/Excel exports, dashboards, BCF issue exchange

## Configuration (optional)

Everything works with zero config. To customise, pass flags or set environment variables:

```bash
openconstructionerp serve --port 9000 --data-dir /var/lib/oce

# Or via environment:
DATABASE_URL=postgresql+asyncpg://user:pass@host/db   # Use an external PostgreSQL instead of the embedded one
OE_CLI_PORT=9000                                       # Change the port
OE_CLI_DATA_DIR=/var/lib/oce                           # Change the data location
```

## Development

The backend is a Python 3.12+ FastAPI application (Pydantic v2, async SQLAlchemy). PostgreSQL is the only supported database. For local development an embedded PostgreSQL (pixeltable-pgserver) runs in-process, so there is no Docker and no separate database server to install for a basic run. SQLite is not supported and was removed in v6.6.0. Leave `DATABASE_URL` unset to use the embedded server, or set it to point at an external PostgreSQL.

### Set up

```bash
cd backend
python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
```

### Run the dev server

The simplest way is the CLI, which starts the embedded database, seeds demo data, and serves the API together with the built UI:

```bash
openconstructionerp serve --port 8080
```

To run just the API with autoreload against the app factory:

```bash
uvicorn app.main:create_app --factory --reload --port 8000
```

Interactive API docs are then at http://localhost:8000/api/docs and the raw OpenAPI schema at http://localhost:8000/api/openapi.json. See `docs/api/README.md` for the full HTTP API guide.

### Tests

```bash
cd backend
pytest                    # whole suite
pytest tests/unit         # unit tests only
pytest -k boq             # a subset by keyword
```

Tests run with pytest and pytest-asyncio (`asyncio_mode = auto`). The suite runs serially against one PostgreSQL database that the test harness provisions when the tests load.

### Formatting and linting

Code style is enforced with ruff (line length 120, target `py312`). Format and lint before committing:

```bash
ruff format .
ruff check .
```

The lint rule set is `E, F, W, I, N, UP, B, A, C4, PT, RET, SIM`. The exact configuration lives in `backend/pyproject.toml`.

## Links

- Docs: https://openconstructionerp.com
- Issues: https://github.com/DataDrivenConstruction/OpenConstructionERP/issues
- Source: https://github.com/DataDrivenConstruction/OpenConstructionERP

## License

AGPL-3.0-or-later. Commercial licensing available, contact info@datadrivenconstruction.io
