{"id":"pg_laeaiwqhygmg","property_id":"prp_-ukk265czwbd","domain_id":"dom_vqj7b-nyig_h","root_domain":"supabase.com","locale":"en","url":"https://supabase.com/docs/guides/getting-started/quickstarts/reactjs","url_hash":"633949cb5c780e7bf63ebf6389ca9b3b776dd082bf0a4825331cc9b54b282523","path":"/docs/guides/getting-started/quickstarts/reactjs","depth":1,"canonical_url":"https://supabase.com/docs/guides/getting-started/quickstarts/reactjs","canonical_page_id":null,"page_type":"docs","page_type_guess":"docs","state":"indexed","skip_reason":null,"priority":"1.4","discovered_via":"sitemap","first_seen_at":"2026-08-27T09:07:11.908Z","last_seen_at":"2026-08-27T09:07:16.226Z","http_status":200,"content_hash":"98d22d6b2cbf868e451d3dcec8b7a46d5d065d101515385cfbd487378559826b","title":"Use Supabase with React | Supabase Docs","description":"Learn how to create a Supabase project, add some sample data to your database, and query the data from a React app.","author":"Supabase","published_at":"2026-08-27T08:38:24.779Z","modified_at":"2026-08-27T08:38:24.779Z","word_count":558,"reading_time_sec":152,"lang_detected":"en","images":[],"links_out":null,"markdown_source":"readability","refresh_interval":"monthly","last_fetched_at":"2026-08-27T09:07:34.354Z","next_refresh_at":"2026-09-26T09:07:34.354Z","runs_count":1,"changes_count":0,"last_changed_at":null,"fail_count":0,"last_error":null,"created_at":"2026-08-27T09:07:11.908Z","updated_at":"2026-08-27T09:07:11.908Z","inlinks":1,"inlinks_body":1,"outlinks":65,"outlinks_external":7,"anchor_terms":["Read docs for React"],"template_score":"0.10000000000000000000","cash":"0","cash_total":"0.5129629629629641","pagerank":null,"is_orphan":false,"link_confirmed":true,"discovered_wave":0,"embedded_hash":"98d22d6b2cbf868e451d3dcec8b7a46d5d065d101515385cfbd487378559826b","embedded_at":"2026-08-27T09:13:48.537Z","domain_name":"Supabase","brand_color":"#9de6c5","domain_rank":473,"spam_score":11,"markdown":"Learn how to create a Supabase project, add some sample data to your database, and query the data from a React app.\n\nTo start, you need a Supabase project.\n\nCreate a new Supabase project from [the Dashboard of any organization](https://supabase.com/dashboard/new/_) you belong to.\n\nWhen your Supabase project is up and running, create an `instruments` table with some sample data. Then set only the privileges each Postgres role needs, add [Row Level Security (RLS)](https://supabase.com/docs/guides/database/postgres/row-level-security) for enhanced security for database data by default, and create an RLS policy to make the data in the table publicly readable.\n\nDo these steps within your project's dashboard by copying and running the snippet in your project's [SQL Editor](https://supabase.com/dashboard/project/_/sql/new).\n\nCreate a React app using a [Vite](https://vitejs.dev/guide/) template.\n\nSupabase provides two ways to give AI tools context about your project: Agent Skills, which give your AI coding agent procedural knowledge, and the MCP server, which connects AI assistants to your Supabase project directly.\n\n### Agent Skills[#](#agent-skills)\n\n[Agent Skills](https://supabase.com/docs/guides/ai-tools/ai-skills) is a curated set of instructions that give your AI agent procedural knowledge about working with Supabase.\n\nInstall them so your AI coding agent can produce more accurate, reliable code using current Supabase patterns, such as authentication, server-side rendering, and database migrations, rather than relying solely on training data.\n\n#### Installing Agent Skills[#](#installing-agent-skills)\n\nTo install, run the following command in the root of your project:\n\n### Supabase MCP server[#](#supabase-mcp-server)\n\nThe Supabase MCP server connects AI assistants to Supabase, so they can inspect your schema and act on your projects on your behalf. Find out how to add it to your client in [the MCP docs](https://supabase.com/docs/guides/ai-tools/mcp).\n\nThe fastest way to get started is to use the `supabase-js` client library, which provides a convenient interface for working with Supabase from a React app.\n\nNavigate to the React app and install `supabase-js`.\n\nCreate a `.env.local` file and populate it with your Supabase URL and publishable key that you can get from the helper below, or [from the project **Connect** panel](https://supabase.com/dashboard/project/_?showConnect=true&framework=react&connectTab=frameworks)\n\n[\n\nOpen Connect panel\n\n](https://supabase.com/dashboard/project/_?showConnect=true&connectTab=frameworks&framework=react)\n\n.env.local\n\n### Get API details[#](#get-api-details)\n\nTo interact with data in database tables, you use the client libraries that wrap [the auto-generated Data API endpoints](https://supabase.com/docs/guides/api), authenticating using the Project URL and key from [the project **Connect** dialog](https://supabase.com/dashboard/project/_?showConnect=true&connectTab=frameworks&framework=react).\n\nProject URL\n\nPublishable key\n\nCreate a `src/lib` directory in your React app, create a file called `supabaseClient.js`, and add the following code to initialize the Supabase client:\n\nsrc/lib/supabaseClient.js\n\nReplace the contents of `App.jsx` with a `getInstruments` function that fetches the data and displays the query result on the page.\n\nsrc/App.jsx\n\nRun the development server, go to [http://localhost:5173](http://localhost:5173/) in a browser, and you should see the list of instruments.\n\nThe quickstart procedure in this guide optimizes for getting you to a working app, not for production.\n\nBefore you deploy:\n\n-   If your app reads or writes through the Data API, review your [Row Level Security](https://supabase.com/docs/guides/database/postgres/row-level-security) policies. Any policy you added here is scoped to this quickstart's sample data, not to real user data.\n-   Set your Supabase credentials as environment variables on whatever platform you deploy to, rather than committing them to source control.\n-   Configure a [custom domain](https://supabase.com/docs/guides/platform/custom-domains) for your Supabase project once you're ready to go live.\n\n-   Set up [Auth](https://supabase.com/docs/guides/auth) for your app\n-   [Insert more data](https://supabase.com/docs/guides/database/import-data) into your database\n-   Upload and serve static files using [Storage](https://supabase.com/docs/guides/storage)\n-   Explore [drop-in UI components](https://supabase.com/ui) for your Supabase app","storage":{"htmlKey":"stealpage/html/supabase.com/pg_laeaiwqhygmg/run_1bex4v2fvvww.html.gz","markdownKey":"stealpage/md/supabase.com/pg_laeaiwqhygmg/run_1bex4v2fvvww.md.gz"},"facets":{"page_id":"pg_laeaiwqhygmg","domain_id":"dom_vqj7b-nyig_h","root_domain":"supabase.com","locale":"en","format":"research","depth":2,"technicality":4,"promotional":3,"originality":2,"audience":"developer","funnel_stage":"awareness","intent":"informational","evidence":"anecdote","tone":"corporate","has_code":true,"code_langs":[],"has_data":false,"has_tables":false,"has_images":false,"has_video":false,"has_faq":false,"external_links":17,"heading_count":4,"topics":["react","supabase","database","api"],"keywords":["supabase","react","database","api","row level security","client library","environment variables"],"entities":{},"takeaways":["The page offers a practical, step-by-step tutorial for developers looking to integrate Supabase with a React application.","It covers essential setup steps including creating a Supabase project, configuring database access, and initializing the Supabase client library.","The guide emphasizes security practices like Row Level Security and environment variables for production deployment.","It includes links to additional resources for advanced features like authentication and storage.","The content is structured for developers with some experience, focusing on implementation rather than theoretical concepts."],"summary":"This page provides a step-by-step guide for integrating Supabase with a React application, including setting up a project, configuring database access, and initializing the Supabase client.","ai_likelihood":"0.033","shelf_life":"dated","quality_score":"0.4491","fingerprint":"98d22d6b2cbf868e451d3dcec8b7a46d5d065d101515385cfbd487378559826b","model":"qwen/qwen3-30b-a3b","classified_at":"2026-08-27T09:11:19.046Z","created_at":"2026-08-27T09:11:19.046Z","updated_at":"2026-08-27T09:11:19.046Z"},"assets":[{"kind":"image","src_url":"https://obuldanrptloktxcffvn.supabase.co/functions/v1/og-images?description=undefined&site=docs&title=Use+Supabase+with+React&type=getting-started","r2_key":null,"alt":null,"caption":null,"width":null,"height":null,"is_hero":true,"zone":"main"},{"kind":"image","src_url":"https://supabase.com/docs/supabase-dark.svg","r2_key":null,"alt":"Supabase wordmark","caption":null,"width":96,"height":18,"is_hero":false,"zone":"nav"},{"kind":"image","src_url":"https://supabase.com/docs/supabase-light.svg","r2_key":null,"alt":"Supabase wordmark","caption":null,"width":96,"height":18,"is_hero":false,"zone":"nav"}],"shots":[],"history":[{"id":"run_1bex4v2fvvww","started_at":"2026-08-27T09:07:34.280Z","http_status":200,"fetcher":"direct","changed":false,"diff":null,"word_count":558}],"citedBy":[{"id":"pg_eyuinj5vpsvi","url":"https://supabase.com/","title":"Supabase | The Postgres Development Platform","anchors":["Read docs for React"],"zone":"main"}]}