GithubHelp home page GithubHelp logo

talifhani / todo-ddd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from martinpham/todo-ddd

0.0 1.0 0.0 485 KB

Todo app with DDD

PHP 96.55% JavaScript 0.40% Vue 0.20% HTML 1.75% Gherkin 0.92% TSQL 0.18%

todo-ddd's Introduction

todo

Scrutinizer Code Quality

Build Status

SensioLabsInsight

###Description todo is an application which allow people can add new task, see all the tasks added, modify existing tasks, mark tasks done/remaing, or remove tasks. Every task has name and status (completed/not-completed). Task should be unique.

###Usecase

  • List/Read
    • See all remaning tasks
    • See all completed tasks
  • Create/Update/Delete
    • Add new task
    • Mark task as completed/remaning
    • Edit existing task (name and status)
    • Remove existing task
    • Clean all completed tasks

###Story

Feature: Creating task
  In order to create a new task
  As an user
  I can create new task with name

  Scenario: Create new task
    Given There is no task named "Buying sugar"
    When I create a new task named "Buying sugar"
    Then The task "Buying sugar" should be created
    And The status of task "Buying sugar" should be "remaining"

  Scenario: Create new task with existed name
    Given There is a task named "Buying salt"
    When I create a new task named "Buying salt"
    Then The new task "Buying salt" should not be created
Feature: Listing task
  In order to see list of tasks
  As an user
  I can see tasks I created

  Scenario: Listing remaining and completed task
    Given There are tasks:
      | name              | status    |
      | Buying salt       | remaining |
      | Buying milk       | remaining |
      | Go to supermarket | completed |
    When I list tasks
    Then I should see remaining tasks:
      | name        |
      | Buying salt |
      | Buying milk |
    And I should see completed tasks:
      | name              |
      | Go to supermarket |
Feature: Modifying task
  In order to modify task detail
  As an user
  I can edit the task I created

  Scenario: Editing task
    Given There is a task named "Buying salt" with status "remaining"
    When I modify task "Buying salt" with name "Buying salt and pepper" and status "completed"
    Then The task "Buying sugar" should have name "Buying salt and pepper" and status "completed"

  Scenario: Complete task status
    Given There is a task named "Buying salt" with status "remaining"
    When I modify task "Buying salt" with status "completed"
    Then The task "Buying salt" should have status "completed"

  Scenario: Redo task status
    Given There is a task named "Go to supermarket" with status "completed"
    When I modify task "Go to supermarket" with status "remaining"
    Then The task "Go to supermarket" should have status "remaining"
Feature: Removing task
  In order to remove a task
  As an user
  I can remove the task I created

  Scenario: Removing task
    Given There is a task named "Buying salt" with status "remaining"
    When I remove task "Buying salt"
    Then The task "Buying sugar" should be deleted

  Scenario: Cleanup completed task
    Given There are tasks:
      | name              | status    |
      | Buying salt       | remaining |
      | Buying milk       | remaining |
      | Go to supermarket | completed |
    When I cleanup completed tasks
    Then The completed tasks should be removed:
      | name              |
      | Go to supermarket |

###Domain

  • Task
    • id
    • name
    • status (completed/remaning)
    • createdAt
    • updatedAt
  • Factory
    • TaskFactory
      • createFromName

  • Exception
    • TaskNameIsEmptyException
    • TaskNameIsAlreadyExistedException
    • TaskIsNotFoundException
  • Specification
    • TaskNameIsNotEmptySpecification
      • isSatisfiedBy

    • TaskNameIsUniqueSpecification
      • isSatisfiedBy

  • Repository
    • TaskRepositoryInterface
      • findAll

      • find

      • findAllByStatus

      • findByName

      • save

      • remove

###Application

  • Task
    • Exception
      • TaskCannotBeSavedException
      • TaskCannotBeRemovedException
    • Query
      • getTaskById

      • getAllRemainingTasks

      • getAllCompletedTasks

    • Command
      • addNewTask

      • completeTask

      • redoTask

      • editTask

      • removeTask

      • cleanAllCompletedTasks

###Infrastructure

  • Persistence
    • DoctrineORM

      • Repository
        • TaskRepository
          • findAll

          • find

          • findAllByStatus

          • save

          • remove

    • Eloquent

      • Repository
        • TaskRepository
          • findAll

          • find

          • findAllByStatus

          • save

          • remove

todo-ddd's People

Contributors

martinpham avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.