# BriteLines Principles

Below are a set of core principles to keep in mind when developing BriteLines.

# BriteLines does not store display information

BriteLines is all about data modeling and rating. Any information regarding how Risk Types or Fields are displayed, such as which HTML widgets to use or Field help text, should be configured elsewhere.

Note: The eventual goal is for Quote UI setup to be configured in a separate service. At the time of this writing, that service does not exist. When it does exist, this section should be updated to reflected exactly where UI configuration should take place.

# Field Types are simple data types

The Field Types in BriteLines -- string, number, boolean, date, and option selection -- are purposefully simple. BriteLines does not have real-world Field Types like VIN or Address. Instead, those concepts are created as Fields of certain types (VIN would be a string and Address would be a string or Risk Type that has additional fields like City and Postal Code).

# Rating does not have database access

Rating does not have have direct database access, nor does it use the Django ORM. Instead, the rating engine receives the risk states of all risks on the quote, collectively referred to as the unified risk state. This is a JSON representation of the risks on a quote. The rating engine should perform calculations and retrieve field answers directly from the risk state.

# Risk Type hierarchy is important!

The Risk Type hierarchy is an important enough concept that it has its own dedicated document.