summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authormo khan <mokha@cisco.com>2014-02-20 17:51:14 -0700
committermo khan <mokha@cisco.com>2014-02-20 17:54:40 -0700
commite35076ac0eb14de0a6865043060f49f0f8cb1256 (patch)
tree10b7610a83624aba41ba292ff5ab52f3043183a4 /README.md
parent1fe046fd801be497f6176a1f882359ffcfaf6ce1 (diff)
sketch out a rough design.
Diffstat (limited to 'README.md')
-rw-r--r--README.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/README.md b/README.md
index a10a0e0..6b67063 100644
--- a/README.md
+++ b/README.md
@@ -56,3 +56,48 @@ A typical well license has the following structure (all fields are required):
2. Your submission can be developed using any technology/language you like.
3. This private Github repo has been created just for you. Please push your code to it for review.
+
+## Design (Rough)
+
+### Assumptions
+
+* Name of applicant is the name of the employee at the company that submitted the application.
+* Date of license is the date the license was issued.
+* Assume perf isn't the focus, so no need to over-engineer with a denorm read model.
+
+### Model
+
+WellLicense (aggregate root)
+* belongs_to applicant
+* has_one well_type
+* has_one location
+* issued_at
+* expired_at
+* status
+
+WellType (flyweight value object)
+* id
+* name
+
+Applicant
+* company
+
+Location (value object)
+* latitude
+* longitude
+* township_name
+
+LicenseStatus (flyweight, state)
+* id
+
+### Endpoints
+
+* GET /licenses - list of all well licenses
+* GET /company/:id/licenses - list of all active licences for company
+* GET /licenses/:id - details of a single license
+* GET /company/:id/licenses?township=:township - list of active licenses for township, for company.
+
+Start with a versioned api using urls cuz it's easy peasy. Won't worry
+about token auth at this point.
+
+What should i call this thing? hrmm....