This project gives you hand to generate automatically articles and images using openAI API. Build with PHP using postgres and symfony.
Example of a generated article and image
These instructions will get you a copy of the project up and running on your local machine. This project cover both, running on a containerized environment using Docker, or on your local machine.
- CRUD endpoints.
- OpenAI API (@orhanerday)
- Database (postgres)
- Docker (with adminer for database management)
- Swagger(NelmioApiDocBundle)
- Composer (the latest version)
- PHP (version 8)
- Postgres
- A Docker engine running on your local machine.
# clone the project
$ git clone https://github.com/sarraomezzine/articleGenerator.git
# create Environment variables file
cp .env.example .env
# migrations
$ php bin/console doctrine:migrations:migrate
# development
$ symfony server:start
Generate your OPENAI_API_KEY and replace it in the Environment variables file
You can use the docker compose.
Before start please fill the correct
configuration in .env file
docker-compose up -d turn off your local postgres server in case of: Error starting userland proxy: listen tcp4 0.0.0.0:5432: bind: address already in use
- webApp: http://127.0.0.1:8000/api/article/
- Swagger: http://127.0.0.1:8000/api/doc
- Adminer: http://localhost:8080

