Instagram account https://www.instagram.com/ai.isometric.creations/
Worker service https://github.com/kami2/smallworker
This project aims to automate the process of image generation, storage, and publishing through a combination of two services: a worker using Leonardo AI API and a central service hosted at chaotic.vercel.app. The worker generates images using prompts generated by ChatGPT and runs twice a day, sending the generated image information to the chaotic.vercel.app service. The chaotic.vercel.app service is responsible for uploading the generated image to Google Drive and inserting information about the image into a remote MySQL database. Additionally, a cron job is scheduled to run daily between 8:30 AM and 9:30 AM to post the oldest, non-deleted, and unpublished image on Instagram, updating the database with the publication status and date.
- The worker service uses the Leonardo AI API to generate images based on prompts provided by ChatGPT.
- The worker runs twice a day, every 12 hours.
- After generating an image, it sends information about the image to the chaotic.vercel.app service.
- This service is responsible for managing the storage and database operations.
- It receives image information from the worker service.
- Uploads the generated image to Google Drive for storage.
- Inserts relevant information about the image (e.g., image URL) into a remote MySQL database.
- A remote MySQL database stores information about generated images, including their URLs, publication status, and other metadata.
- A cron job is scheduled to run daily between 8:30 AM and 9:30 AM.
- This job performs the following tasks:
- Looks for the oldest, non-deleted, and unpublished image in the database.
- Retrieves the image URL from the database.
- Posts the image on Instagram.
- Sets the "isPublished" flag in the database to mark the image as published.
- Records the publication date as "publishedDate" in the database.
- Automated image generation using AI prompts.
- Efficient storage of generated images on Google Drive.
- Database management for image metadata and publication status.
- Automatic posting of images on Instagram.
- Regularly scheduled updates for image publication.
- Increases efficiency by automating image generation and publication.
- Provides a central repository for image storage and metadata.
- Ensures a consistent posting schedule on Instagram.
- Reduces manual intervention in the image generation and posting process.