Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Let’s make an AI photo generator app with Cursor in 7min. Just give Cursor Composer a prompt file and the AI will write 100% of the code. AI is making it so that *anyone* can start building software today. Full prompt below.

426,678 görüntüleme • 1 yıl önce •via X (Twitter)

10 Yorum

Mckay Wrigley profil fotoğrafı
Mckay Wrigley1 yıl önce

PASTE THIS PROMPT IN A ` file --- # Flux with Replicate Documentation Use this guide to setup generating images with Flux and Replicate. Write the complete code for every step. Do not get lazy. Write everything that is needed. Your goal is to completely finish the feature. ## Helpful Links - [Replicate]( - [Flux Schnell]( ## Required Environment Variables Make sure the user has the following environment variables set: - REPLICATE_API_TOKEN= ## Install Replicate Make sure the user has the Replicate package installed: ```bash npm install replicate ``` ## Setup Steps ### Create a Replicate Client This file should go in `/lib/replicate.ts` ```ts import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN }); ``` ### Create a Server Action This file should go in `/actions/replicate-actions.ts` ```ts "use server"; import replicate from "@/lib/replicate"; export async function generateFluxImage(prompt: string) { const input = { prompt: prompt, num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", output_quality: 80 }; const output = await { input }); return output; } ``` ### Build the Frontend This file should go in `/app/flux/page.tsx`. - Create a form that takes a prompt - Create a button that calls the server action - Have a nice ui for when the image is blank or loading - Display the image that is returned - Have a button to generate a new image - Have a button to download the image

Mckay Wrigley profil fotoğrafı
Mckay Wrigley1 yıl önce

Reminder! This next week at we’re doing app week. Every day we’ll be building a new full-stack app with frontend, database, authentication, payments, and more. We will have projects for both beginners and experienced devs. Come learn to build with AI!

Luis C profil fotoğrafı
Luis C1 yıl önce

Awesome workflow! I completely agree, anyone can start building today. All you need is @cursor_ai and a @replicate API 🤗

Mckay Wrigley profil fotoğrafı
Mckay Wrigley1 yıl önce

@cursor_ai @replicate Replicate out here changing lives. You guys are amazing! :)

Ray Fernando profil fotoğrafı
Ray Fernando1 yıl önce

Bro you are coming in with nothing but bangers. LFG!!

Mckay Wrigley profil fotoğrafı
Mckay Wrigley1 yıl önce

This is a bangers only zone I promise

Andrei profil fotoğrafı
Andrei1 yıl önce

@lucataco93 Even my mom could compete with @levelsio nowadays

Mckay Wrigley profil fotoğrafı
Mckay Wrigley1 yıl önce

@lucataco93 @levelsio And I bet nobody in the world would be happier to see your mom succeed as an indie hacker than @levelsio himself! Awesome dude.

papadking profil fotoğrafı
papadking1 yıl önce

This is awesome. Feels like there is a bigger gap in learning deployment than writing code now lol

Mckay Wrigley profil fotoğrafı
Mckay Wrigley1 yıl önce

100%! It’s the top problem I see nowadays. Great sign, but we gotta fix that

Benzer Videolar