Flux.1 Image Generator is a web application that allows users to generate images using the Flux.1 AI models (dev and schnell versions) hosted on Replicate. This project is built with Next.js to provide a user-friendly interface for image generation.
Clone the repository:
git clone https://github.com/ashakoen/next-js-flux1-replicate.git
cd next-js-flux1-replicate
Install frontend dependencies:
npm install
Start the development server:
npm run dev
http://localhost:3000
The user's Replicate API key is stored securely in the browser's local storage and is not persisted in the backend. The frontend directly calls the Replicate API using the user's API key. Always ensure you're using the application over a secure connection (HTTPS) in production environments.
.
├── Dockerfile
├── LICENSE
├── README.md
├── components.json
├── docker-compose.yml
├── next-env.d.ts
├── next.config.mjs
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── public
│ └── next.svg
├── src
│ ├── app
│ │ ├── api
│ │ │ └── replicate
│ │ │ └── route.ts
│ │ ├── components.tsx
│ │ ├── favicon.ico
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ └── page.tsx
│ ├── components
│ │ └── ui
│ │ ├── accordion.tsx
│ │ ├── alert.tsx
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ ├── dialog.tsx
│ │ ├── drawer.tsx
│ │ ├── input.tsx
│ │ ├── label.tsx
│ │ ├── select.tsx
│ │ ├── skeleton.tsx
│ │ ├── slider.tsx
│ │ ├── switch.tsx
│ │ ├── tabs.tsx
│ │ ├── textarea.tsx
│ │ └── tooltip.tsx
│ └── lib
│ └── utils.ts
├── tailwind.config.ts
└── tsconfig.json
This project doesn't use environment files (.env) for configuration. Instead, sensitive information like API keys are handled directly in the frontend and not stored in the backend.
You can customize various aspects of the frontend by modifying the following files:
next.config.mjs
: Next.js configurationtailwind.config.ts
: Tailwind CSS configurationtsconfig.json
: TypeScript configurationRemember to never commit sensitive information like API keys to your version control system.
Contributions are welcome! Please submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, please open an issue on the GitHub repository.