GENERATIVE AI PROJECT
Collection Intelligence
An LLM-powered assistant that understands your personal archive — vinyl records, books, and songs. Built with Claude API, Supabase, and vanilla JavaScript.
SYSTEM ARCHITECTURE
01
DATA LAYER
User collections stored in Supabase (PostgreSQL) with Row-Level Security. Each user's vinyl, books, and songs are isolated via auth policies. Data is fetched at runtime and injected into the LLM context window.
02
CONTEXT ENGINEERING
Collection data is serialized into a structured system prompt. The LLM receives the full dataset as context — artist names, genres, ratings, statuses — enabling it to reason across the collection without a vector database for this scale.
03
LLM INTEGRATION
Claude API (Anthropic) handles natural language understanding via a secure serverless proxy (Netlify Functions). The API key never reaches the browser — it lives as an environment variable on the server. The system prompt defines the assistant's persona, knowledge boundaries, and response style. Multi-turn conversation history is maintained client-side.
04
NLP CAPABILITIES
Intent recognition (recommendations, analysis, comparison, search). Entity extraction (artist names, genres, ratings). Sentiment-aware responses. Cross-collection reasoning (pairing books with albums by theme).
05
RESPONSE PIPELINE
User query → context assembly → serverless function proxy → Claude API with system prompt + conversation history → response → UI render. The API key is stored as a Netlify environment variable — zero exposure to the client. Token-efficient design keeps costs low.
06
SCALING PATH
For larger collections: embeddings via OpenAI/Cohere → vector DB (Pinecone/pgvector) → RAG pipeline. LangChain for tool-augmented generation. Currently unnecessary at this collection size but architecturally planned.
TECH STACK & CONCEPTS
LANGUAGE MODEL
Claude 4 Sonnet (Anthropic)
DATABASE
Supabase (PostgreSQL + Auth + RLS)
FRONTEND
Vanilla JS, HTML5, CSS3
HOSTING
Netlify (Static + Serverless Functions)
API SECURITY
Server-side proxy via Netlify Functions
AUTH
Supabase Auth (JWT + Email)
NLP TECHNIQUES
Prompt engineering, context injection, few-shot learning
AI CONCEPTS
System prompts, multi-turn dialogue, RAG-ready architecture
DATA FORMAT
JSONB (Supabase) → structured text (LLM context)
COLLECTION ASSISTANT
LOADING…
FC·AI
Initializing — loading your collection data…