Table of Contents
The AI Image Generation App is a cutting-edge and user-friendly software application crafted to utilize the potential of artificial intelligence for crafting remarkable and one-of-a-kind images from simple prompts. Furthermore, it allows users to download these generated images directly to their local devices for offline use.
This project is build with these technologies.
- Utilizing the ai, the application creates images from user inputs.
- The app conveniently stores all generated images in a personalized gallery for effortless retrieval.
- Users have the option to download any of the generated images to their devices.
- The application also provides the functionality to delete images as needed.
Before you can run this Laravel project, you'll need to install the following software:
- PHP v8.1 or later
- Composer v2.5.4 or later
- Laravel v10.0 or later
- MySQL
Please check the official laravel installation guide for server requirements before you start. Official Documentation
-
Clone the repo
git clone [email protected]:mhmohon/generate-image.git
-
Switch to the repo folder
cd generate-image
-
Install all the dependencies using composer
composer install
-
Copy the example env file and make the required ** configuration changes ** in the .env file
cp .env.example .env
-
Create a sqlite database
touch database/database.sqlite
-
Generate a new application key
php artisan key:generate
-
Run the database migrations
php artisan migrate --seed
-
Create a symlink to the storage
php artisan storage:link
-
Run the server
php artisan serve
-
Run the queue (In another command tab)
php artisan queue:work
Update the OPENAI_API_KEY value in .env file
You can now access the server at http://localhost:8000/admin/login
Please check if you have Docker and Laravel sail install. The official laravel sail installation guide for server requirements before you start. Official Documentation
Must Have to Follow 1 to 5 steps of normal install. After that follow bellow:
-
Run the laravle sail build command
./vendor/bin/sail build
-
Run the laravel saild up command
./vendor/bin/sail up -d
-
Run the database migrations
./vendor/bin/sail php artisan migrate --seed
-
Create a symlink to the storage
./vendor/bin/sail php artisan storage:link
-
Run the queue (In another command tab)
./vendor/bin/sail php artisan queue:work
Update the OPENAI_API_KEY value in .env file
You're ready to go! Visit the url with /admin/login in your browser, and login with:
- Username: [email protected]
- Password: password
I have chosen to use the Service Layer design patterns in my implementation of this application also used the service interface layer so that the code will be more abstract and increased testability, which make the application more modular, maintainable, and scalable.
In an effort to enhance single responsibility and code organization, I've decided to implement the Action pattern for all the actions of this applications.
OpenAI is a premier artificial intelligence research organization, widely recognized for its groundbreaking contributions in the field of natural language processing. Leveraging these advanced technologies, we will create prompts for generating images using other innovative technologies.
"DALL·E" is another remarkable creation, specifically designed for image generation. DALL·E harnesses the capabilities of deep learning and generative models to produce astonishing images from textual prompts. We will utilize this technology to generate images based on prompts.
You can run PHPStan test by using this command
./vendor/bin/phpstan analyse
Result
Mosharrf Hossain - @Linkedin - [email protected]
Project Link: https://github.com/mhmohon/generate-image