Digital Writer is an automated publishing platform built with Symfony 6. Originally conceived as an experiment exploring the early potential of large language models (LLMs), it uses OpenAI to generate content, integrates with Twitter and WordPress, and stores data in MySQL through Doctrine ORM. The project follows a layered Domain‑Driven Design architecture, keeping the domain logic separate from infrastructure concerns.
src/
DigitalWriter/
Application/ – Application services, actions and DTOs
Domain/ – Entities and repository interfaces
Infrastructure/ – Adapters, persistence and UI layers
config/ – Symfony configuration
migrations/ – Doctrine database migrations
public/ – Web entry point
- Service classes orchestrate tasks such as generating post structure, creating tweets, or writing articles.
- Action classes expose use cases used by console commands.
- Dto objects move data between layers without coupling the domain.
- Models such as
Author,PublishTargetandWriteTopicencapsulate business data. - Repository interfaces live here so that the application can depend on abstractions.
- Adapter implementations connect to external services (OpenAI, Twitter, WordPress, image providers, news feeds).
- Domain repositories use Doctrine to persist domain models in MySQL.
- UI contains Symfony console commands and the admin controllers built with EasyAdmin.
- Symfony service configuration is under
Infrastructure/Framework/Symfony/Resources.
The main functionality is triggered through Symfony console commands:
digital-writer:wordpress-publish– Publish articles to all configured WordPress targets.digital-writer:tweet-topics-publish– Tweet content generated from topics.- Additional commands exist under the
UI/Consolenamespace for playing with data and managing targets.
An admin panel is provided at /admin (see DashboardController). Through EasyAdmin you can manage authors, publish targets and writing topics.
API keys and credentials are required for external services. The most relevant variables are:
OPENAI_API_KEY– Access token for the OpenAI API.UNSPLASH_API_KEY– API key for fetching images.TWITTER_API_KEYS– JSON with credentials for Twitter accounts.WORDPRESS_API_USER/WORDPRESS_API_PASSWORD– Credentials used to publish posts.GOOGLE_NEWS– Endpoint for retrieving news seeds.
These can be defined in .env.local or your server environment.
Doctrine migrations define the schema for the core tables:
dw_author– Authors with prompts and personality information.dw_publish_target– Target blogs or social accounts.dw_topic– Writing topics to be processed.
Run migrations with:
php bin/console doctrine:migrations:migrateUnit tests live under the tests/ directory. Execute them with PHPUnit:
php bin/phpunit- Install PHP dependencies using Composer.
- Configure the environment variables listed above.
- Execute migrations to create the database schema.
- Use the console commands or the admin panel to start generating content.
Digital Writer automates the workflow of generating articles, tweets and images. The project began as a proof of concept for early LLM-driven writing experiments.