Software Architecture Projects in PakistanSoftware Architecture Projects in Pakistan๐ค AI Contract Assistant
๐ Project Overview
Manual document and contract reviews create massive bottlenecks in corporate compliance and legal workflows. Enterprise teams spend hundreds of hours cross-referencing incoming agreements, submissions, and partner emails against strict organizational rules.
To eliminate this friction, I engineered the AI Contract Assistant. This platform allows organizations to define their business rules, policies, and regulatory compliance standards onceโand automatically reviews all incoming emails, contracts, and applications in real time.
โก Core Workflow
One-Time Rules Setup: Organizations upload internal policy documents, safety guidelines, and legal requirements into a secure vector database.
Automated Ingestion: The system captures incoming emails, PDFs, Word documents, and application files instantly.
AI Rule Validation: The engine cross-references every clause and term against pre-defined rules, generating instant risk reports.
Autonomous Counter-Response:
If Compliant: The AI automatically progresses the application and communicates with the sender.
If Non-Compliant: The AI drafts a precise, itemized report explaining exact violations and required changes.
๐ ๏ธ Key Features
Custom Rule Engine: Define complex legal, pharmaceutical, financial, or internal company guidelines effortlessly.
Smart Multi-Format Parsing: Extracts and processes text from scanned PDFs, .docx files, and raw emails.
Autonomous Email Agent: Handles back-and-forth communication without requiring manual oversight.
Risk Heatmaps & Dashboards: Real-time visual tracking of compliance status, red flags, and missing clauses.
Complete Audit Trail: Full history of every review, rule check, and outgoing response for accountability.
๐ป Tech Stack
Frontend: Next.js, React, TailwindCSS, TypeScript
AI & Orchestration: LangChain, OpenAI GPT-4, LlamaIndex
Vector Database: Pinecone (Multi-tenant architecture)
Backend: Python, FastAPI, Celery
.
.
.
#AIContractAssistant #LegalTech #ArtificialIntelligence #FullStackDeveloper #LangChain #OpenAI #Pinecone #NextJS #PythonDeveloper #FastAPI #AutomatedWorkflows #EnterpriseSaaS #B2BSoftware #ContractAutomation #ComplianceAI #FreelanceDeveloper #ContraHire KovaRisk: When the Interface Knew More Than the System
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The Expert in the Room
Compliance officers don't struggle to understand risk. They struggle to act on it fast enough.
The team behind KovaRisk understood this precisely. They had spent years inside financial institutions watching the same dysfunction repeat: alerts buried in spreadsheets, investigations tracked in email threads, audit trails reconstructed after the fact. They knew
what the interface needed to feel like because they'd lived with the one that didn't.
So they built it. Fast. Exactly as they'd imagined it.
What emerged was sharp: a risk monitoring dashboard with filterable alert feeds, entity profiles with 12-month risk trajectories, a rule engine with toggle controls, and an audit log that felt immutable. The scenario switcher let compliance teams stress-test
different alert load states. The side panel made investigations feel contained and intentional.
It looked like a system that had survived production.
It hadn't been asked to yet.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
What Existed Was a Strong Interface - Not a System
Every alert in KovaRisk was generated at startup. Every risk score was computed by a random seed function. Every status change - Investigating, Resolved, Escalated - lived in component state. Every timeline event was appended to an in-memory array. Every rule toggle
disappeared on refresh.
The audit log recorded nothing. The export downloaded a snapshot of what React was holding at that moment. The entity risk history was a curve drawn from a formula, not a record.
The logic was there. But it had nowhere to live.
A compliance officer investigating a high-risk wire transfer would open the side panel, read the plain-English rule explanation, mark the alert as Investigating, add an internal note - and lose every one of those actions the moment they refreshed the browser. No
colleague could see what they'd done. No regulator could verify it had happened.
In financial compliance, that's not a UX problem. It's a liability.
The prototype validated the workflow brilliantly. It exposed exactly how a compliance team would move through their day. But three things were missing: a source of truth, a coordination layer, and a trail that could be audited under pressure.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
They Didn't Need More Features - They Needed a System Behind the Interface
The team came with a clear idea and a working prototype. What they needed was the architecture that made the prototype a product - the layer that turned interface actions into durable facts.
Not a rebuild. A foundation.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The Layer That Made It Dependable
Data Models: Giving State a Home
The first thing to reconstruct was where the data should actually live.
KovaRisk's frontend implied a clear schema - alerts, entities, rules, audit events - but none of it persisted. The production system needed a PostgreSQL core with five primary entities:
โข Alert โ with foreign keys to Entity, Rule, Transaction, and a JSONB timeline column for ordered event history
โข Entity โ with risk tier, jurisdiction metadata, and a one-to-many relationship to RiskScore snapshots
โข Rule โ with active/disabled state, trigger thresholds, false-positive tracking, and a versioning mechanism so changes to rules didn't retroactively alter historical alerts
โข AuditEvent โ append-only, with actor ID, action type, target reference, and a server-generated timestamp that clients cannot modify
โข InternalNote โ owned by an alert, with authorship and a soft-delete flag to preserve compliance integrity
Every status change, note, escalation, and flag the UI handled ephemerally became a write to this schema.
The Alert Generation Engine: Replacing the Seed Function
In the prototype, 85 alerts appeared because a loop ran 85 times at startup.
In production, alerts are the output of a Transaction Monitoring Service - a background process that runs continuously against incoming transaction streams.
This service:
โข Evaluates each transaction against every active Rule definition
โข Computes a risk score using rule weights, entity risk tier, jurisdiction flags, and behavioral baselines
โข Creates an Alert record only when a threshold is breached
โข Emits an event to a notification queue for high-risk triggers
The rule engine the UI let users toggle wasn't decorative. Each rule mapped to an evaluation function in the monitoring service. Disabling a rule didn't just grey out a card - it removed it from the active evaluation set. Re-enabling it didn't retroactively generate
alerts it would have caught; it resumed from the point of activation. That distinction mattered for regulatory defensibility.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Async Workflows: The Operations the UI Implied But Couldn't Sustain
Several interactions in the prototype implied workflows that couldn't complete synchronously.
Escalation - When an alert was escalated, the UI changed a status badge. In production, escalation triggers a queue job that: notifies the senior compliance officer via a configured channel, creates a case record linking the alert, and starts a response SLA timer.
The UI reflects the outcome - it doesn't produce it.
Scheduled Screening - The Sanctions Screening Match rule in the prototype was static. In production, it's a nightly job that re-screens all active entities against updated OFAC, EU, and UN sanctions lists - generating new alerts if a previously clean entity now
appears. The results feed back into the alert pipeline.
Report Export - The dashboard's Export Report button downloaded a text file of whatever React was holding in memory. In production, report generation is an async job: the user requests the report, the job runs server-side against the live database, and a download
link is returned when ready. The content is a verifiable, timestamped record - not a UI snapshot.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The Audit Log: From Feed to Fact
The prototype's audit log was populated by a generateAuditLog function. It looked comprehensive and immutable. It was neither.
Production audit events are written by the API layer on every state-modifying operation - before the response is returned to the client. The table is append-only. No update operations are permitted on AuditEvent records. Timestamps are server-generated in UTC and
stored with full precision. Actor identity comes from the authenticated session, not from a string the client sends.
The audit log the interface displayed was a simulation of accountability. The production version is the accountability.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tech Stack
1. Frontend: React + Vite, React Router v6, Recharts, React Context + local state, TanStack Query
2. Backend: Node.js + TypeScript, Fastify, Prisma, PostgreSQL, Redis, BullMQ, Passport.js + express-session
3. Infrastructure: AWS ECS / Railway / Render, S3, AWS Secrets Manager / Doppler, Sentry + Datadog, GitHub Actions
4. External Integrations: OFAC / ComplyAdvantage, Refinitiv World-Check, SendGrid / SMTP, Webhooksย
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
From Interface to System
The prototype answered the right questions. It proved the workflow was sound, the information hierarchy was correct, and the alert investigation pattern worked the way compliance officers needed it to.
What it couldn't answer was: what happens when two investigators open the same alert simultaneously? What happens when a rule change needs to take effect immediately across 200 pending alerts? What happens when a regulator asks for every action taken on a specific
entity over the past 18 months?
Those questions don't live in the interface. They live in the system.
KovaRisk's interface was always strong. What it needed was the architecture to make it real - persistent, coordinated, auditable, and defensible under scrutiny.
The logic existed from the beginning. We gave it somewhere to live.
I just completed a production-ready AI Lead Generation Agent designed to automate how businesses discover, verify, and export qualified leads across multiple data sources.
This system replaces manual lead hunting with an intelligent, filter-driven pipeline that aggregates business data, verifies contact information, and delivers CRM-ready outputs in real time.
๐ What this agent does:
โข Searches businesses by location, industry, and keywords
โข Aggregates data from Yellow Pages, Google Maps (API-ready), and extensible sources
โข Applies smart filters (company size, founding date, industry relevance)
โข Automatically verifies emails, phones, and websites
โข Deduplicates leads for clean datasets
โข Exports structured CSVs for sales & marketing teams
โข Supports real-time queries via a FastAPI backend
โข Schedules daily exports and weekly reports
๐ง Tech Stack Highlights:
โข Python + FastAPI (async, high-performance backend)
โข Selenium-based scraping with anti-bot handling
โข Modular lead source orchestration
โข Glassmorphism UI with real-time search
โข CSV-based persistence (lightweight & scalable)
This project was built with real business use cases in mind โ sales pipelines, outreach automation, and scalable lead discovery โ not just experimentation.
๐ฅ Full walkthrough video:
๐
Iโm actively building and sharing end-to-end AI systems focused on automation, data intelligence, and real-world impact.
hashtag#AI (https://www.linkedin.com/search/results/all/?keywords=%23ai&origin=HASH_TAG_FROM_FEED) hashtag#ArtificialIntelligence (https://www.linkedin.com/search/results/all/?keywords=%23artificialintelligence&origin=HASH_TAG_FROM_FEED) hashtag#LeadGeneration (https://www.linkedin.com/search/results/all/?keywords=%23leadgeneration&origin=HASH_TAG_FROM_FEED) hashtag#Automation
(https://www.linkedin.com/search/results/all/?keywords=%23automation&origin=HASH_TAG_FROM_FEED)hashtag#SoftwareEngineering (https://www.linkedin.com/search/results/all/?keywords=%23softwareengineering&origin=HASH_TAG_FROM_FEED) hashtag#FastAPI (https://www.linkedin.com/search/results/all/?keywords=%23fastapi&origin=HASH_TAG_FROM_FEED) hashtag#WebScraping
(https://www.linkedin.com/search/results/all/?keywords=%23webscraping&origin=HASH_TAG_FROM_FEED)hashtag#SaaS (https://www.linkedin.com/search/results/all/?keywords=%23saas&origin=HASH_TAG_FROM_FEED) hashtag#Startup (https://www.linkedin.com/search/results/all/?keywords=%23startup&origin=HASH_TAG_FROM_FEED) hashtag#Entrepreneurship
(https://www.linkedin.com/search/results/all/?keywords=%23entrepreneurship&origin=HASH_TAG_FROM_FEED)hashtag#TechProjects (https://www.linkedin.com/search/results/all/?keywords=%23techprojects&origin=HASH_TAG_FROM_FEED) hashtag#AIProjects (https://www.linkedin.com/search/results/all/?keywords=%23aiprojects&origin=HASH_TAG_FROM_FEED) hashtag#BuildInPublic
(https://www.linkedin.com/search/results/all/?keywords=%23buildinpublic&origin=HASH_TAG_FROM_FEED)hashtag#BusinessGrowth (https://www.linkedin.com/search/results/all/?keywords=%23businessgrowth&origin=HASH_TAG_FROM_FEED) hashtag#SalesTech (https://www.linkedin.com/search/results/all/?keywords=%23salestech&origin=HASH_TAG_FROM_FEED) hashtag#B2B (https://www.linkedin.com/search/results/all/?keywords=%23b2b&origin=HASH_TAG_FROM_FEED) AI Vision for Retail, Industrial & Monitoring Workflows
Overview
I have built and deployed multiple real-world computer vision systems for industrial inspection, retail automation, and monitoring workflows.
My responsibilities covered:
๐น Dataset preparation and labeling
๐น Object detection model training
๐น Segmentation model training
๐น YOLO-based detection and tracking
๐น Image/video inference pipeline development
๐น Model evaluation and threshold tuning
๐น Production deployment support
๐น Cloud server management and optimization
๐น Building practical AI workflows for real-world operational environments
Fish Quality Inspection System - lythium.cl (http://lythium.cl)
I led the development of an advanced fish quality inspection solution for an industrial workflow.
The system used image analysis to monitor fish quality and support automated fish sorting based on AI predictions.
๐น Led the development of an advanced AI-powered fish quality inspection system for an industrial workflow.
๐น Built an image analysis pipeline to monitor fish quality from production-line images.
๐น Trained object detection models to identify fish and relevant visual quality indicators.
๐น Trained segmentation models to support more detailed visual inspection of fish regions.
๐น Designed the AI workflow to support automated fish sorting based on model predictions.
๐น Worked on inspection logic that could classify or route fish based on quality-related outputs.
๐น Designed the system for conveyor-belt usage, where images need to be processed consistently and reliably.
๐น Focused on production issues such as image quality, camera consistency, lighting variation, and model reliability.
๐น Helped convert visual inspection from a manual/rule-based workflow into an AI-supported inspection pipeline.
๐น Built the system to reduce manual inspection effort and improve production workflow efficiency.
Shelfr.ai (http://Shelfr.ai) - Retail Automation Platform
I developed AI image solutions for retail automation and execution. The system handled large-scale product detection across 10,575+ SKUs, price tag detection, shelf and display type detection, and gap detection for empty shelf spaces.
๐น Developed large-scale AI image solutions for retail automation and execution.
๐น Worked on product detection across 10,575+ SKUs, where each SKU represented a unique product.
๐น Built object detection workflows to identify products from retail shelf images.
๐น Developed price tag detection to locate and extract price label areas from store images.
๐น Worked on shelf and display type detection to understand the retail environment layout.
๐น Built gap detection logic to identify empty shelf spaces and out-of-stock areas.
๐น Supported computer vision workflows for retail compliance, shelf monitoring, and store execution.
๐น Worked with high-volume image data and production-level inference requirements.
๐น Managed high-load production servers on Google Cloud Platform.
๐น Implemented load balancing and autoscaling to improve system stability under production traffic.
๐น Focused on scalable AI infrastructure capable of handling real-world retail image workloads.
๐น Helped create AI systems for inventory visibility, shelf condition monitoring, and retail execution analytics.
lake-shield.com (http://lake-shield.com) - USA LAKES - Boat Detection & Inspection System
๐น Worked on a YOLO-based boat detection, tracking, and monitoring system.
๐น Labeled datasets for boat detection and inspection model training.
๐น Prepared image/video data for object detection training workflows.
๐น Trained YOLO object detection models to detect boats in monitoring footage.
๐น Built a detection pipeline capable of identifying boats from visual data. ๐น Worked on boat tracking logic to monitor boat movement across frames. ๐น Supported inspection and monitoring workflows using computer vision predictions.
๐น Developed an end-to-end pipeline from labeled data to trained model and inference output.
๐น Focused on practical model performance in outdoor environments where lighting, distance, angle, and background can vary.
๐น Helped build a monitoring system that could support automated detection and review instead of fully manual observation.
My Responsibilities Across These Projects
๐น Led AI/computer vision system development
๐น Designed labeling and dataset preparation workflows
๐น Trained YOLO/object detection models
๐น Trained segmentation models where needed
๐น Built image and video inference pipelines
๐น Evaluated models using practical production metrics
๐น Improved model performance through dataset cleanup, retraining, and threshold tuning
๐น Integrated AI models into backend or operational workflows
๐น Supported production deployment and infrastructure optimization
๐น Worked with real-world constraints such as lighting, camera angle, image quality, latency, and false detection rates
Technologies Used
๐น Python ๐น YOLO / YOLOv8 ๐น Object Detection ๐น Image Segmentation ๐น OpenCV ๐น PyTorch ๐น FastAPI ๐น Google Cloud Platform ๐น Linux Servers ๐น Load Balancing ๐น Autoscaling ๐น Custom Data Labeling Workflows ๐น Model Training ๐น Model Evaluation ๐น Inference Pipeline Development ๐น Production AI Deployment