---
title: "Build a content recommendation app with Flutter and OpenAI"
description: "A Flutter movie app recommends related films by storing OpenAI text-embedding-3-small embeddings of TMDB movie overviews in Supabase Postgres with pgvector."
url: "https://swe.quest/articles/build-a-content-recommendation-app-with-flutter-and-openai-0cc91211e32f59d0"
canonical: "https://supabase.com/blog/content-recommendation-with-flutter"
source: "Supabase"
published: "2024-02-26"
difficulty: "medium"
kind: "How-to"
reading_minutes: 10
tags: ["vector-search","postgres","recommendation-systems","mobile"]
---

# Build a content recommendation app with Flutter and OpenAI

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2024-02-26, 10 min read, How-to. Original: [https://supabase.com/blog/content-recommendation-with-flutter](https://supabase.com/blog/content-recommendation-with-flutter)

## Summary

A Flutter movie app recommends related films by storing OpenAI text-embedding-3-small embeddings of TMDB movie overviews in Supabase Postgres with pgvector. A Supabase Edge Function fetches popular movies from TMDB, generates 1536-dimension embeddings and upserts them into a films table. A SQL database function, backed by an HNSW index with cosine distance, returns the six nearest movies, excluding the current one, and the Flutter details page calls it via RPC. Recommending from a user's whole viewing history, rather than a single movie, is left as an open extension.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Vector search](https://swe.quest/tags/vector-search.md) (Data & databases)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md) (AI & ML)
- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)

## Prerequisites

- Flutter basics
- SQL and Postgres ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- text embeddings concept ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))

## Keywords

Supabase, pgvector, Flutter, OpenAI Embeddings, HNSW, TMDB API, Supabase Edge Functions

## Related posts

- [Generate embeddings with Neon AI Gateway](https://swe.quest/articles/generate-embeddings-with-neon-ai-gateway-8da1f214a3b9e4fc.md): Neon · 2026-10-02 · Medium · 7 min read · RAG & retrieval, Vector search, PostgreSQL, LLMs
  Neon AI Gateway now serves embedding models on its OpenAI-compatible /v1/embeddings endpoint using the same branch-scoped credential as chat, accepting up to 150 inputs per request.
- [Build your own ChatGPT-style doc search with Fresh, OpenAI, and Supabase](https://swe.quest/articles/build-your-own-chatgpt-style-doc-search-with-fresh-openai-and-supabase-25f47f7089be5f99.md): Deno · 2023-05-11 · Medium · 4 min read · RAG & retrieval, Vector search, PostgreSQL, TypeScript, LLMs
  A Deno Fresh starter template builds a ChatGPT-style documentation search on Supabase Postgres with pgvector and OpenAI.
- [ChatGPT plugins now support Postgres & Supabase](https://swe.quest/articles/chatgpt-plugins-now-support-postgres-supabase-db9d10a95a8d96b9.md): Supabase · 2023-05-25 · Medium · 7 min read · RAG & retrieval, Vector search, PostgreSQL, LLMs
  Supabase contributed Postgres and Supabase datastore providers to OpenAI's ChatGPT Retrieval Plugin, storing text-embedding-ada-002 embeddings in pgvector.
- [SQLite Retrieval Augmented Generation and Vector Search](https://swe.quest/articles/sqlite-retrieval-augmented-generation-and-vector-search-f6665825b9a1cb47.md): Turso · 2024-06-21 · Medium · 5 min read · Vector search, SQLite, RAG & retrieval
  Retrieval-augmented generation fixes stale or hallucinated LLM answers by retrieving relevant data, typically via embeddings and vector similarity search, and injecting it into the prompt. libSQL adds native vector search to SQLite: embeddings are stored in an F32\_BLOB column (SQLite treats column types as hints), inserted with a vector() function, and queried with vector\_distance\_cos() plus ORDER BY/LIMIT for exact top-k results.
- [Building Vector Search and Personal Knowledge Graphs on Mobile with libSQL and React Native](https://swe.quest/articles/building-vector-search-and-personal-knowledge-graphs-on-mobile-with-libsql-and-9cac5c5150db9825.md): Turso · 2024-10-02 · Medium · 10 min read · Vector search, SQLite, Mobile, Local-first & sync, React
  Kin, a local-first personal AI app, stores its agent memory as a vector-searchable knowledge graph on the user's device using libSQL through the OP-SQLite React Native binding, enabled with a package.json flag.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
