franzose / symfony-ddd-wishlist
Wishlist, a sample application on Symfony 3 and Vue.js built with DDD in mind.
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 202
Watchers: 19
Forks: 14
Open Issues: 0
Type:project
Requires
- php: >=7.1
- doctrine/doctrine-bundle: ^1.6
- doctrine/orm: ^2.5
- friendsofsymfony/jsrouting-bundle: ^1.6
- incenteev/composer-parameter-handler: ^2.0
- moneyphp/money: ^3.0
- ramsey/uuid: ^3.6
- ramsey/uuid-doctrine: ^1.4
- sensio/distribution-bundle: ^5.0.19
- sensio/framework-extra-bundle: ^3.0.2
- symfony/monolog-bundle: ^3.1.0
- symfony/polyfill-apcu: ^1.0
- symfony/swiftmailer-bundle: ^2.3.10
- symfony/symfony: 3.3.*
- twig/twig: ^1.0||^2.0
- webmozart/assert: ^1.2
Requires (Dev)
- doctrine/doctrine-fixtures-bundle: ^2.3
- fzaninotto/faker: ^1.6
- liip/functional-test-bundle: ^1.8
- mockery/mockery: ^0.9.9
- phpunit/phpunit: ^6.2
- sensio/generator-bundle: ^3.0
- symfony/phpunit-bridge: ^3.0
This package is auto-updated.
Last update: 2024-12-19 00:53:04 UTC
README
Wishlist
I'm still working on the project, so some things can be unimplemented yet.
This repository serves as an implementation of DDD, domain driven design, with usage of Symfony 3, PostgreSQL, and Redis as a backend and Vue.js/Sass as a frontend. The project is heavily inspired by DDD Cargo Sample in PHP.
The basis for the project is a fairly simple domain, a wish list. Each wish can have its own price, daily fee and a fund which is implemented as a list of deposits to the wish. Wish can be fulfilled and is fulfilled as soon as its fund has enough money. Mistaken deposits can be removed or transfered to another wish. Any wish can have surplus funds, so they can also be transfered to other wishes.
Installation
Clone the repository and run the following commands to install all the dependencies and build frontend scripts and styles:
cd /path/to/webroot git clone https://github.com/franzose/symfony-ddd-wishlist.git cd symfony-ddd-wishlist composer self-update composer install npm install ./node_modules/.bin/encore dev
PostgreSQL, Redis, and PHP dev server
To simplify backend setup, the project uses a couple of Docker images (so you need to install Docker too) that you'll find in docker-compose.yml.dist
file. Run the following commands to start PostgreSQL and Redis, and also fill the database with some data:
cp ./app/config/parameters.yml.dist ./app/config/parameters.yml cp ./app/config/parameters_permanent.yml.dist ./app/config/parameters_permanent.yml cp ./docker-compose.yml.dist ./docker-compose.yml docker-compose up -d php bin/console doctrine:fixtures:load --fixtures=/path/to/src/Infrastructure/Persistence/Doctrine/Fixture/LoadWishesData.php php bin/console server:start
Project structure
TODO: write about project structure
Support
If you have any problems using the application, please open a Github issue. The same applies to any questions or feature requests.
Contributions
Any contribution is appreciated. This application serves as an example implementation of the domain driven design. I'd be very glad of any kind of shares of this repository being it a tweet, a post, a link, or whatever.
Tests
The application is covered by unit and functional tests. Functional tests use SQLite database. Before running tests, please copy PHPUnit's configuration file:
cp ./phpunit.xml.dist ./phpunit.xml
Then use the following command to run tests:
./vendor/bin/phpunit