This is a Next.js project that's preconfigured to work with Replicate's API, and also it's an image gallery site using Cloudinary and Tailwind CSS.
You can visit deployed app on Vercel. Click here
- pages/index.js - The React frontend that renders the Home page in the browser
- pages/api/predictions/index.js - The backend API endpoint that calls Replicate's API to create a prediction
- pages/api/predictions/[id].js - The backend API endpoint that calls Replicate's API to get the prediction result
- pages/image_gallery/index.js - This file is a Next.js page component responsible for rendering the photos from Cloudinary
- pages/photo/[photoId].js - This is a dynamic route that displays a specific photo based on the 'photoId' query parameter from the URL