{"id":27483468,"url":"https://github.com/arthurverrez/replicate-image-generator","last_synced_at":"2026-04-14T04:01:16.997Z","repository":{"id":287765064,"uuid":"965704091","full_name":"ArthurVerrez/replicate-image-generator","owner":"ArthurVerrez","description":"A simple image generation web application using Next.js, Shadcn UI, Replicate, and Firebase. Generate images based on prompts using a specified Replicate model and view previously generated images.","archived":false,"fork":false,"pushed_at":"2025-04-13T19:31:24.000Z","size":2647,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T21:25:43.506Z","etag":null,"topics":["firebase","firestore","nextjs","replicate","shadcn-ui","vercel"],"latest_commit_sha":null,"homepage":"","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/ArthurVerrez.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,"zenodo":null}},"created_at":"2025-04-13T18:24:43.000Z","updated_at":"2025-04-13T19:31:28.000Z","dependencies_parsed_at":"2025-04-13T20:33:28.596Z","dependency_job_id":null,"html_url":"https://github.com/ArthurVerrez/replicate-image-generator","commit_stats":null,"previous_names":["arthurverrez/replicate-image-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ArthurVerrez/replicate-image-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurVerrez%2Freplicate-image-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurVerrez%2Freplicate-image-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurVerrez%2Freplicate-image-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurVerrez%2Freplicate-image-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArthurVerrez","download_url":"https://codeload.github.com/ArthurVerrez/replicate-image-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurVerrez%2Freplicate-image-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31781292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["firebase","firestore","nextjs","replicate","shadcn-ui","vercel"],"created_at":"2025-04-16T15:48:50.811Z","updated_at":"2026-04-14T04:01:16.983Z","avatar_url":"https://github.com/ArthurVerrez.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Replicate Image Generator\n\n![Application Screenshot](./app-image.png)\n\nA simple image generation web application using Next.js, Shadcn UI, Replicate, and Firebase. Generate images based on prompts using a specified Replicate model and view previously generated images.\n\nForked from [vercel-labs/ai-sdk-image-generator](https://github.com/vercel-labs/ai-sdk-image-generator).\n\n**Recommended Use Case:** This project works particularly well with a `FLUX.1-dev` model fine-tuned on a specific subject using the [ostris/flux-dev-lora-trainer](https://replicate.com/ostris/flux-dev-lora-trainer/train) on Replicate. You can then use the resulting model ID in the configuration.\n\n## Features\n\n- Generate images using a configured Replicate model.\n- Simple password-based authentication (single user).\n- Store generated images in Google Cloud Storage.\n- Store image metadata (prompt, URL, timestamp) in Firestore.\n- View a gallery of previously generated images.\n- Responsive UI built with Shadcn UI.\n- Configurable via environment variables.\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v18 or later recommended)\n- npm, yarn, or pnpm\n- A Replicate account and API token.\n- A Firebase project with Firestore and Cloud Storage enabled.\n\n### Installation \u0026 Setup\n\n1.  **Clone the repository:**\n\n    ```bash\n    git clone https://github.com/ArthurVerrez/replicate-image-generator.git\n    cd replicate-image-generator\n    ```\n\n2.  **Install dependencies:**\n\n    ```bash\n    npm install\n    # or\n    yarn install\n    # or\n    pnpm install\n    ```\n\n3.  **Set up environment variables:**\n\n    - Copy the example environment file:\n      ```bash\n      cp .env.example .env\n      ```\n    - Edit `.env` and fill in the required values. See the [Environment Variables](#environment-variables) section below for details.\n\n4.  **Run the development server:**\n\n    ```bash\n    npm run dev\n    # or\n    yarn dev\n    # or\n    pnpm dev\n    ```\n\n5.  Open [http://localhost:3000](http://localhost:3000) in your browser.\n\n## Environment Variables\n\nCopy `.env.example` to `.env` and provide the following values:\n\n- **Replicate Configuration:**\n  - `REPLICATE_API_TOKEN`: Your API token from Replicate.\n  - `NEXT_PUBLIC_REPLICATE_MODEL_ID`: The Replicate model identifier (e.g., `owner/model-name:version`).\n- **Firebase Admin SDK Configuration (Server-side):**\n\n  - `FIREBASE_SERVICE_ACCOUNT_JSON`: Your Firebase service account key JSON, encoded in **Base64**.\n  - **How to generate Base64:** Download your service account key file, then run this Node.js command in your terminal (replace `path/to/your-key.json`):\n    ```bash\n    node -e \"console.log(require('fs').readFileSync('path/to/your-key.json').toString('base64'))\"\n    ```\n  - `FIREBASE_ADMIN_STORAGE_BUCKET`: Your Firebase Storage bucket name (e.g., `your-project-id.appspot.com`).\n\n- **Firebase Client SDK Configuration (Client-side):**\n  - `NEXT_PUBLIC_FIREBASE_API_KEY`: Your Firebase project's Web API Key.\n  - `NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN`: Your Firebase project's Auth Domain.\n  - `NEXT_PUBLIC_FIREBASE_PROJECT_ID`: Your Firebase project ID.\n  - `NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET`: Your Firebase Storage bucket name.\n  - `NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID`: Your Firebase Messaging Sender ID.\n  - `NEXT_PUBLIC_FIREBASE_APP_ID`: Your Firebase Web App ID.\n- **Firebase Storage \u0026 Firestore Configuration (API Routes):**\n  - `FIREBASE_STORAGE_BUCKET_NAME`: Your Firebase Storage bucket name (can be the same as above).\n  - `FIRESTORE_IMAGES_COLLECTION`: The name for the Firestore collection to store image metadata (e.g., `images`).\n  - `STORAGE_FILE_PATH_PREFIX`: The prefix for storing images in the bucket (e.g., `generated-images/`).\n- **Application Configuration:**\n  - `NEXT_PUBLIC_APP_NAME`: The name displayed in the UI (e.g., `My Image Gen`).\n  - `NEXT_PUBLIC_PROMPT_SUBJECT`: The default subject token used in prompt suggestions (e.g., `photograph of SUBJECT`).\n- **Authentication Configuration:**\n  - `AUTH_EMAIL`: The email address used for login.\n  - `AUTH_PASSWORD`: The password used for login.\n  - `AUTH_TOKEN_VALUE`: A secret string used for the authentication cookie (generate a secure random string).\n\n## Deployment\n\nThis application is ready to be deployed on platforms like Vercel.\n\n1.  Push your code to a Git repository (e.g., GitHub, GitLab).\n2.  Import the project into Vercel.\n3.  Configure the environment variables listed above in the Vercel project settings.\n4.  Deploy!\n\n## Built With\n\n- [Next.js](https://nextjs.org/)\n- [React](https://reactjs.org/)\n- [TypeScript](https://www.typescriptlang.org/)\n- [Tailwind CSS](https://tailwindcss.com/)\n- [Shadcn UI](https://ui.shadcn.com/)\n- [Replicate](https://replicate.com/)\n- [Firebase (Authentication, Firestore, Cloud Storage)](https://firebase.google.com/)\n- [Vercel AI SDK](https://sdk.vercel.ai/)\n\n## Acknowledgments\n\n- Forked from [vercel-labs/ai-sdk-image-generator](https://github.com/vercel-labs/ai-sdk-image-generator)\n\n* [ostris/flux-dev-lora-trainer](https://replicate.com/ostris/flux-dev-lora-trainer/train) for fine-tuning the tested model.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurverrez%2Freplicate-image-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurverrez%2Freplicate-image-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurverrez%2Freplicate-image-generator/lists"}