{"id":16561344,"url":"https://github.com/jookie/convex-replicate","last_synced_at":"2025-08-29T13:23:49.244Z","repository":{"id":210096677,"uuid":"724820542","full_name":"jookie/convex-replicate","owner":"jookie","description":"convex-replicate","archived":false,"fork":false,"pushed_at":"2023-12-06T21:48:12.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T14:41:02.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jookie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-11-28T21:27:49.000Z","updated_at":"2023-11-28T21:40:46.000Z","dependencies_parsed_at":"2023-12-06T22:32:21.638Z","dependency_job_id":"08648712-94df-40ef-a528-b722b10bc60c","html_url":"https://github.com/jookie/convex-replicate","commit_stats":null,"previous_names":["jookie/convex-replicate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jookie%2Fconvex-replicate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jookie%2Fconvex-replicate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jookie%2Fconvex-replicate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jookie%2Fconvex-replicate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jookie","download_url":"https://codeload.github.com/jookie/convex-replicate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241965564,"owners_count":20050293,"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-10-11T20:32:42.196Z","updated_at":"2025-03-05T04:28:58.877Z","avatar_url":"https://github.com/jookie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Use Convex with Replicate to create images from doodles\n\nStack:\n\n- [Convex](https://convex.dev)\n- [Replicate](https://replicate.com/)\n- [Next.js](https://nextjs.org/)\n- [Tailwind CSS](https://tailwindcss.com/)\n\nTutorials:\n\n- [A Tour of Convex](https://docs.convex.dev/get-started)\n- [Convex Templates](https://www.convex.dev/templates)\n- [Using Convex with Vercel](https://docs.convex.dev/production/hosting/vercel)\n- [convex-demos](https://github.com/get-convex/convex-demos)\n- [Realtime](https://docs.convex.dev/realtime)\n- [Using Dall-E from Convex](https://stack.convex.dev/using-dall-e-from-convex)\n- [Building a Full-Stack ChatGPT app](https://stack.convex.dev/full-stack-chatgpt-app)\n- [A Tour of Convex](https://docs.convex.dev/get-started)\n- [Convex The web's TypeScript-native backend application platform](https://github.com/get-convex)\n- [convex-chatgpt](https://github.com/jookie/convex-chatgpt)\n- [streaming-chat-gpt](https://github.com/ianmacartney/streaming-chat-gpt)\n- [convex-text-adventure](https://github.com/webdevcody/convex-text-adventure)\n- [CLIP_prefix_caption](https://github.com/rmokady/CLIP_prefix_caption)\n- [CLIP](https://github.com/openai/CLIP)\n- [Determines the toxicity of text to image prompts](https://replicate.com/fofr/prompt-classifier)\n- []()\n- []()\n- []()\n- []()\n- []()\n- []()\n- []()\n- []()\n- []()\n- []()\n- []()\n- []()\n\n## Getting Started\n\nInstall packages:\n```bash\nnpm install\n```\n\nContinuously deploy to the Convex backend\n(this will create a (free) Convex account if you don't have one):\n```bash\nnpx convex dev\n```\n\nGet a [Replicate API key](https://replicate.com/account/api-tokens)\n(free to try) and add it to your\n[environment variables](https://docs.convex.dev/production/environment-variables)\nin the [Convex Dashboard](https://dashboard.convex.dev)\n\nIn another terminal, run the frontend:\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.\n\nEditing files in `convex/` will auto-update your \"Dev\" deployment in Convex.\n\n## Learn More\n\nTo learn more about Convex, check out the following resources:\n- [Docs](https://docs.convex.dev) has details on the platform and APIs.\n- [Stack](https://stack.convex.dev) has tips and best practices.\n\n## 1: The reactor\nIn this section, you'll explore the reactor through the Convex Dashboard to get familiar with:\n\nTables that store your data as relational Documents\nQuery functions that read from your tables reactively\nMutation functions that write to your tables\nScreenshot of a chat app\n\nThe Convex Dashboard is your hub for viewing and managing your Convex projects. From any Convex app, you can always quickly jump into the dashboard for that particular backend with the convex command. Let's do that now for our new chat app:\n\n'''\nnpx convex dashboard\n'''\n\n## Convex functions\nIn our chat app's messages module, we have two functions you can find in convex/messages.ts:\n\nmessages:list is a query function, which reads data from your Convex tables.\nmessages:send is a mutation function, which writes data into your Convex tables.\nLet's dive into query functions first.\n\n## Reading data with query functions\n\nmessages:list is a query function that retrieves up to 100 of the most recent documents in the messages table using the ctx.db object provided by Convex:\n\nexport const list = query({\n  args: {},\n  handler: async (ctx) =\u003e {\n    // Grab the most recent messages.\n    const messages = await ctx.db.query(\"messages\").order(\"desc\").take(100);\n    // Reverse the list so that it's in a chronological order.\n    return messages.reverse();\n  },\n});\n\nHosting your Convex app on Vercel allows you to automatically re-deploy both your backend and your frontend whenever you push your code.\n\n## Deploy the frontend on Vercel\n\nThe easiest way to deploy your Next.js frontend is to use the [Vercel Platform](https://vercel.com/new?filter=next.js).\n\nSee the [Convex docs on production deployments](https://docs.convex.dev/production/hosting/)\nfor details on deploying a production backend.\n\nThis guide assumes you already have a working React app with Convex. If not follow the Convex React Quickstart first. Then:\n\n### Create a Vercel account\n\nIf you haven't done so, create a Vercel account. This is free for small projects and should take less than a minute to set up.\n\n### Link your project on Vercel\n\nCreate a Vercel project at https://vercel.com/new and link it to the source code repository for your project on GitHub or other Git platform.\n\nVercel import project\n\n### Override the Build command\n\nOverride the \"Build command\" to be npx convex deploy --cmd 'npm run build'.\n\nIf your project lives in a subdirectory of your repository you'll also need to change Root Directory above accordingly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjookie%2Fconvex-replicate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjookie%2Fconvex-replicate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjookie%2Fconvex-replicate/lists"}