@@ -694,6 +694,33 @@ AWS deployments.
694
694
See cargo workspace members:
695
695
[ Cargo.toml] ( Cargo.toml )
696
696
697
+ #### Types-specific crates and their purpose
698
+
699
+ The workspace includes several -types suffixed crates that handle domain models, type definitions, business logic and
700
+ conversions:
701
+
702
+ * ** drive-deposits-rest-types** : REST API request/response types and validations
703
+ * ** drive-deposits-proto-grpc-types** : gRPC protocol buffer generated types
704
+ * ** drive-deposits-cal-types** : Core calculation domain models and business logic
705
+ * ** drive-deposits-lambda-db-types** : DynamoDB item types and conversions
706
+
707
+ This separation provides key benefits:
708
+
709
+ 1 . ** Dependency Management** : Keeps dependencies lean by isolating type definitions. For example,
710
+ drive-deposits-rest-types prevents REST-specific dependencies from leaking into other components.
711
+
712
+ 2 . ** Clear Boundaries** : Each -types crate establishes clear domain boundaries and ownership of data models.
713
+
714
+ 3 . ** Reusability** : Types and conversion logic can be reused across multiple crates without circular dependencies. For
715
+ example, allows in module fashion re-use of drive-deposits-rest-types crates in various crates as required without
716
+ the actual axum dependency from drive-deposits-rest-gateway-server crate.
717
+
718
+ 4 . ** Evolution Flexibility** : While some of these crates could be merged as modules into their consuming crates, the
719
+ current separation allows evolution of the type system.
720
+
721
+ The -types crates represent the current optimal structure based on the system's needs. As the codebase evolves, they
722
+ could be mergedinto modules if tighter coupling provides clear advantages.
723
+
697
724
#### Naming: why keeping prefix drive-deposits
698
725
699
726
Using the "drive-deposits-" prefix for crate names clearly distinguishes these as separate crates within
0 commit comments