Note This Project Is Still W.I.P
As a creator with a keen interest in generating unique images for websites, I often found myself bogged down by the time-consuming process of crafting prompts for AI-based image generation. This challenge sparked the interest of creating an app the streamlines the process of prompting. I wanted to create a solution that not only streamlines the image creation process but also enhances creativity and productivity for users like myself.
Pixelcraft is built on a robust stack, combining the features of server components with Next.js and building tools with React with the type safety of TypeScript. The minimal and responsive UI is powered by Tailwind CSS, ensuring a seamless user experience. For data handling and validation, I use Zod, and our data storage needs are fulfilled by Cloudinary for image hosting and MongoDB for image links.
The main feature of Pixelcraft is its ability to connect seamlessly with OpenAI's API and automating prompts for users. By doing so, it not only accesses a powerful engine for image generation but also they have access to a curated selection of predefined prompts, tailored to generate a wide range of images with just a few clicks.
Pixelcraft revolutionizes the way you create images. There is no need to think too hard about what image you want to generate. Now, you can generate diverse, high-quality images in a fraction of the time, empowering your creative process and enhancing your projects with visually striking content. Whether you're designing a platform for rapid, effortless image generation.
Below are some screenshots of how the images are generated.
Users are provided with a prompt input, color selection, style input and keyword selection.
They can also click on the Try example
button to generate a random prompt.
All fields are required so that we can ge the most accurate image we want to generate. Using zod to
validate all the input and buttons to make sure that they are all not empty.
Once the inputs are entered and buttons are selected, the information given is then crafted into a
customized text prompt to get the most accurate result. The information if sent over to Dall-E OpenAI api
and we retrieve back the generated image.
Publishing to community requires you to enter your name. The image is upload to Cloudinary
. Once
uploaded, the response we get from Cloudinary
is a URL to points to the image. We then store the URL
into a MongoDB database along with other information such as name
, prompt
, revised_prompt
. Revised prompt
is a prompt that is adjusted by OpenAI
. The image is then posted onto the Community
page.
Buy credits
feature using Stripe
. Wanna make a SAASTo get started, you need to get your own api keys from mongodb, openai, nextauth, cloudinary and google.
Get a free API Key at mongodb, openai, nextauth, cloudinary and google
Clone the repo
git clone https://github.com/adam-ridhwan/pixel-craft.git
npm install
.env
API_KEY = 'ENTER YOUR API';
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)