{"slug": "how-i-built-a-personal-ai-knowledge-base-with-amazon-aurora-pgvector-and-next-js", "title": "How I Built a Personal AI Knowledge Base with Amazon Aurora pgvector and Next.js — AWS H0 Hackathon", "summary": "A developer built ChatScroll for the AWS H0 Hackathon, an app that uses Amazon Aurora PostgreSQL with pgvector to create a personal AI knowledge base. The app saves AI answers as searchable 'Scrolls' with semantic search, combining pgvector embeddings, ltree for folder hierarchies, and tsvector for full-text search. The architecture separates structured data in Aurora from chat messages in DynamoDB.", "body_md": "I built ChatScroll for the AWS H0 Hackathon — an app that\n\nlets you save AI answers as searchable \"Scrolls\" using\n\nAmazon Aurora PostgreSQL with pgvector for semantic search.\n\nEvery day people ask AI assistants valuable questions and\n\nget great answers — then lose them forever. Chat history\n\nis linear, unsearchable, and ephemeral. I kept re-Googling\n\nthe same questions knowing I had already found the answer\n\nsomewhere but couldn't find it again.\n\nChatScroll transforms AI conversations into a personal\n\nknowledge library. Save any AI answer as a \"Scroll\",\n\norganize it automatically, and find it later with\n\nsemantic search.\n\nMaking search understand MEANING not just keywords. When\n\nyou search \"blood thinner medication\" it should find your\n\nwarfarin scroll even though \"blood thinner\" doesn't appear\n\nin the title.\n\nAmazon Aurora PostgreSQL with the pgvector extension stores\n\n3072-dimensional vector embeddings for every saved Scroll.\n\nWhen a user saves a Scroll:\n\nWhen a user searches:\n\n``` js\n-- Semantic search with threshold\nWHERE 1 - (embedding <=> $queryVec) > 0.5\nORDER BY embedding <=> $queryVec\nLIMIT 5\n```\n\nWhat makes Aurora special for this use case is three\n\nextensions working together:\n\n**pgvector** — stores 3072-dim embeddings, enables cosine\n\nsimilarity search between vectors\n\n**ltree** — stores folder paths as dot-separated label trees\n\n(`programming.containers`\n\n), enables subtree queries without\n\nrecursive CTEs\n\n**tsvector** — powers full-text search with ranking via\n\nts_rank, combined with pgvector for hybrid search\n\nI made a deliberate choice to use TWO AWS databases:\n\n**Amazon Aurora PostgreSQL** for structured data:\n\n**Amazon DynamoDB** for chat messages:\n\nThis separation keeps Aurora lean for complex queries\n\nwhile DynamoDB handles the high-volume chat stream.\n\nSearching \"containerization technology\" correctly surfaces\n\nthe Docker scroll. Searching \"blood thinner medication\"\n\nfinds warfarin — no programming results contaminating it.\n\nSemantic search scoped to the same folder category\n\nensures results are always relevant.\n\nLive app: [https://chatscroll.vercel.app](https://chatscroll.vercel.app)\n\nAWS Architecture: [https://chatscroll.vercel.app/aws-showcase](https://chatscroll.vercel.app/aws-showcase)\n\nI created this content for the purposes of entering\n\nthe AWS H0 Hackathon.", "url": "https://wpnews.pro/news/how-i-built-a-personal-ai-knowledge-base-with-amazon-aurora-pgvector-and-next-js", "canonical_source": "https://dev.to/hamzanabdev/how-i-built-a-personal-ai-knowledge-base-with-amazon-aurora-pgvector-and-nextjs-aws-h0-hackathon-19jf", "published_at": "2026-06-26 23:25:05+00:00", "updated_at": "2026-06-27 00:03:50.525767+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "developer-tools", "ai-products", "ai-infrastructure"], "entities": ["Amazon Aurora PostgreSQL", "pgvector", "Next.js", "AWS H0 Hackathon", "ChatScroll", "DynamoDB", "ltree", "tsvector"], "alternates": {"html": "https://wpnews.pro/news/how-i-built-a-personal-ai-knowledge-base-with-amazon-aurora-pgvector-and-next-js", "markdown": "https://wpnews.pro/news/how-i-built-a-personal-ai-knowledge-base-with-amazon-aurora-pgvector-and-next-js.md", "text": "https://wpnews.pro/news/how-i-built-a-personal-ai-knowledge-base-with-amazon-aurora-pgvector-and-next-js.txt", "jsonld": "https://wpnews.pro/news/how-i-built-a-personal-ai-knowledge-base-with-amazon-aurora-pgvector-and-next-js.jsonld"}}