[{"content":"Navigating dietary restrictions like Celiac disease internationally is a high-stakes challenge. Traditional translation utilities often fall short when dealing with niche technical terminology or hidden allergen variants (such as wheat-based shoyu or barley-derived cross-contaminants common in foreign food processing).\nTo solve this, I designed and developed a native iOS application built entirely in Swift. The app functions as a 100% client-side safety net, combining structured digital allergen cards with real-time text parsing, automated location-based localization, and fallback phrase generation—engineered to work flawlessly without cellular data or an internet connection.\n🛠 Core Feature Implementation 1. Offline \u0026amp; Real-Time Camera Scanning To parse foreign ingredient lists on physical product packaging, the app implements an on-device Optical Character Recognition (OCR) pipeline.\n* **The Architecture:** Powered by Apple’s Vision Framework (`RecognizeTextRequest`), the app captures high-frequency camera frames via AVFoundation.\n* **Technical Execution:** It utilizes the engine\u0026rsquo;s accurate recognition path, mapping localized multi-line bounding boxes into string sequences. Text normalization strips filler descriptions, allowing the app to scan text strings against localized arrays of blacklisted terms instantly.\n2. Location-Aware Dynamic Localization To remove friction when traveling across borders, the app automates language selection based on physical location.\n* **The Architecture:** Powered by CoreLocation and reverse-geocoding APIs.\n* **Technical Execution:** The app queries the device\u0026rsquo;s GPS coordinates entirely on-device to determine the current country ISO code. If the user crosses into Germany, for instance, the application instantly flags the shift and defaults the primary scanning dictionaries, phrase models, and allergen cards to German without manual configuration.\n3. On-Device AI Phrase Generation \u0026amp; Text-to-Speech When dynamic communication is necessary outside of pre-made templates, the app relies on a lightweight, privacy-focused client-side language engine with acoustic feedback.\n* **The Architecture:** Leveraging locally run translation utilities and contextual dictionary models, users can generate conversational phrases asking waitstaff about cooking environments, shared fryers, or ingredient substitutions.\n* **Technical Execution:** To ensure the message is conveyed clearly in noisy restaurant environments, the app feeds the translated output directly into Apple\u0026rsquo;s AVFAudio framework (`AVSpeechSynthesizer`), rendering high-fidelity, native Text-to-Speech (TTS) audio in the target locale\u0026rsquo;s accent.\n4. Allergen Card Creation \u0026amp; Dynamic Data Mapping The foundational safety tool of the app allows users to create high-contrast, customizable medical/allergen declarations.\n* **The Architecture:** User profiles and custom card presets are persistent, managed via SwiftData.\n* **Technical Execution:** Cards dynamically adapt to the target locale\u0026rsquo;s language and cultural phrasing. Rather than using direct literal translation (which can dilute the severity of a medical condition), the system maps selected allergens to explicit, pre-vetted linguistic definitions indicating zero-tolerance for contamination.\n🧠 Major Engineering Challenges Solved The Challenge: Bounding Box Mapping \u0026amp; Multi-line OCR Noise During early testing, vertical ingredient layouts (such as traditional column layouts found on Japanese packaging) broke standard left-to-right text parsers, fracturing key compound kanji strings and missing allergen warnings entirely.\nThe Solution I built a geometric sorting layer directly on top of the Vision observations. By grouping text fragments into contextual rows and columns based on their layout bounding box origins before passing strings to the allergen matcher, parsing reliability jumped dramatically—eliminating dangerous false-negatives on dense, multi-column labels.\n📈 Impact \u0026amp; Technical Takeaways Building this application reinforced the power of leveraging Apple\u0026rsquo;s native hardware-accelerated frameworks. By keeping the scanning, database querying (SwiftData), GPS localization, and audio phrase-mapping entirely on-device, the app achieves sub-100ms processing times, preserves battery health on the go, and guarantees absolute utility in remote regions where connectivity drops to zero.\n","permalink":"https://notdomquanmbs.github.io/posts/2026-07-06-project-allergen-card-translation-app/","summary":"\u003cp\u003eNavigating dietary restrictions like Celiac disease internationally is a high-stakes challenge. Traditional translation utilities often fall short when dealing with niche technical terminology or hidden allergen variants (such as wheat-based shoyu or barley-derived cross-contaminants common in foreign food processing).\u003c/p\u003e\n\u003cp\u003eTo solve this, I designed and developed a native iOS application built entirely in Swift. The app functions as a 100% client-side safety net, combining structured digital allergen cards with real-time text parsing, automated location-based localization, and fallback phrase generation—engineered to work flawlessly without cellular data or an internet connection.\u003c/p\u003e","title":"Project: Allergen Card \u0026 Translation App"},{"content":"Executive Summary For this project, I built a fully offline, privacy-focused AI coding assistant tailored specifically for Swift development. Base AI models often lack the newest programming rules, I used a Retrieval-Augmented Generation (RAG) pipeline to feed the AI static, up-to-date Swift developer guides. This allowed me to safely bridge the gap between hardware constraints and the need for accurate, current coding assistance.\nHardware Architecture Running a Retrieval-Augmented Generation (RAG) pipeline locally requires balancing compute power with strict memory constraints. The foundation of this localized AI environment relies on consumer-grade hardware optimized for parallel processing:\nCompute / CPU: Intel Core i7-12700K (Ensures rapid document embedding and preprocessing). Inference Accelerator (GPU): NVIDIA GeForce RTX 3070 Ti (8GB VRAM). This acts as the primary engine for token generation. System Memory: 32GB DDR5. Operating Environment: Dual-boot configuration (Windows / Linux Mint) to allow for bare-metal benchmarking of CUDA performance and driver latency across different OS kernels. Software \u0026amp; Model Stack To ensure strict Data Loss Prevention (DLP) and guarantee zero network exfiltration, the entire software stack is hosted offline:\nInference Engine: LM Studio. This serves as both the local server and the graphical interface. It handles the CUDA offloading, pushing the model layers directly to the RTX 3070 Ti\u0026rsquo;s VRAM for hardware acceleration. The Core Model: Qwen-3B-Code (Q4_K_M.gguf). A 3-billion parameter model selected specifically for its efficiency. The 4-bit quantization (Q4) compresses the model\u0026rsquo;s weights, allowing it to operate comfortably within the 8GB VRAM limit without spilling over into slower system RAM. RAG Implementation: Local Vector Ingestion. Confidential documents (such as simulated network logs or proprietary schematics) are embedded and queried directly on the machine. No external vector databases or third-party APIs are contacted, maintaining a hermetically sealed data environment. LLM Diagram Challenges \u0026amp; Solutions Challenge: Getting Up-to-Date Swift Documentation My primary goal for this local AI was to use it as a secure coding assistant for Swift development. Because offline AI models (like the 3B model I used) don\u0026rsquo;t always have the absolute newest programming rules in their base training data, I wanted to use RAG to feed the AI the most recent Swift developer guides.\nHowever, I ran into a major roadblock: I couldn\u0026rsquo;t automatically scrape the official developer websites. The sites use dynamic formatting that broke my basic web scraping tools, meaning I couldn\u0026rsquo;t automatically pull the live data into my AI\u0026rsquo;s database.\nSolution: A Practical, Offline Workaround Since building a highly complex, custom web scraper was outside the scope of my goal, I pivoted to a more practical solution to get the system working:\nSourcing Static Files: Instead of trying to force a live connection to the website, I sourced static, offline versions of the documentation (such as clean text exports and Markdown files of the Swift guides). Local Ingestion: I manually loaded these clean files directly into my local RAG database. The Result: The AI could now read the updated Swift rules directly from my hard drive. While it wasn\u0026rsquo;t the fully automated web-scraping pipeline I originally envisioned, this workaround solved the core problem. It allowed me to successfully use the offline model as a helpful, up-to-date Swift coding assistant while maintaining the strict privacy boundary of my local machine.\nWhat I Learned Building this local AI environment was a massive learning experience that bridged the gap between hardware capabilities and software architecture. Key takeaways include:\nHardware Dictates AI Reality: I learned firsthand how VRAM limits (like the 8GB on my RTX 3070 Ti) strictly dictate what models you can run. Understanding how to use quantization to squeeze a capable 3-Billion parameter model into that limited space taught me a lot about resource management. Data Quality is the Hardest Part: The scraping roadblock taught me that setting up the AI engine is often easier than acquiring the clean data to feed it. RAG relies entirely on the quality of its input, and AI models heavily prefer clean, static text (like Markdown) over messy HTML. RAG is a Secure Reference Book: I realized that RAG isn\u0026rsquo;t magic—it is essentially giving the AI a custom, offline reference book to read before it answers. By loading the Swift documentation locally, I effectively updated the AI\u0026rsquo;s knowledge base without needing to retrain the model itself. Privacy by Design: Using this as a coding assistant reinforced the value of Data Loss Prevention (DLP). I can paste my own broken code or private project notes into the prompt without ever worrying about that data being sent to a public cloud server. ","permalink":"https://notdomquanmbs.github.io/posts/my-first-project/","summary":"\u003ch2 id=\"executive-summary\"\u003eExecutive Summary\u003c/h2\u003e\n\u003cp\u003eFor this project, I built a fully offline, privacy-focused AI coding assistant tailored specifically for Swift development. Base AI models often lack the newest programming rules, I used a Retrieval-Augmented Generation (RAG) pipeline to feed the AI static, up-to-date Swift developer guides. This allowed me to safely bridge the gap between hardware constraints and the need for accurate, current coding assistance.\u003c/p\u003e\n\u003ch2 id=\"hardware-architecture\"\u003eHardware Architecture\u003c/h2\u003e\n\u003cp\u003eRunning a Retrieval-Augmented Generation (RAG) pipeline locally requires balancing compute power with strict memory constraints. The foundation of this localized AI environment relies on consumer-grade hardware optimized for parallel processing:\u003c/p\u003e","title":"Project: Training \u0026 Fine Tuning a LLM"},{"content":"Executive Summary I built a virtualized Active Directory environment to simulate enterprise network attacks and defenses. The goal was to practice log analysis, GPO configuration, and malware containment in a safe sandbox.\nTools Used Hypervisor: VMware Workstation Pro / VirtualBox OS: Windows Server 2019, Windows 11 Home, Kali Linux Security Tools: Splunk (SIEM), PfSense (Firewall) The Setup I configured a Domain Controller (DC) and two client machines. I implemented the following security controls:\nLeast Privilege: Created separate admin and user accounts. Audit Logging: Enabled advanced audit policies to track logon events (Event ID 4624). Network Diagram Challenges \u0026amp; Solutions Challenge: I initially couldn\u0026rsquo;t get the Windows 10 client to join the domain due to DNS resolution errors. Solution: I realized my client was using the router\u0026rsquo;s DNS (8.8.8.8) instead of my Domain Controller\u0026rsquo;s static IP. I manually configured the DNS settings on the client adapter to point to the DC.\nWhat I Learned This project taught me the importance of proper DNS configuration in an Active Directory environment. I also gained hands-on experience reading Windows Event Logs to identify failed login attempts (Brute Force simulation).\n","permalink":"https://notdomquanmbs.github.io/posts/my-home-lab/","summary":"\u003ch2 id=\"executive-summary\"\u003eExecutive Summary\u003c/h2\u003e\n\u003cp\u003eI built a virtualized Active Directory environment to simulate enterprise network attacks and defenses. The goal was to practice log analysis, GPO configuration, and malware containment in a safe sandbox.\u003c/p\u003e\n\u003ch2 id=\"tools-used\"\u003eTools Used\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eHypervisor:\u003c/strong\u003e VMware Workstation Pro / VirtualBox\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eOS:\u003c/strong\u003e Windows Server 2019, Windows 11 Home, Kali Linux\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eSecurity Tools:\u003c/strong\u003e Splunk (SIEM), PfSense (Firewall)\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"the-setup\"\u003eThe Setup\u003c/h2\u003e\n\u003cp\u003eI configured a Domain Controller (DC) and two client machines. I implemented the following security controls:\u003c/p\u003e","title":"Project: Building a Secure Home Lab"}]