Giter Club home page Giter Club logo

pay-a-friend's Introduction

About

This is a sample application for a payment system like Revolut, where customers can get an online prepaid account they can use to make and receive online payments.

I'm using this as a playground to learn about:

  • Event Storming (as a requirements elicitation technique)
  • Domain Driven Design (for using an ubiquitous language at all levels, e.g. requirements, implementation, testing, documentation, and for separating the domain logic from the rest of the code)
  • Event Sourcing (for storing all changes as events for auditing purposes)
  • Authentication & Authorization, both user to machine and machine to machine access.

High level flows

  • A customer registers using an email and password.
  • The customer then goes through a verification process by providing personal details and a proof of address and identity (e.g. 2 separate images)
  • An employee reviews the verification details and can enable the customer to use the service, or ask for more information.
  • If approved, the customer can access the service, and can see the balance of their prepaid account to be 0.
  • The customer can top-up their prepaid account using a debit/credit card.
  • The customer can pay other customers who are using this service, up to the total amount in their prepaid account.

Business process

Event Storming is being used to define the domain model for online payments using a prepaid account. The output has been captured in the Business Process Modeling with Event Storming document.

This model captures:

  • the ubiquitous language for this domain model (in the form of events)
  • the personas
  • the user flows
  • aggregates (derived from events and used for technical implementation)

High level architecture

In the first version, customers use a web-based (MVC) application. In a future version, a mobile app (e.g. Android) will provide the same functionality. Internal users will use a similar web-based (MVC) application to validate customers.

For identity, a separate MVC application is provided that allows both external (customers) and internal (employees) users to login. Customers can also register using an email address and password. Authorization will be based on the RBAC model, where customers have the "customer" role and internal users have the "employee" role.

The execution of commands results in events being created into an EventStore instance. The events are projected to MongoDB, which provides the read-only side for the application. This allows for an audit trail to be created for all changes in the system, and thus provides the ultimate auditing capabilities.

Tooling

  • C# Net Core 5.0 (backend, front-end)
  • EventStoreDB for storing the events
  • MongoDB for projections and read-only view of the data
  • Eventuous (https://github.com/Eventuous/eventuous) which provides the Domain Driven Design capabilities with a very small footprint & Event Sourcing capabilities.
  • IdentityServer4 for authentication and authorization (OpenID Connect and oAuth2 capabilities)

Note:

pay-a-friend's People

Contributors

claudiuchis avatar

Stargazers

 avatar

Watchers

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