Document Management Architecture
Backend: com.axvero.ams.core.document/. GraphQL: documents.graphqls and documents-input.graphqls.
Core Entities
- DocumentDefinition — a type of document (e.g. "Income Statement"); workspace-scoped; has
defaultRequired,category,allowCustomDocuments; has a list ofDocumentTemplatefiles - DocumentTemplate — an admin-uploaded template file attached to a
DocumentDefinition; hasfileUrl,fileType,fileName - ApplicationTemplate — application type template; has name, description,
applicationType,allowCustomDocuments,active; containsApplicationTemplateDocumententries - ApplicationTemplateDocument — join between
ApplicationTemplateandDocumentDefinition; overrides required/optional per template; hassortOrderandinstructions - ApplicationDocument — actual document on an application; has
applicationId, optionaldocumentDefinitionId(null = ad-hoc),statusenum (PENDING,UPLOADED,APPROVED,REJECTED,NOT_APPLICABLE),reviewNote,uploadedByUserId
Permission Rules
- Creating/updating
DocumentDefinitionandApplicationTemplate: OWNER, ADMIN, or MANAGER - Viewing: any workspace role
- Submitting
ApplicationDocument: any authenticated user - Reviewing (
reviewApplicationDocument): staff only - Listing (
applicationDocuments): workspace role or client membership (hasUserAnyWorkspaceOrClientRole)