AI Architect

AI project-management platform for architecture firms, with a RAG assistant grounded in Italian building regulations

// At a glance

Problem

Architects needed a way to track projects, estimate costs, and get fast, accurate answers about Italian building regulations (CILA, SCIA, Permesso di Costruire) without digging through scattered documents.

Solution

Built a production RAG pipeline from scratch: document ingestion (PDF/DOCX), OpenAI embeddings stored in PostgreSQL/pgvector, and a custom multi-tool LangChain agent (OpenAI Functions, Zod-typed tools) that answers questions grounded in each projects documents and regulatory content, plus AI-assisted cost estimation with structured breakdowns.

// Key highlights

  • Production RAG pipeline built from scratch: embeddings, pgvector schema/indexing, and configurable-threshold similarity search
  • Custom multi-tool LangChain agent with Zod-typed function-calling tools, not a wrapper around a hosted assistant API
  • Real-world document ingestion (PDF/DOCX parsing, classification, extraction) feeding directly into the vector store
  • AI-powered construction cost estimation with structured cost breakdowns
  • Full deployment story: Docker Compose, Nginx, GitHub Actions CI/CD, role-based access, and EN/IT/FR i18n

An AI-powered project management platform for architectural firms, built for AC Architettura. It centralizes project tracking, cost estimation, and document handling while giving architects, admins, and clients an AI assistant that understands Italian building regulations (CILA, SCIA, Permesso di Costruire) and can answer questions grounded in each project's own documents.

Tech Stack

  • Frontend: Next.js 14 (App Router), React 18, TypeScript, TailwindCSS, Zustand (state), TanStack React Query, next-intl (i18n)
  • Backend: Node.js, Express, JWT-based auth, bcrypt
  • AI / RAG: LangChain (langchain, @langchain/core, @langchain/openai), OpenAI API (chat + embeddings), custom AgentExecutor with DynamicStructuredTool function-calling tools
  • Database: PostgreSQL 16 with the pgvector extension for vector similarity search; Supabase JS client
  • Document processing: pdf-parse, mammoth (Word docs), Multer for uploads, Google Drive API integration
  • Infra: Docker, Docker Compose, Nginx reverse proxy, GitHub Actions CI/CD
  • Testing: Jest

Key Features

  • AI assistant with retrieval-augmented answers over uploaded project documents and Italian regulatory content
  • Multi-tool AI agent (document search, cost estimation helpers, extraction tools) orchestrated via LangChain's OpenAI Functions agent
  • Automated document classification and data extraction from PDFs/Word files
  • AI-powered construction cost estimation with structured cost breakdowns (construction, professional fees, permits, contingency)
  • Project management dashboard with status/timeline tracking per project
  • Multi-role access control: Admin, Architect, Client
  • Multilingual UI (English, Italian, French) via next-intl
  • Google Drive integration for document storage/sync
  • Token usage tracking for AI API cost monitoring

Architecture

The system is a decoupled monorepo (frontend and backend can also be split into separate repos for independent deployment). The Express backend exposes REST routes (auth, projects, documents, conversations, AI) protected by JWT middleware, and a dedicated LangChainAgentService wraps an OpenAI Functions agent with custom tools — one of which performs semantic search: it embeds the user's query with OpenAI, then runs a cosine-distance (<=>) query against a vector(1536) column in PostgreSQL/pgvector, with an optional per-project filter and score-boosting logic. Extracted document text and metadata are persisted alongside embeddings so the agent can cite project-specific regulatory and cost data. The Next.js frontend consumes the API via React Query/Axios and Zustand for client state. The stack ships as Docker services behind Nginx, with GitHub Actions handling automated deploys to a VPS.

My Role

  • Designed and implemented a production RAG pipeline from scratch: embedding generation, pgvector schema/indexing, similarity search with configurable thresholds, and tool-calling agent orchestration (not a wrapper around a hosted assistant API)
  • Built a custom multi-tool LangChain agent rather than a single prompt — tools are dynamically structured with Zod schemas for reliable function-calling
  • Handled real-world document ingestion (PDF/DOCX parsing, classification, extraction) feeding directly into the vector store
  • Implemented token usage tracking for cost observability on LLM calls
  • Delivered a full deployment story (Docker Compose, Nginx, GitHub Actions, monorepo-or-split-repo flexibility) suitable for a real client rollout, plus role-based access and i18n for a multinational user base

Have a project in mind?

Let's build something great together.

Tell me what you need and I'll get back to you with a clear, honest estimate.

HassanOSSYS-00
SECURE CHANNEL · ACTIVE
INIT://