Introduction
Creating engaging social media content is now easier than ever with Post Creator. By simply entering a keyword, you can generate stunning images for posts (1080 x 1080) and stories (1080 x 1920). Leveraging the power of OpenAI APIs and other supportive technologies, Post Creator ensures that your content is visually appealing, relevant, and engaging. Ideal for businesses, social media managers, or anyone looking to enhance their online presence, this app streamlines the content creation process, saving you time and effort while maintaining a professional touch.
How I Got the Idea and the Problem It Solves
The inspiration for Post Creator came from observing the challenges faced by social media managers and operators of news-based online pages. These professionals often need to post content rapidly to keep up with the latest news and trends. Creating visually appealing and relevant posts can be time-consuming and labor-intensive, detracting from their ability to focus on research and content quality.
Recognizing this issue, I envisioned a tool that automates the post creation process. Post Creator generates high-quality images for both standard posts and stories based on simple keywords. By leveraging advanced AI technologies, it enables social media operators to quickly produce visually engaging content without sacrificing time and effort. This allows them to allocate more resources to researching and creating in-depth, high-quality content, ultimately enhancing their social media presence.
Technical Solution
To address the need for efficient post creation, Post Creator employs a combination of APIs and technologies:
Keyword Processing:
Google Search API: Collects relevant images based on the user's keyword.
OpenAI API: Generates various post titles using OpenAI's language model.
Template Parsing and Image Creation:
- Fabric.js: Parses pre-made JSON-based templates and loads them into the HTML5 canvas. The app randomly stacks one title and one image onto the canvas, placing them into their respective layers (image layer and title layer).
Generating Unique Images:
- The combination process creates unique images. Initially, 12 images are shown, and users can generate more by clicking the "load more" button, which produces additional unique combinations.
User Interaction and Download:
- Users can browse through the generated images and download their preferred ones by clicking on the download icon.
This technical approach ensures the rapid creation of high-quality, visually appealing social media posts.
How to Use
Generating images with Post Creator is straightforward and user-friendly. Follow these steps:
Select Category:
- Choose either "Post" (1080 x 1080) or "Story" (1080 x 1920) as the format for your image.
Enter Keyword:
- Input a trending keyword related to your desired content. The longer and more specific the keyword, the better the results.
Start the Process:
- Hit "Enter" to initiate the generation process. A loader will indicate that the app is working.
View Generated Images:
- Once the process is complete, a grid of generated images will be displayed. Browse through these images to find the ones that best suit your needs.
The app's intuitive interface ensures a seamless experience, allowing you to create engaging social media content effortlessly.
Tech Stack
Post Creator leverages a robust and efficient tech stack:
Next.js : Used for developing the frontend.
Google's Custom Search JSON API : Gathers relevant images based on the user's keyword.
OpenAI's API : Generates engaging and relevant post titles based on the entered keyword.
ImageKit.io : Stores and crops images, maintaining quality and auto-focusing on key objects.
Fabric.js : Parses JSON-based templates and combines titles and images into visually appealing posts.
How to Run It Locally
To run Post Creator locally, follow these steps:
Get All the APIs:
- Obtain API keys and credentials for Google's Custom Search JSON API, OpenAI's API, and ImageKit.io.
Clone the Repository:
Clone the repository to your local machine:
git clone https://github.com/nikkhil31/post-creator.git
Copy the Environment Variables:
Copy the environment variables file:
cp .env.example .env
Open the
.env
file and add your API keys and other environment variables.
Install Dependencies:
Navigate to the project directory and install dependencies:
npm install
Run the Development Server:
Start the development server:
npm run dev
Access the app in your browser at
http://localhost:3000
.
Possible Improvements
The app could benefit from adding more post sizes to accommodate various social media platform requirements. Additionally, integrating an image editor would allow users to generate and customize layouts directly within the app, streamlining the content creation process.
Conclusion
In conclusion, Post Creator provides a powerful and efficient solution for creating social media content. By leveraging advanced APIs and robust technologies, it simplifies the process of generating visually appealing posts and stories. With potential improvements like additional post sizes and an integrated image editor, the app is poised to become an indispensable tool for social media managers and content creators, enabling them to focus on producing high-quality content with ease.
Project URL - Post Creator
LinkedIn URL - Nikhil Limbad
Website - nikkhil.dev