Technical Highlights
Key technical challenges and the solutions I implemented.
Three-Layer Tenant Isolation
Context: Agentech Assistant
In a multi-tenant RAG platform every business uploads private documents into shared infrastructure. A single missed filter on any query path — a SQL join, a vector search, a cached embedding — leaks one client's internal data into another client's chat answers. Enforcing that only in application code means one forgotten WHERE clause is a breach.
Enforced isolation in three independent layers so no single mistake is sufficient to cause a leak: tenant and account context at the application layer, PostgreSQL Row-Level Security on every tenant- and account-scoped table, and payload filtering at the Qdrant vector layer so embeddings are partitioned per tenant. Built on a Spring Boot 4.0 and Spring Modulith modular monolith with an async Postgres-backed ingestion queue.
100% of replies are tenant-isolated and citation-backed. Because the database and the vector store enforce isolation independently of application code, a missed check in any one layer still cannot expose another tenant's data.
Native Image Compression & Streaming
Context: 3arabawy App
Extracting bytes via readAsBytes() pulled heavy visual files directly onto the Dart heap, where decoding 8MB JPEGs into uncompressed bitmaps consumed 50MB–100MB of RAM per file, leading to OOM crashes and UI thread blocking.
Refactored the image pipeline to use dart:ui for native sizing and FlutterImageCompress for path-based native encoding. Substituted Uint8List tracking with native file paths and transitioned to file streaming via Dio's MultipartFile.fromFile.
Reduced RAM usage by ~98% (from 500MB to <5MB for 10 images), eliminated OOM crashes, and restored a stable 120 FPS by moving processing to native C++/Objective-C sub-workers.
Grounded Answers with Citations
Context: Agentech Assistant
A general-purpose language model answers support questions confidently from its training data, inventing pricing, policy and product details that were never in the client's documents. For a customer-facing support bot, a fluent wrong answer is worse than no bot at all, and there is no way for the customer to tell the difference.
Constrained generation to retrieval over the tenant's own uploaded content only — PDF, Word, PowerPoint, CSV, Excel, JSON, live URLs, images and audio — automatically extracted, chunked, embedded and vectorized through an async ingestion queue, with every answer streamed back attached to the source passage it came from.
80% of tier-1 support tickets deflected, answered 24/7 across 6+ ingested source types, with 100% of replies carrying a citation the customer can open and check.
Deterministic Quiz Randomization
Context: GuruHub Educational Platform
Quiz questions needed to be randomized per student attempt while ensuring fairness and reproducibility. A naive shuffle would produce different orderings on each access, breaking consistency.
Used seeded randomness (Collections.shuffle with a Random seeded by attemptId) so each attempt always generates the same question order. To address the hidden risk of instructors modifying questions mid-attempt, we blocked structural changes to any quiz with active in-progress attempts.
Quiz randomization is deterministic per attempt, and in-progress students are protected from structural changes — guaranteeing fairness, reproducibility, and data integrity without snapshot duplication.
Device Lifecycle Management
Context: GuruHub Educational Platform
Students were restricted to one device, but when they changed or lost their phones, they had to contact the admin directly to regain access. This worked at small scale, but with thousands of users it became chaotic and unmanageable.
Instead of removing the restriction, we redesigned it into a proper lifecycle. Devices were registered with metadata, refresh tokens were bound to device identifiers, and a device reset request flow was introduced where students submit a reason and admins approve or reject with full context.
Single-device enforcement remained strict, but the process became scalable, auditable, and no longer dependent on manual back-and-forth communication.
Installer Source Detection
Context: Mobile Infrastructure
During force updates, users were redirected to the wrong store due to manufacturer-based detection logic.
Replaced manufacturer-based detection with installation source detection using actual installer information.
Resolved incorrect routing, ensuring users reach the correct store regardless of device brand.
Arabic Search Normalization
Context: 3arabawy App
Multiple Unicode representations caused incorrect search results.
Normalized Arabic characters and removed diacritics.
Accurate and consistent Arabic search behavior.
Pagination Optimization
Context: 3arabawy App
Severe performance drops on low-end devices due to heavy blur rendering.
Removed heavy blur rendering from list views.
Significant scrolling performance improvement.
Device Orientation Detection
Context: Party Player App
UI locked in portrait mode while video required automatic landscape full-screen.
Developed native Flutter plugin using accelerometer and motion sensors to detect real-time orientation.
Accurate full-screen transitions without changing system rotation settings.