Behairy Consulting Engineering (BCE) has run bridge, residential, industrial, and administration projects out of Cairo since 1970. Before this, project costs, client invoices, and documents lived across spreadsheets and paper. I designed and built a single internal platform that gives everyone — from the CEO to a junior engineer — exactly the access they need, a full paper trail on every cost, and native support for Egyptian tax rules.
A 50-year-old engineering firm's entire operation — projects, costs, invoices, staff, backups — now runs on one system instead of scattered spreadsheets and paper trails.
BCE is a global engineering and project-management firm, privately owned and based in Dokki, Cairo, operating since 1970. Their public work spans bridges, residential developments, industrial facilities, and administration buildings — the internal platform below is the software that runs their business behind that work: costs, invoices, staff, and client records, not the buildings themselves.
Visit bce-eg.com ↗50 years of records, scattered across files
11 apps, one data & permission layer
Real-time, role-scoped, always current
A 50-year-old engineering and project-management firm — with decades of bridge, residential, industrial, and administration work behind it — was still running day-to-day operations on spreadsheets and paper trails. Project costs, client invoices, and staff assignments were scattered across files with no single source of truth, no permission model, and no way to see a project's real financial picture without manually reconstructing it.
A full Django platform — eleven connected apps covering projects, clients, cost tracking, invoicing, task management, and file storage — gated by a five-tier role system (CEO, Senior, Accountant, Team Lead, Junior) plus a granular per-URL permission layer for one-off exceptions. It's deployed on a self-hosted Windows server converted to run Docker, with WebSocket support for live updates and a full backup/disaster-recovery system underneath it.
BCE isn't one feature — it's eleven Django apps sharing the same data and permission layer. A few of the more involved ones got their own full write-ups, linked below.
Clients, their contacts, and every project — status workflow across ten states (Draft → Under Study → Assigned → In Progress → Completed), department tags (Structural/Electrical/Architecture/Mechanical), and per-scope fee structures (Review/Design/Workshop/Supervision/R&D).
A hierarchical cost-category tree with versioned, SHA-256-hashed cost-file attachments and budget-threshold alerts, paired with invoicing that auto-generates sequential numbers (INV-YYMM-####), tracks partial payments, and auto-updates status between Partial, Closed, and Overdue. Built-in fields for Egyptian e-invoicing. Both apps share the same file-versioning signal, so an updated document never leaves a stale reference behind.
Full case study →Project assignments by type (Senior/Team Lead/Junior) with live session tracking — accept, pause, resume, complete — and a correction system that logs who changed what and why, with the original hours preserved.
Shared todo lists scoped to a project, client, or assignment, with @mentions of users, projects, clients, or assignments, threaded comments, labels, and its own notification events for shares and mentions.
A polymorphic folder tree (attached to either a project or a client) seeded from a standard BCE template — Financial / Discipline (ARCH, STR, ELEC, MECH, each split into IN/WIP/OUT) / Administrative — with JSON-defined role access per folder type.
Full case study →One-click, print-ready PDF profile sheets per project — or bulk-exported for several at once — built around WeasyPrint's layout quirks, plus scheduled reports and export history in the dashboard app.
Full case study →Separate database and media backups, tied together by a restore point that can restore either or both — always taking an automatic safety backup first, with CEO approval required before it runs.
Full case study →One model covering assignment events, invoice events, and todo events, each rendering a type-specific title, message, and action link — read/unread state tracked per recipient.
Compose and export emails as .msg files, deliberately without a send button — internal logging links an email to a project without it ever leaving an audit trail gap.
Beyond the five role tiers, every URL in the system can be individually granted or denied per user — with an expiry date and a full audit log of who changed what, and why.
This is pulled directly from the URL permission map — the actual per-view, per-role defaults, not a rough summary. Five tiers, each enforced identically across every module above.
The Accountant row is the interesting one: no project or assignment access at all, but the only role besides CEO with the unrestricted financial report — Senior gets a deliberately limited version of the same page. It's a pure finance specialist role, not a junior CEO.
The real relationships between the core models, grouped by what they actually do — core records, day-to-day operations, financial data, and system-level backup — with solid lines as foreign keys and dashed lines as cross-app references. Backup and recovery sit apart deliberately: they operate on the whole system, not a single project.
Clients, projects, costs, invoices, assignments, and todos as connected Django models — the single source of truth everything else builds on.
Five permission tiers set the defaults; a separate per-URL permission model lets any single user be granted or denied access to any single view, with an expiry date and an audit trail.
Invoice numbers and payment status generate themselves; profile sheets and financial reports export with one click; every cost file attachment carries its own approval and version history.
The server itself started as a Windows PC, converted to run the full stack in Docker — Nginx, Gunicorn, PostgreSQL, Redis, Celery, and Daphne for WebSockets — after migrating off an earlier Waitress/WhiteNoise setup that kept crashing under load.
This isn't a demo project — it's the system a real, 50-year-old engineering firm runs its actual business on, every day. That changes what "finished" means: it's not about shipping a feature, it's about a CEO trusting the numbers enough to make payroll decisions from them.