{"id":23582695,"url":"https://github.com/codehunt101/embeddings-openai-supabase","last_synced_at":"2025-11-02T19:30:23.939Z","repository":{"id":269491107,"uuid":"907580415","full_name":"CodeHunt101/embeddings-openai-supabase","owner":"CodeHunt101","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-24T05:08:18.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T00:39:29.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeHunt101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-23T23:23:11.000Z","updated_at":"2024-12-24T05:08:21.000Z","dependencies_parsed_at":"2024-12-24T00:36:22.139Z","dependency_job_id":null,"html_url":"https://github.com/CodeHunt101/embeddings-openai-supabase","commit_stats":null,"previous_names":["codehunt101/embeddings-openai-supabase"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeHunt101%2Fembeddings-openai-supabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeHunt101%2Fembeddings-openai-supabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeHunt101%2Fembeddings-openai-supabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeHunt101%2Fembeddings-openai-supabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeHunt101","download_url":"https://codeload.github.com/CodeHunt101/embeddings-openai-supabase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239399808,"owners_count":19632022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-27T01:12:38.455Z","updated_at":"2025-11-02T19:30:23.892Z","avatar_url":"https://github.com/CodeHunt101.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Movie Recommendation System with OpenAI and Supabase\n\n## Overview\nThis project implements a semantic movie recommendation system using OpenAI's embeddings and Supabase for vector similarity search. The system takes natural language queries about movies and returns relevant movie recommendations based on semantic similarity rather than just keyword matching.\n\n## Features\n- Natural language movie queries\n- Semantic search using OpenAI's text embeddings\n- Vector similarity search with Supabase\n- Conversational responses using OpenAI's GPT models\n- Movie database with detailed information about recent films\n\n## Technical Stack\n- **Frontend**: Vanilla JavaScript with Vite\n- **Database**: Supabase with pgvector extension\n- **AI/ML**: OpenAI API (embeddings and chat completion)\n- **Build Tool**: Vite\n\n## Prerequisites\n- Node.js and npm\n- Supabase account and project\n- OpenAI API key\n\n## Environment Variables\nCreate a `.env` file with the following:\n```\nVITE_OPENAI_API_KEY=your_openai_api_key\nVITE_SUPABASE_URL=your_supabase_project_url\nVITE_SUPABASE_API_KEY=your_supabase_anon_key\n```\n\n## Database Setup\n1. Create a new Supabase project\n2. Enable vector similarity search in your Supabase database\n3. Execute the SQL queries from `queries-supabase.sql`:\n   - Creates a `movies` table with vector embeddings support\n   - Implements a `match_movies` function for similarity search\n\n## Installation\n```bash\nnpm install\n```\n\n## Development\n```bash\nnpm run dev\n```\n\n## Building for Production\n```bash\nnpm run build\n```\n\n## How It Works\n1. User queries are converted into embedding vectors using OpenAI's embedding model\n2. The embeddings are used to search for similar movies in Supabase using vector similarity\n3. Matching results are processed through OpenAI's chat completion to generate natural language responses\n4. The system returns movie recommendations based on the user's query\n\n## Project Structure\n```\n├── config.js             # OpenAI and Supabase configuration\n├── index.js              # Main application logic\n├── index.html            # Entry point\n├── movies.txt            # Movie database content\n├── queries-supabase.sql  # Database setup queries\n```\n\n## Current Limitations\n- Limited to the movies in the database\n- Requires both OpenAI and Supabase credits\n\n## Future Improvements\n- Include more movie metadata\n- Implement movie filtering by rating, genre, etc.\n- Add caching for frequent queries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodehunt101%2Fembeddings-openai-supabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodehunt101%2Fembeddings-openai-supabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodehunt101%2Fembeddings-openai-supabase/lists"}