Git Product home page Git Product logo

ddd-example-billie's Introduction

Billie

Example of Domain Driven Design implementation in PHP using Symfony framework.

An invoice is a document issued by a seller (creditor) to the buyer (debtor). It provides details about a sale or services, including the quantities, costs. Factoring is a process where a company (creditor) sells its invoice to a third-party factoring company (Billie). The factoring company then takes care of collecting the money from the debtor. Since there is always the risk that a debtor won’t pay their invoices, Billie sets a debtor limit for each company. This means that Billie won’t accept the invoice if the debtor’s total amount of open invoices reaches the limit.

Bounded Contexts

For simplicity, we will consider two main bounded contexts:

  • Invoicing Context - Deals with creating and managing invoices.
  • Company Management Context - Handles company-related operations.

Core Domain Models

  • Company Attributes: Company ID, Name, Type, Address Methods: UpdateDetails()
  • Invoice Attributes: Invoice ID, Debtor ID, Creditor ID, Amount, Issue Date, Due Date, Status Methods: MarkAsPaid()
  • Debtor Limit Attributes: Debtor ID, Limit Amount, Current Utilized Amount Methods: UpdateLimit(), CalculateRemainingCredit(), CanAcceptInvoice()

Running the Project

To launch the platform locally, run:

make run

Navigate to http://localhost in your web browser to view the project.

ddd-example-billie's People

Contributors

psfpro 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.