# DevVault — Personal Knowledge Vault for Engineers

> Category: Full-Stack · Systems & Security | Period: 2026 | Metric: Next.js 15 · Supabase RLS · SSRF Defense
> Canonical URL: https://www.arman-portfolio.online/projects/devvault/
> Live Demo: https://devvault-nine.vercel.app/
> Source Repository: https://github.com/arman080325/DevVault

## Overview
A calm, editorial knowledge vault for developers to capture, categorize, and explore technical knowledge from GitHub, YouTube, and the web. Features an SSRF-hardened Quick Capture engine with socket-level IP pinning, weighted Postgres full-text search (tsvector), 100% RLS on PostgreSQL, offline-to-cloud migration, and dual parchment/espresso design themes.

## Architecture & Tech Stack
Next.js 15, TypeScript, Supabase, PostgreSQL, Tailwind CSS, Framer Motion, SSRF Defense, Vercel

## Case Study

### The Problem
Developers discover dozens of technical repositories, architecture deep dives, and documentation guides daily across GitHub, YouTube, and the web, only to lose them in chaotic browser tabs and forgotten bookmarks. Traditional bookmarking apps lack technical platform awareness (stars, forks, languages, oEmbed), provide no safety against malicious link extraction (SSRF attacks), offer sluggish search, and feel like noisy corporate dashboards instead of calm, focused reading spaces.

### Architecture & Approach
Engineered DevVault as a calm, editorial knowledge vault using Next.js 15 App Router, React 19, strict TypeScript, and Supabase PostgreSQL. Architected a multi-layered, SSRF-hardened Quick Capture pipeline via socket-level DNS interception and connection IP pinning with safe streaming caps. Implemented weighted PostgreSQL full-text search via generated tsvector columns and GIN indexes wrapped in an 11-parameter SECURITY INVOKER RPC. Built a resilient Repository/Service layer that enables seamless local-first browser operation with frictionless cloud migration upon auth.

### Engineering Challenges & Solutions
- Securing the server-side metadata extraction engine against Server-Side Request Forgery (SSRF) and DNS rebinding attacks by engineering an Undici agent with socket-level IP pinning, link-local blocking, and a 1 MB streaming body cap
- Designing a dual-mode persistence architecture where the app functions 100% offline via localStorage and seamlessly migrates resources, collections, and tags to Supabase PostgreSQL with automated deduplication upon user authentication
- Implementing high-performance, weighted search ranking across multiple entity fields (title, category, notes, platform) using PostgreSQL tsvector and GIN indexing with sub-5ms query response times
- Crafting a responsive, typography-driven editorial design system with dual parchment and espresso-ember themes using CSS custom properties, Radix UI primitives, and Framer Motion micro-interactions

### Outcome & Results
A production-grade developer knowledge vault deployed on Vercel and Supabase, featuring instant quick-capture for GitHub, YouTube, and web articles, 100% Row Level Security coverage across all database tables, sub-second search across thousands of resources, and a 5-star user experience across 360px mobile to 1440px desktop.

### Lessons Learned
Defensive system design must be proactive: user-provided URLs must always be treated as untrusted network vectors requiring socket-level validation before transport. Furthermore, decoupling data access into a strict Repository layer provides unmatched resilience, allowing effortless transitions between local-first storage and distributed relational cloud backends.

---
Author: Arman Ahemad Khan (https://www.arman-portfolio.online/)
Role: Application Security & Full-Stack Developer
Education: Final-year B.Tech CSE at Silicon University, Bhubaneswar (CGPA 9.15, graduating May 2027)
