Riteway enforces a layered architecture to manage module dependencies. The hierarchy flows from high-level UI components down to low-level types. When organizing code, follow this dependency direction:
types ← services ← plugins ← components
Key Dependency Constraints:
- Components may depend on
plugins (specifically Observe<Data> and void actions) and types. They must never depend on services. - Plugins may depend on
services, types, and other plugins. - Services may depend on other
services and types. They must never depend on components or plugins. - Types may only depend on other
types. They must never depend on any other layer.
Use these rules when creating new folders, moving files, or adding imports to ensure architectural integrity.
DependencyRules [
{ layer: "components", mayDependOn: ["plugins (Observe<Data>, void actions)", "types"], mustNotDependOn: ["services"] },
{ layer: "plugins", mayDependOn: ["services", "types", "other plugins"], mustNotDependOn: [] },
{ layer: "services", mayDependOn: ["other services", "types"], mustNotDependOn: ["components", "plugins"] },
{ layer: "types", mayDependOn: ["other types"], mustNotDependOn: ["everything else"] }
]