application capa

application-agreements

Forge agreements module — terms of service, privacy policies, GDPR consent tracking with version pinning. Wraps domain-agreements.

Forge agreements module — terms of service, privacy policies, GDPR consent tracking with version pinning. Wraps domain-agreements.

Tierapplication
Roleunclassified (baselined)
Pathcrates/application/agreements
Edition2024
Targetsapplication_agreements
Public items9 across 2 modules
Tests8

What it is for

application-agreements — agreement/consent tracking for the Forge framework.

Wraps domain-agreements. Supports ToS, privacy policies, and per-party consent records with version pinning (consent always references a specific agreement version, not the agreement generically). Foundation for GDPR + similar compliance regimes.

Migration vendoring (OQ2, sprint-3.53)

domain-agreements ships its own unvendored migrations/001_agreements.sql. Following application-parties' pattern (not application-legal-documents', which copies the file into a local migrations/ dir): the SQL is include_str!'d directly from the domain crate's own migrations directory, no physical copy.

Host mounting

Not mounted in examples/staff-host this sprint — see docs/userstories/sprint-3.53-forge-agreements.md's Technical plan: this module has no assigned mount order in COMPANY-V1-MODULE-SURVEY.md §5's steps 1-5. Built and verified standalone; host wiring is a follow-up sprint's call.

Capabilities

AgreementsModule

application-agreements — agreement/consent tracking for the Forge framework.

Item
pub struct AgreementsModule
AgreementsModule :: fn new() -> Self
AgreementsModule :: fn name(& self) -> & 'static str
AgreementsModule :: fn version(& self) -> & 'static str
AgreementsModule :: fn migrations(& self) -> Vec <MigrationSet>
AgreementsModule :: async fn migrate_pending(& self, pool : & PgPool) -> std::result::Result <u32, MigrationError>
AgreementsModule :: fn permission_codes(& self) -> Vec <String>

api (other)

HTTP API routers for application-agreements.

Item
fn admin_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

api::agreements_admin (other)

Agreements admin REST router — sprint-3.53.

Item
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

application_agreements

flowchart TD
  n_application_agreements["application_agreements"]
  n_application_agreements --> n_api["api"]
  n_api --> n_api__agreements_admin["agreements_admin"]

Public surface

`crate root`

ItemWhat it is
pub struct AgreementsModule
AgreementsModule :: fn new() -> Self
AgreementsModule :: fn name(& self) -> & 'static str
AgreementsModule :: fn version(& self) -> & 'static str
AgreementsModule :: fn migrations(& self) -> Vec <MigrationSet>
AgreementsModule :: async fn migrate_pending(& self, pool : & PgPool) -> std::result::Result <u32, MigrationError>
AgreementsModule :: fn permission_codes(& self) -> Vec <String>

`api`

ItemWhat it is
fn admin_router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,Admin router composing all agreements admin sub-routers

`api::agreements_admin`

ItemWhat it is
fn router <S>() -> Router <S> where S : Clone + Send + Sync + 'static, PgPool : FromRef <S>,Agreements admin router

No pub use re-exports: every item above is declared in this crate.

Boundary

Reaches into domain, platform.

Shares tier application with 120 other crates: application-ai, application-analytics, application-approvals, application-assessments, application-audit-log, application-auth, application-billing, application-browser-automation, … (120 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)application
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/application/agreements
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_application["application"] --> n_domain["domain"]
  n_application["application"] --> n_platform["platform"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`application-auth`applicationnoalways
`application-core`applicationnoalways
`application-rbac`applicationnoalways
`domain-agreements`domainnoalways
`platform-dto`platformnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
axum^0.7multipartnoalways
chrono^0.4serdenoalways
serde^1derivenoalways
serde_json^1noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
tower-sessions^0.13noalways
tracing^0.1noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1fullnoalways
tower^0.5noalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["application-agreements"]
  SELF -->|runtime| n_application_auth["application-auth"]
  SELF -->|runtime| n_application_core["application-core"]
  SELF -->|runtime| n_application_rbac["application-rbac"]
  SELF -->|runtime| n_domain_agreements["domain-agreements"]
  SELF -->|runtime| n_platform_dto["platform-dto"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libapplication_agreements`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimenone detected
database accessyes
network I/Oyes
unsafe codenone detected
environment variablesyes

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

VariableRead in
CARGO_PKG_VERSIONsrc/lib.rs
DATABASE_URLsrc/lib.rs
TEST_DATABASE_URLsrc/lib.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests8
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root100
api100
api::agreements_admin100

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc29
Public modules with a //! block22
pie showData
    title Public items with rustdoc
    "Documented" : 2
    "No rustdoc detected" : 7

Metrics

MetricValue
Rust source files3
Source lines742
Code lines568
Public API items9
Public modules2
Tests8
Examples0
Cargo features0
Direct runtime dependencies14
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "function" : 2
    "method" : 6
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 568
    "Blank or comment" : 174

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las application · Manual