Coder Social home page Coder Social logo

promissory-notes-platform's Introduction

promissory-notes-platform

約束手形決済プラットフォームアプリ。約束手形を引き受けて、受取人口座に支払いがされるよう決済処理を代行する。

約束手形のドメインモデリング

約束手形とは

振出人が、受取人またはその指図人もしくは手形所持人に対し、一定の期日に一定の金額を支払うことを約束する有価証券のことである。

引用: 約束手形 - Wikipedia

約束手形は直接的に取引契約と対応しない無因な有価証券であり、また金融機関を通じて請求・支払・引き落としを行うので厳密には**決済機関は存在しない。 このアプリケーションは約束手形による決済を仲介するプラットフォームを対象ドメインと見立ててモデリング・実装を試みる。

「約束手形を振り出す」とは代金を支払う振出人が当座預金を持っている銀行に対して取り立てる権利を持つ約束手形の発行を依頼、発行することである。

なおpromissory notesとは約束手形のことである。

機能

「振り出された約束手形で決済し、受取人が代金を受け取る」機能が実装される。

モデリング

  1. ユースケース分析
# 項目 説明
タイトル 約束手形で代金を決済する
アクター 受取人
前提条件 振出人によって約束手形が振り出されていること
系列 振り出された約束手形を銀行にもっていく
取り立てを委任された銀行が振出人銀行に取り立てる
振出人当座預金から決済金額引いて受取人銀行に支払
受取人銀行は手数料を差し引いて受取人当座預金に引き落としを行う

ユースケース図

  1. ドメインモデル

オブジェクトモデル図

受取人銀行が振出人銀行に対して取り立てを行い、、振出人銀行は口座から金額を差し引いて受取人銀行に支払を行う。 支払を受け取った受取人銀行は手数料を差し引いて受取人当座預金に引き落としを行う。

参考

設計

戦略にはドメイン駆動設計を採用する。

リクエスト・レスポンス

リクエスト

{
  "drawee": {
    "amount": 500000,
    "holder": "藤原道長",
    "bank": "ゆうちょ銀行",
    "branch": "城東店",
    "type": "当座預金",
    "number": "000001"
  },
  "payee": {
    "holder": "中臣鎌足",
    "bank": "ゆうちょ銀行",
    "branch": "本店",
    "type": "当座預金",
    "number": "000002"
  },
  "maturity-at": "2023-05-08",
  "presentation-at": "2023-05-11"
}

開発

Setup

When you first clone this repository, run:

lein duct setup

This will create files for local configuration, and prep your system for the project.

Environment

To begin developing, start with a REPL.

lein repl

Then load the development environment.

user=> (dev)
:loaded

Run go to prep and initiate the system.

dev=> (go)
:duct.server.http.jetty/starting-server {:port 3000}
:initiated

By default this creates a web server at http://localhost:3000.

When you make changes to your source files, use reset to reload any modified files and reset the server.

dev=> (reset)
:reloading (...)
:resumed

Testing

Testing is fastest through the REPL, as you avoid environment startup time.

dev=> (test)
...

But you can also run tests through Leiningen.

lein test

Legal

Copyright © 2022 FIXME

promissory-notes-platform's People

Contributors

simonnozaki avatar

Watchers

 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.