-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Grzegorz Nowak edited this page Sep 17, 2018
·
2 revisions
-
design
- data model
- rest api
- money transfers
- accounts
- simple
- common sense
-
implementation
- no spring
- in-memory datastore
- executable (jar / war)
- tests
- demo
- high quality
- track time
- save notes / docs
- versioning
- double booking
- gnucash
Account {
String number
String owner
String currency
BigDecimal balance
}
Transfer {
String id
Date createdAt (=now)
String from
String to
BigDecimal amount
}
Account {
UUID number
String owner
String currency
}
Transfer {
UUID id
Date createdAt
List<Split> splits
}
Split {
UUID account
Money amount
}
POST /accounts - create account
GET /accounts?owner=XYZ - view accounts of XYZ
GET /accounts/123 - view account basic info
GET /accounts/123?fields=balance - view info with balance
GET /accounts/123/transfers - view transfers from/to this account, 307 redirect
POST /transfers - enter a new transfer
GET /transfers - debug list of transfers
GET /transfers?account=XYZ - account transfers
GET /transfers/123 - get info about the transfer
- As a user I can create new accounts under my name
- As a user I can view my accounts with their balance
- As a user I can view my account history (incoming and outgoing transfers)
- As a user I can transfer money between accounts
- As a user I can view the status of the transfer
- Java 8 SE - base
- JAX-RS & Jersey Client & Server
- Jetty - embedded servlet container
- simple own object store
- assembly/shade plugins - executable jar
- groovy & spock - unit and acceptance tests
- maven - project tool
- github - source control
- single project with tests
- json Message with details of error (to complement http status code)
- bean validation for input objects
- hateoas (very limited as part of 201 Created and Location header)
- monitoring, tracing, etc
- registration in service registry to allow discovery
- api module for DTOs and interfaces to make it easy for consumers
- Optional<> instead of nulls
- validation of transfers against account store (see incode TODOs)
What | Time |
---|---|
Analysis and design | 2h |
Prototyping | 7h |
Impl. & testing | 14h |
Self review | 1h |
Total | 24h |